diff options
Diffstat (limited to 'src/crepe/api/KeyCodes.h')
-rw-r--r-- | src/crepe/api/KeyCodes.h | 318 |
1 files changed, 179 insertions, 139 deletions
diff --git a/src/crepe/api/KeyCodes.h b/src/crepe/api/KeyCodes.h index e5a91fc..a326527 100644 --- a/src/crepe/api/KeyCodes.h +++ b/src/crepe/api/KeyCodes.h @@ -1,146 +1,186 @@ #pragma once +//! \file InputEnums.h +//! \brief Defines enums for mouse buttons and keyboard keycodes used in the application. + +//! \enum MouseButton +//! \brief Enumeration for mouse button inputs, including standard and extended buttons. enum class MouseButton { - NONE = 0, - LEFT_MOUSE = 1, - RIGHT_MOUSE = 2, - MIDDLE_MOUSE = 3, - X1_MOUSE = 4, - X2_MOUSE = 5, - SCROLL_UP = 6, - SCROLL_DOWN = 7, + //! No mouse button input. + NONE = 0, + //! Left mouse button. + LEFT_MOUSE = 1, + //! Right mouse button. + RIGHT_MOUSE = 2, + //! Middle mouse button (scroll wheel press). + MIDDLE_MOUSE = 3, + //! First extended mouse button. + X1_MOUSE = 4, + //! Second extended mouse button. + X2_MOUSE = 5, + //! Scroll wheel upward movement. + SCROLL_UP = 6, + //! Scroll wheel downward movement. + SCROLL_DOWN = 7 }; +//! \enum Keycode +//! \brief Enumeration for keyboard key inputs, including printable characters, function keys, and keypad keys. enum class Keycode : int { - NONE = 0, - SPACE = 32, - APOSTROPHE = 39, /* ' */ - COMMA = 44, /* , */ - MINUS = 45, /* - */ - PERIOD = 46, /* . */ - SLASH = 47, /* / */ - - D0 = 48, /* 0 */ - D1 = 49, /* 1 */ - D2 = 50, /* 2 */ - D3 = 51, /* 3 */ - D4 = 52, /* 4 */ - D5 = 53, /* 5 */ - D6 = 54, /* 6 */ - D7 = 55, /* 7 */ - D8 = 56, /* 8 */ - D9 = 57, /* 9 */ - - SEMICOLON = 59, /* ; */ - EQUAL = 61, /* = */ - - A = 65, - B = 66, - C = 67, - D = 68, - E = 69, - F = 70, - G = 71, - H = 72, - I = 73, - J = 74, - K = 75, - L = 76, - M = 77, - N = 78, - O = 79, - P = 80, - Q = 81, - R = 82, - S = 83, - T = 84, - U = 85, - V = 86, - W = 87, - X = 88, - Y = 89, - Z = 90, - - LEFT_BRACKET = 91, /* [ */ - BACKSLASH = 92, /* \ */ - RIGHT_BRACKET = 93, /* ] */ - GRAVE_ACCENT = 96, /* ` */ - - WORLD1 = 161, /* non-US #1 */ - WORLD2 = 162, /* non-US #2 */ - - /* Function keys */ - ESCAPE = 256, - ENTER = 257, - TAB = 258, - BACKSPACE = 259, - INSERT = 260, - DELETE = 261, - RIGHT = 262, - LEFT = 263, - DOWN = 264, - UP = 265, - PAGE_UP = 266, - PAGE_DOWN = 267, - HOME = 268, - END = 269, - CAPS_LOCK = 280, - SCROLL_LOCK = 281, - NUM_LOCK = 282, - PRINT_SCREEN = 283, - PAUSE = 284, - F1 = 290, - F2 = 291, - F3 = 292, - F4 = 293, - F5 = 294, - F6 = 295, - F7 = 296, - F8 = 297, - F9 = 298, - F10 = 299, - F11 = 300, - F12 = 301, - F13 = 302, - F14 = 303, - F15 = 304, - F16 = 305, - F17 = 306, - F18 = 307, - F19 = 308, - F20 = 309, - F21 = 310, - F22 = 311, - F23 = 312, - F24 = 313, - F25 = 314, - - /* Keypad */ - KP0 = 320, - KP1 = 321, - KP2 = 322, - KP3 = 323, - KP4 = 324, - KP5 = 325, - KP6 = 326, - KP7 = 327, - KP8 = 328, - KP9 = 329, - KP_DECIMAL = 330, - KP_DIVIDE = 331, - KP_MULTIPLY = 332, - KP_SUBTRACT = 333, - KP_ADD = 334, - KP_ENTER = 335, - KP_EQUAL = 336, - - LEFT_SHIFT = 340, - LEFT_CONTROL = 341, - LEFT_ALT = 342, - LEFT_SUPER = 343, - RIGHT_SHIFT = 344, - RIGHT_CONTROL = 345, - RIGHT_ALT = 346, - RIGHT_SUPER = 347, - MENU = 348 + //! No key input. + NONE = 0, + //! Spacebar. + SPACE = 32, + //! Apostrophe ('). + APOSTROPHE = 39, + //! Comma (,). + COMMA = 44, + //! Minus (-). + MINUS = 45, + //! Period (.). + PERIOD = 46, + //! Slash (/). + SLASH = 47, + //! Digit 0. + D0 = 48, + //! Digit 1. + D1 = 49, + //! Digit 2. + D2 = 50, + //! Digit 3. + D3 = 51, + //! Digit 4. + D4 = 52, + //! Digit 5. + D5 = 53, + //! Digit 6. + D6 = 54, + //! Digit 7. + D7 = 55, + //! Digit 8. + D8 = 56, + //! Digit 9. + D9 = 57, + //! Semicolon (;). + SEMICOLON = 59, + //! Equal sign (=). + EQUAL = 61, + //! Key 'A'. + A = 65, + //! Key 'B'. + B = 66, + //! Key 'C'. + C = 67, + //! Key 'D'. + D = 68, + //! Key 'E'. + E = 69, + //! Key 'F'. + F = 70, + //! Key 'G'. + G = 71, + //! Key 'H'. + H = 72, + //! Key 'I'. + I = 73, + //! Key 'J'. + J = 74, + //! Key 'K'. + K = 75, + //! Key 'L'. + L = 76, + //! Key 'M'. + M = 77, + //! Key 'N'. + N = 78, + //! Key 'O'. + O = 79, + //! Key 'P'. + P = 80, + //! Key 'Q'. + Q = 81, + //! Key 'R'. + R = 82, + //! Key 'S'. + S = 83, + //! Key 'T'. + T = 84, + //! Key 'U'. + U = 85, + //! Key 'V'. + V = 86, + //! Key 'W'. + W = 87, + //! Key 'X'. + X = 88, + //! Key 'Y'. + Y = 89, + //! Key 'Z'. + Z = 90, + //! Left bracket ([). + LEFT_BRACKET = 91, + //! Backslash (\). + BACKSLASH = 92, + //! Right bracket (]). + RIGHT_BRACKET = 93, + //! Grave accent (`). + GRAVE_ACCENT = 96, + //! Non-US key #1. + WORLD1 = 161, + //! Non-US key #2. + WORLD2 = 162, + //! Escape key. + ESCAPE = 256, + //! Enter key. + ENTER = 257, + //! Tab key. + TAB = 258, + //! Backspace key. + BACKSPACE = 259, + //! Insert key. + INSERT = 260, + //! Delete key. + DELETE = 261, + //! Right arrow key. + RIGHT = 262, + //! Left arrow key. + LEFT = 263, + //! Down arrow key. + DOWN = 264, + //! Up arrow key. + UP = 265, + //! Page Up key. + PAGE_UP = 266, + //! Page Down key. + PAGE_DOWN = 267, + //! Home key. + HOME = 268, + //! End key. + END = 269, + //! Caps Lock key. + CAPS_LOCK = 280, + //! Scroll Lock key. + SCROLL_LOCK = 281, + //! Num Lock key. + NUM_LOCK = 282, + //! Print Screen key. + PRINT_SCREEN = 283, + //! Pause key. + PAUSE = 284, + //! Function keys (F1-F25). + F1 = 290, F2 = 291, F3 = 292, F4 = 293, F5 = 294, + F6 = 295, F7 = 296, F8 = 297, F9 = 298, F10 = 299, + F11 = 300, F12 = 301, F13 = 302, F14 = 303, F15 = 304, + F16 = 305, F17 = 306, F18 = 307, F19 = 308, F20 = 309, + F21 = 310, F22 = 311, F23 = 312, F24 = 313, F25 = 314, + //! Keypad digits and operators. + KP0 = 320, KP1 = 321, KP2 = 322, KP3 = 323, KP4 = 324, + KP5 = 325, KP6 = 326, KP7 = 327, KP8 = 328, KP9 = 329, + KP_DECIMAL = 330, KP_DIVIDE = 331, KP_MULTIPLY = 332, + KP_SUBTRACT = 333, KP_ADD = 334, KP_ENTER = 335, KP_EQUAL = 336, + //! Modifier keys. + LEFT_SHIFT = 340, LEFT_CONTROL = 341, LEFT_ALT = 342, LEFT_SUPER = 343, + RIGHT_SHIFT = 344, RIGHT_CONTROL = 345, RIGHT_ALT = 346, RIGHT_SUPER = 347, + //! Menu key. + MENU = 348 }; |