Skip to content

Commit

Permalink
Updating input map with Plasma key keys
Browse files Browse the repository at this point in the history
  • Loading branch information
colincornaby committed Aug 7, 2023
1 parent eaf4f77 commit 8db844b
Showing 1 changed file with 94 additions and 119 deletions.
213 changes: 94 additions & 119 deletions Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,125 +695,100 @@ void plKeyMap::ICheckAndBindDupe(plKeyDef origKey, plKeyDef dupeKey)

const std::map<uint32_t, ST::string> plKeyMap::fKeyConversionEnglish =
{
#ifdef HS_BUILD_FOR_WIN32
{ VK_F1, ST_LITERAL("F1") },
{ VK_F2, ST_LITERAL("F2") },
{ VK_F3, ST_LITERAL("F3") },
{ VK_F4, ST_LITERAL("F4") },
{ VK_F5, ST_LITERAL("F5") },
{ VK_F6, ST_LITERAL("F6") },
{ VK_F7, ST_LITERAL("F7") },
{ VK_F8, ST_LITERAL("F8") },
{ VK_F9, ST_LITERAL("F9") },
{ VK_F10, ST_LITERAL("F10") },
{ VK_F11, ST_LITERAL("F11") },
{ VK_F12, ST_LITERAL("F12") },
{ VK_ESCAPE, ST_LITERAL("Esc") },
{ VK_TAB, ST_LITERAL("Tab") },
{ VK_UP, ST_LITERAL("UpArrow") },
{ VK_DOWN, ST_LITERAL("DownArrow") },
{ VK_LEFT, ST_LITERAL("LeftArrow") },
{ VK_RIGHT, ST_LITERAL("RightArrow") },
{ VK_BACK, ST_LITERAL("Backspace") },
{ VK_RETURN, ST_LITERAL("Enter") },
{ VK_PAUSE, ST_LITERAL("Pause") },
{ VK_CAPITAL, ST_LITERAL("CapsLock") },
{ VK_PRIOR, ST_LITERAL("PageUp") },
{ VK_NEXT, ST_LITERAL("PageDn") },
{ VK_END, ST_LITERAL("End") },
{ VK_HOME, ST_LITERAL("Home") },
{ VK_SNAPSHOT, ST_LITERAL("PrintScrn") },
{ VK_INSERT, ST_LITERAL("Insert") },
{ VK_DELETE, ST_LITERAL("Delete") },
{ VK_NUMPAD0, ST_LITERAL("NumPad0") },
{ VK_NUMPAD1, ST_LITERAL("NumPad1") },
{ VK_NUMPAD2, ST_LITERAL("NumPad2") },
{ VK_NUMPAD3, ST_LITERAL("NumPad3") },
{ VK_NUMPAD4, ST_LITERAL("NumPad4") },
{ VK_NUMPAD5, ST_LITERAL("NumPad5") },
{ VK_NUMPAD6, ST_LITERAL("NumPad6") },
{ VK_NUMPAD7, ST_LITERAL("NumPad7") },
{ VK_NUMPAD8, ST_LITERAL("NumPad8") },
{ VK_NUMPAD9, ST_LITERAL("NumPad9") },
{ VK_MULTIPLY, ST_LITERAL("NumPad*") },
{ VK_ADD, ST_LITERAL("NumPad+") },
{ VK_SUBTRACT, ST_LITERAL("NumPad-") },
{ VK_DECIMAL, ST_LITERAL("NumPad.") },
{ VK_DIVIDE, ST_LITERAL("NumPad/") },
{ VK_SPACE, ST_LITERAL("SpaceBar") },
{ VK_OEM_COMMA, ST_LITERAL("Comma") },
{ VK_OEM_PERIOD,ST_LITERAL("Period") },
{ VK_OEM_MINUS, ST_LITERAL("Minus") },
{ VK_OEM_PLUS, ST_LITERAL("Plus") },
{ VK_SHIFT, ST_LITERAL("Shift") },
// not valid outside USA
{ VK_OEM_1, ST_LITERAL("Semicolon") },
{ VK_OEM_2, ST_LITERAL("ForewardSlash") },
{ VK_OEM_3, ST_LITERAL("Tilde") },
{ VK_OEM_4, ST_LITERAL("LeftBracket") },
{ VK_OEM_5, ST_LITERAL("Backslash") },
{ VK_OEM_6, ST_LITERAL("RightBracket") },
{ VK_OEM_7, ST_LITERAL("Quote") },
#elif HS_BUILD_FOR_APPLE
{ kVK_F1, "F1"},
{ kVK_F2, "F2"},
{ kVK_F3, "F3"},
{ kVK_F4, "F4"},
{ kVK_F5, "F5"},
{ kVK_F6, "F6"},
{ kVK_F7, "F7"},
{ kVK_F8, "F8"},
{ kVK_F9, "F9"},
{ kVK_F10, "F10"},
{ kVK_F11, "F11"},
{ kVK_F12, "F12"},
{ kVK_Escape, "Esc"},
{ kVK_Tab, "Tab"},
{ kVK_UpArrow, "UpArrow"},
{ kVK_DownArrow, "DownArrow"},
{ kVK_LeftArrow, "LeftArrow"},
{ kVK_RightArrow, "RightArrow"},
{ kVK_Delete, "Backspace"},
{ kVK_Return, "Enter"},
{ kVK_F15, "Pause"},
{ kVK_CapsLock, "CapsLock"},
{ kVK_PageUp, "PageUp"},
{ kVK_PageDown, "PageDn"},
{ kVK_End, "End"},
{ kVK_Home, "Home"},
{ kVK_F13, "PrintScrn"},
{ kVK_Help, "Insert"},
{ kVK_Delete, "Delete"},
{ kVK_ANSI_Keypad0, "NumPad0"},
{ kVK_ANSI_Keypad1, "NumPad1"},
{ kVK_ANSI_Keypad2, "NumPad2"},
{ kVK_ANSI_Keypad3, "NumPad3"},
{ kVK_ANSI_Keypad4, "NumPad4"},
{ kVK_ANSI_Keypad5, "NumPad5"},
{ kVK_ANSI_Keypad6, "NumPad6"},
{ kVK_ANSI_Keypad7, "NumPad7"},
{ kVK_ANSI_Keypad8, "NumPad8"},
{ kVK_ANSI_Keypad9, "NumPad9"},
{ kVK_ANSI_KeypadMultiply, "NumPad*"},
{ kVK_ANSI_KeypadPlus, "NumPad+"},
{ kVK_ANSI_KeypadMinus, "NumPad-"},
{ kVK_ANSI_KeypadDecimal, "NumPad."},
{ kVK_ANSI_KeypadDivide, "NumPad/"},
{ kVK_Space, "SpaceBar"},
{ kVK_ANSI_Comma, "Comma"},
{ kVK_ANSI_Period,"Period"},
{ kVK_ANSI_Minus, "Minus"},
{ kVK_ANSI_Equal, "Plus"},
{ kVK_Shift, "Shift" },
// not valid outside USA
{ kVK_ANSI_Semicolon, "Semicolon"},
{ kVK_ANSI_Slash, "ForewardSlash"},
{ kVK_ANSI_Grave, "Tilde"},
{ kVK_ANSI_LeftBracket, "LeftBracket"},
{ kVK_ANSI_Backslash, "Backslash"},
{ kVK_ANSI_RightBracket, "RightBracket"},
{ kVK_ANSI_Quote, "Quote"},
#endif
{ KEY_A, ST_LITERAL("A")},
{ KEY_B, ST_LITERAL("B")},
{ KEY_C, ST_LITERAL("C")},
{ KEY_D, ST_LITERAL("D")},
{ KEY_E, ST_LITERAL("E")},
{ KEY_F, ST_LITERAL("F")},
{ KEY_G, ST_LITERAL("G")},
{ KEY_H, ST_LITERAL("H")},
{ KEY_I, ST_LITERAL("I")},
{ KEY_J, ST_LITERAL("J")},
{ KEY_K, ST_LITERAL("K")},
{ KEY_L, ST_LITERAL("L")},
{ KEY_M, ST_LITERAL("M")},
{ KEY_N, ST_LITERAL("N")},
{ KEY_O, ST_LITERAL("O")},
{ KEY_P, ST_LITERAL("P")},
{ KEY_Q, ST_LITERAL("Q")},
{ KEY_R, ST_LITERAL("R")},
{ KEY_S, ST_LITERAL("S")},
{ KEY_T, ST_LITERAL("T")},
{ KEY_U, ST_LITERAL("U")},
{ KEY_V, ST_LITERAL("V")},
{ KEY_W, ST_LITERAL("W")},
{ KEY_X, ST_LITERAL("X")},
{ KEY_Y, ST_LITERAL("Y")},
{ KEY_Z, ST_LITERAL("Z")},
{ KEY_1, ST_LITERAL("1")},
{ KEY_2, ST_LITERAL("2")},
{ KEY_3, ST_LITERAL("3")},
{ KEY_4, ST_LITERAL("4")},
{ KEY_5, ST_LITERAL("5")},
{ KEY_6, ST_LITERAL("6")},
{ KEY_7, ST_LITERAL("7")},
{ KEY_8, ST_LITERAL("8")},
{ KEY_9, ST_LITERAL("9")},
{ KEY_0, ST_LITERAL("0")},
{ KEY_F1, ST_LITERAL("F1")},
{ KEY_F2, ST_LITERAL("F2")},
{ KEY_F3, ST_LITERAL("F3")},
{ KEY_F4, ST_LITERAL("F4")},
{ KEY_F5, ST_LITERAL("F5")},
{ KEY_F6, ST_LITERAL("F6")},
{ KEY_F7, ST_LITERAL("F7")},
{ KEY_F8, ST_LITERAL("F8")},
{ KEY_F9, ST_LITERAL("F9")},
{ KEY_F10, ST_LITERAL("F10")},
{ KEY_F11, ST_LITERAL("F11")},
{ KEY_F12, ST_LITERAL("F12")},
{ KEY_ESCAPE, ST_LITERAL("Esc")},
{ KEY_TAB, ST_LITERAL("Tab")},
{ KEY_UP, ST_LITERAL("UpArrow")},
{ KEY_DOWN, ST_LITERAL("DownArrow")},
{ KEY_LEFT, ST_LITERAL("LeftArrow")},
{ KEY_RIGHT, ST_LITERAL("RightArrow")},
{ KEY_BACKSPACE, ST_LITERAL("Backspace")},
{ KEY_ENTER, ST_LITERAL("Enter")},
{ KEY_PAUSE, ST_LITERAL("Pause")},
{ KEY_CAPSLOCK, ST_LITERAL("CapsLock")},
{ KEY_PAGEUP, ST_LITERAL("PageUp")},
{ KEY_PAGEDOWN, ST_LITERAL("PageDn")},
{ KEY_END, ST_LITERAL("End")},
{ KEY_HOME, ST_LITERAL("Home")},
{ KEY_PRINTSCREEN, ST_LITERAL("PrintScrn")},
{ KEY_INSERT, ST_LITERAL("Insert")},
{ KEY_DELETE, ST_LITERAL("Delete")},
{ KEY_NUMPAD0, ST_LITERAL("NumPad0")},
{ KEY_NUMPAD1, ST_LITERAL("NumPad1")},
{ KEY_NUMPAD2, ST_LITERAL("NumPad2")},
{ KEY_NUMPAD3, ST_LITERAL("NumPad3")},
{ KEY_NUMPAD4, ST_LITERAL("NumPad4")},
{ KEY_NUMPAD5, ST_LITERAL("NumPad5")},
{ KEY_NUMPAD6, ST_LITERAL("NumPad6")},
{ KEY_NUMPAD7, ST_LITERAL("NumPad7")},
{ KEY_NUMPAD8, ST_LITERAL("NumPad8")},
{ KEY_NUMPAD9, ST_LITERAL("NumPad9")},
{ KEY_NUMPAD_MULTIPLY, ST_LITERAL("NumPad*")},
{ KEY_NUMPAD_ADD, ST_LITERAL("NumPad+")},
{ KEY_NUMPAD_SUBTRACT, ST_LITERAL("NumPad-")},
{ KEY_NUMPAD_PERIOD, ST_LITERAL("NumPad.")},
{ KEY_NUMPAD_DIVIDE, ST_LITERAL("NumPad/")},
{ KEY_SPACE, ST_LITERAL("SpaceBar")},
{ KEY_COMMA, ST_LITERAL("Comma")},
{ KEY_PERIOD, ST_LITERAL("Period")},
{ KEY_DASH, ST_LITERAL("Minus")},
{ KEY_EQUAL, ST_LITERAL("Plus")},
{ KEY_SHIFT, ST_LITERAL("Shift")},
{ KEY_SEMICOLON, ST_LITERAL("Semicolon")},
{ KEY_SLASH, ST_LITERAL("ForewardSlash")},
{ KEY_TILDE, ST_LITERAL("Tilde")},
{ KEY_LBRACKET, ST_LITERAL("LeftBracket")},
{ KEY_BACKSLASH, ST_LITERAL("Backslash")},
{ KEY_RBRACKET, ST_LITERAL("RightBracket")},
{ KEY_QUOTE, ST_LITERAL("Quote")},
{ 0xffffffff, ST_LITERAL("Unused")},
};

const std::map<uint32_t, ST::string> plKeyMap::fKeyConversionFrench =
Expand Down

0 comments on commit 8db844b

Please sign in to comment.