1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Adding function key support from F17 to F35

OSX supports everything by default,
Linux is also capable of supporting every function key,
Windows as I know support only up to F24
This commit is contained in:
gregcsokas
2022-06-13 18:44:44 +02:00
parent 1767507e69
commit 42e619c01e
7 changed files with 311 additions and 102 deletions

View File

@@ -135,6 +135,25 @@ static _XTranslatePair _xkeysym_to_keycode[] = {
{ XK_F14, Key::F14 },
{ XK_F15, Key::F15 },
{ XK_F16, Key::F16 },
{ XK_F17, Key::F17 },
{ XK_F18, Key::F18 },
{ XK_F19, Key::F19 },
{ XK_F20, Key::F20 },
{ XK_F21, Key::F21 },
{ XK_F22, Key::F22 },
{ XK_F23, Key::F23 },
{ XK_F24, Key::F24 },
{ XK_F25, Key::F25 },
{ XK_F26, Key::F26 },
{ XK_F27, Key::F27 },
{ XK_F28, Key::F28 },
{ XK_F29, Key::F29 },
{ XK_F30, Key::F30 },
{ XK_F31, Key::F31 },
{ XK_F32, Key::F32 },
{ XK_F33, Key::F33 },
{ XK_F34, Key::F34 },
{ XK_F35, Key::F35 },
// media keys
{ XF86XK_Back, Key::BACK },
@@ -294,6 +313,29 @@ static _TranslatePair _scancode_to_keycode[] = {
{ Key::SUPER_L, 0x85 },
{ Key::SUPER_R, 0x86 },
{ Key::MENU, 0x87 },
{ Key::F13, 0xBF },
{ Key::F14, 0xC0 },
{ Key::F15, 0xC1 },
{ Key::F16, 0xC2 },
{ Key::F17, 0xC3 },
{ Key::F18, 0xC4 },
{ Key::F19, 0xC5 },
{ Key::F20, 0xC6 },
{ Key::F21, 0xC7 },
{ Key::F22, 0xC8 },
{ Key::F23, 0xC9 },
{ Key::F24, 0xCA },
{ Key::F25, 0xCB },
{ Key::F26, 0xCC },
{ Key::F27, 0xCD },
{ Key::F28, 0xCE },
{ Key::F29, 0xCF },
{ Key::F30, 0xD0 },
{ Key::F31, 0xD1 },
{ Key::F32, 0xD2 },
{ Key::F33, 0xD3 },
{ Key::F34, 0xD4 },
{ Key::F35, 0xD5 },
{ Key::UNKNOWN, 0 }
};