Merge branch 'main' into SP3-6-c-scripting
This commit is contained in:
commit
b7aca5b118
|
@ -31,9 +31,158 @@ namespace SHADE
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the available supported keycodes that can be passed into the
|
/// Represents the available supported keycodes that can be passed into the
|
||||||
/// key-based Input functions.
|
/// key-based Input functions.
|
||||||
|
///
|
||||||
|
/// Attempting to follow https://docs.unity3d.com/ScriptReference/KeyCode.html
|
||||||
|
/// Win32 keycodes are shift-insensitive, i.e. 'A' and 'a' are the same keycode and '1' and '!' are the same keycode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
enum class KeyCode : int
|
enum class KeyCode : int
|
||||||
{
|
{
|
||||||
|
Backspace = static_cast<int>(SHInputManager::SH_KEYCODE::BACKSPACE),
|
||||||
|
Delete = static_cast<int>(SHInputManager::SH_KEYCODE::DEL),
|
||||||
|
Tab = static_cast<int>(SHInputManager::SH_KEYCODE::TAB),
|
||||||
|
Clear = static_cast<int>(SHInputManager::SH_KEYCODE::CLEAR),
|
||||||
|
Return = static_cast<int>(SHInputManager::SH_KEYCODE::ENTER),
|
||||||
|
Pause = static_cast<int>(SHInputManager::SH_KEYCODE::PAUSE),
|
||||||
|
Escape = static_cast<int>(SHInputManager::SH_KEYCODE::ESCAPE),
|
||||||
|
Space = static_cast<int>(SHInputManager::SH_KEYCODE::SPACE),
|
||||||
|
Keypad0 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_0),
|
||||||
|
Keypad1 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_1),
|
||||||
|
Keypad2 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_2),
|
||||||
|
Keypad3 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_3),
|
||||||
|
Keypad4 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_4),
|
||||||
|
Keypad5 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_5),
|
||||||
|
Keypad6 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_6),
|
||||||
|
Keypad7 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_7),
|
||||||
|
Keypad8 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_8),
|
||||||
|
Keypad9 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMPAD_9),
|
||||||
|
KeypadPeriod = static_cast<int>(SHInputManager::SH_KEYCODE::DECIMAL),
|
||||||
|
KeypadDivide = static_cast<int>(SHInputManager::SH_KEYCODE::DIVIDE),
|
||||||
|
KeypadMultiply = static_cast<int>(SHInputManager::SH_KEYCODE::MULTIPLY),
|
||||||
|
KeypadMinus = static_cast<int>(SHInputManager::SH_KEYCODE::SUBTRACT),
|
||||||
|
KeypadPlus = static_cast<int>(SHInputManager::SH_KEYCODE::ADD),
|
||||||
|
KeypadEnter = static_cast<int>(SHInputManager::SH_KEYCODE::ENTER),
|
||||||
|
//KeypadEquals
|
||||||
|
UpArrow = static_cast<int>(SHInputManager::SH_KEYCODE::UP_ARROW),
|
||||||
|
DownArrow = static_cast<int>(SHInputManager::SH_KEYCODE::DOWN_ARROW),
|
||||||
|
RightArrow = static_cast<int>(SHInputManager::SH_KEYCODE::RIGHT_ARROW),
|
||||||
|
LeftArrow = static_cast<int>(SHInputManager::SH_KEYCODE::LEFT_ARROW),
|
||||||
|
Insert = static_cast<int>(SHInputManager::SH_KEYCODE::INSERT),
|
||||||
|
Home = static_cast<int>(SHInputManager::SH_KEYCODE::HOME),
|
||||||
|
End = static_cast<int>(SHInputManager::SH_KEYCODE::END),
|
||||||
|
PageUp = static_cast<int>(SHInputManager::SH_KEYCODE::PAGE_UP),
|
||||||
|
PageDown = static_cast<int>(SHInputManager::SH_KEYCODE::PAGE_DOWN),
|
||||||
|
F1 = static_cast<int>(SHInputManager::SH_KEYCODE::F1),
|
||||||
|
F2 = static_cast<int>(SHInputManager::SH_KEYCODE::F2),
|
||||||
|
F3 = static_cast<int>(SHInputManager::SH_KEYCODE::F3),
|
||||||
|
F4 = static_cast<int>(SHInputManager::SH_KEYCODE::F4),
|
||||||
|
F5 = static_cast<int>(SHInputManager::SH_KEYCODE::F5),
|
||||||
|
F6 = static_cast<int>(SHInputManager::SH_KEYCODE::F6),
|
||||||
|
F7 = static_cast<int>(SHInputManager::SH_KEYCODE::F7),
|
||||||
|
F8 = static_cast<int>(SHInputManager::SH_KEYCODE::F8),
|
||||||
|
F9 = static_cast<int>(SHInputManager::SH_KEYCODE::F9),
|
||||||
|
F10 = static_cast<int>(SHInputManager::SH_KEYCODE::F10),
|
||||||
|
F11 = static_cast<int>(SHInputManager::SH_KEYCODE::F11),
|
||||||
|
F12 = static_cast<int>(SHInputManager::SH_KEYCODE::F12),
|
||||||
|
F13 = static_cast<int>(SHInputManager::SH_KEYCODE::F13),
|
||||||
|
F14 = static_cast<int>(SHInputManager::SH_KEYCODE::F14),
|
||||||
|
F15 = static_cast<int>(SHInputManager::SH_KEYCODE::F15),
|
||||||
|
F16 = static_cast<int>(SHInputManager::SH_KEYCODE::F16),
|
||||||
|
F17 = static_cast<int>(SHInputManager::SH_KEYCODE::F17),
|
||||||
|
F18 = static_cast<int>(SHInputManager::SH_KEYCODE::F18),
|
||||||
|
F19 = static_cast<int>(SHInputManager::SH_KEYCODE::F19),
|
||||||
|
F20 = static_cast<int>(SHInputManager::SH_KEYCODE::F20),
|
||||||
|
F21 = static_cast<int>(SHInputManager::SH_KEYCODE::F21),
|
||||||
|
F22 = static_cast<int>(SHInputManager::SH_KEYCODE::F22),
|
||||||
|
F23 = static_cast<int>(SHInputManager::SH_KEYCODE::F23),
|
||||||
|
F24 = static_cast<int>(SHInputManager::SH_KEYCODE::F24),
|
||||||
|
Alpha0 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_0),
|
||||||
|
Alpha1 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_1),
|
||||||
|
Alpha2 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_2),
|
||||||
|
Alpha3 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_3),
|
||||||
|
Alpha4 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_4),
|
||||||
|
Alpha5 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_5),
|
||||||
|
Alpha6 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_6),
|
||||||
|
Alpha7 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_7),
|
||||||
|
Alpha8 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_8),
|
||||||
|
Alpha9 = static_cast<int>(SHInputManager::SH_KEYCODE::NUMBER_9),
|
||||||
|
//Exclaim
|
||||||
|
//DoubleQuote
|
||||||
|
//Hash
|
||||||
|
//Dollar
|
||||||
|
//Percent
|
||||||
|
//Ampersand
|
||||||
|
Quote = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_7),
|
||||||
|
//LeftParen
|
||||||
|
//RightParen
|
||||||
|
//Asterisk
|
||||||
|
//Plus
|
||||||
|
Comma = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_COMMA),
|
||||||
|
Minus = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_MINUS),
|
||||||
|
Period = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_PERIOD),
|
||||||
|
Slash = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_2),
|
||||||
|
//Colon
|
||||||
|
Semicolon = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_1),
|
||||||
|
//Less
|
||||||
|
Equals = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_PLUS),
|
||||||
|
//Greater
|
||||||
|
//Question
|
||||||
|
//At
|
||||||
|
LeftBracket = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_4),
|
||||||
|
Backslash = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_5),
|
||||||
|
RightBracket = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_6),
|
||||||
|
//Caret
|
||||||
|
//Underscore
|
||||||
|
BackQuote = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_3),
|
||||||
|
A = static_cast<int>(SHInputManager::SH_KEYCODE::A),
|
||||||
|
B = static_cast<int>(SHInputManager::SH_KEYCODE::B),
|
||||||
|
C = static_cast<int>(SHInputManager::SH_KEYCODE::C),
|
||||||
|
D = static_cast<int>(SHInputManager::SH_KEYCODE::D),
|
||||||
|
E = static_cast<int>(SHInputManager::SH_KEYCODE::E),
|
||||||
|
F = static_cast<int>(SHInputManager::SH_KEYCODE::F),
|
||||||
|
G = static_cast<int>(SHInputManager::SH_KEYCODE::G),
|
||||||
|
H = static_cast<int>(SHInputManager::SH_KEYCODE::H),
|
||||||
|
I = static_cast<int>(SHInputManager::SH_KEYCODE::I),
|
||||||
|
J = static_cast<int>(SHInputManager::SH_KEYCODE::J),
|
||||||
|
K = static_cast<int>(SHInputManager::SH_KEYCODE::K),
|
||||||
|
L = static_cast<int>(SHInputManager::SH_KEYCODE::L),
|
||||||
|
M = static_cast<int>(SHInputManager::SH_KEYCODE::M),
|
||||||
|
N = static_cast<int>(SHInputManager::SH_KEYCODE::N),
|
||||||
|
O = static_cast<int>(SHInputManager::SH_KEYCODE::O),
|
||||||
|
P = static_cast<int>(SHInputManager::SH_KEYCODE::P),
|
||||||
|
Q = static_cast<int>(SHInputManager::SH_KEYCODE::Q),
|
||||||
|
R = static_cast<int>(SHInputManager::SH_KEYCODE::R),
|
||||||
|
S = static_cast<int>(SHInputManager::SH_KEYCODE::S),
|
||||||
|
T = static_cast<int>(SHInputManager::SH_KEYCODE::T),
|
||||||
|
U = static_cast<int>(SHInputManager::SH_KEYCODE::U),
|
||||||
|
V = static_cast<int>(SHInputManager::SH_KEYCODE::V),
|
||||||
|
W = static_cast<int>(SHInputManager::SH_KEYCODE::W),
|
||||||
|
X = static_cast<int>(SHInputManager::SH_KEYCODE::X),
|
||||||
|
Y = static_cast<int>(SHInputManager::SH_KEYCODE::Y),
|
||||||
|
Z = static_cast<int>(SHInputManager::SH_KEYCODE::Z),
|
||||||
|
//LeftCurlyBracket
|
||||||
|
//Pipe
|
||||||
|
//RightCurlyBracket
|
||||||
|
//Tilde
|
||||||
|
NumLock = static_cast<int>(SHInputManager::SH_KEYCODE::NUM_LOCK),
|
||||||
|
CapsLock = static_cast<int>(SHInputManager::SH_KEYCODE::CAPS_LOCK),
|
||||||
|
ScrollLock = static_cast<int>(SHInputManager::SH_KEYCODE::SCROLL_LOCK),
|
||||||
|
RightShift = static_cast<int>(SHInputManager::SH_KEYCODE::RIGHT_SHIFT),
|
||||||
|
LeftShift = static_cast<int>(SHInputManager::SH_KEYCODE::LEFT_SHIFT),
|
||||||
|
RightControl = static_cast<int>(SHInputManager::SH_KEYCODE::RIGHT_CTRL),
|
||||||
|
LeftControl = static_cast<int>(SHInputManager::SH_KEYCODE::LEFT_CTRL),
|
||||||
|
RightAlt = static_cast<int>(SHInputManager::SH_KEYCODE::RIGHT_ALT),
|
||||||
|
LeftAlt = static_cast<int>(SHInputManager::SH_KEYCODE::LEFT_ALT),
|
||||||
|
LeftWindows = static_cast<int>(SHInputManager::SH_KEYCODE::LEFT_WINDOWS),
|
||||||
|
RightWindows = static_cast<int>(SHInputManager::SH_KEYCODE::RIGHT_WINDOWS),
|
||||||
|
//AltGr
|
||||||
|
Help = static_cast<int>(SHInputManager::SH_KEYCODE::HELP),
|
||||||
|
Print = static_cast<int>(SHInputManager::SH_KEYCODE::PRINT),
|
||||||
|
SysReq = static_cast<int>(SHInputManager::SH_KEYCODE::PRINT_SCREEN),
|
||||||
|
//Break
|
||||||
|
//Menu
|
||||||
|
//Mouse buttons use mouse codes, which are enums declared later
|
||||||
|
//TODO Controller input
|
||||||
|
#if 0
|
||||||
Space = static_cast<int>(SHInputManager::SH_KEYCODE::SPACE),
|
Space = static_cast<int>(SHInputManager::SH_KEYCODE::SPACE),
|
||||||
//Apostrophe = static_cast<int>(SHInputManager::SH_KEYCODE::APOSTROPHE),
|
//Apostrophe = static_cast<int>(SHInputManager::SH_KEYCODE::APOSTROPHE),
|
||||||
Comma = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_COMMA),
|
Comma = static_cast<int>(SHInputManager::SH_KEYCODE::OEM_COMMA),
|
||||||
|
@ -191,6 +340,7 @@ namespace SHADE
|
||||||
JoystickButton7 = JoystickMenu,
|
JoystickButton7 = JoystickMenu,
|
||||||
JoystickButton8 = JoystickLeftStick,
|
JoystickButton8 = JoystickLeftStick,
|
||||||
JoystickButton9 = JoystickRightStick
|
JoystickButton9 = JoystickRightStick
|
||||||
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue