summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/core_constants.cpp19
-rw-r--r--core/os/keyboard.cpp38
-rw-r--r--core/os/keyboard.h115
-rw-r--r--doc/classes/@GlobalScope.xml153
-rw-r--r--platform/linuxbsd/key_mapping_x11.cpp42
-rw-r--r--platform/osx/key_mapping_osx.mm29
-rw-r--r--platform/windows/key_mapping_windows.cpp17
7 files changed, 311 insertions, 102 deletions
diff --git a/core/core_constants.cpp b/core/core_constants.cpp
index 4f22c99656..eb5a8226d7 100644
--- a/core/core_constants.cpp
+++ b/core/core_constants.cpp
@@ -213,6 +213,25 @@ void register_global_constants() {
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F14);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F15);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F16);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F17);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F18);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F19);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F20);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F21);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F22);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F23);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F24);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F25);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F26);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F27);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F28);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F29);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F30);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F31);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F32);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F33);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F34);
+ BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, F35);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, KP_MULTIPLY);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, KP_DIVIDE);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, KP_SUBTRACT);
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp
index 24907d34c8..3e690991d9 100644
--- a/core/os/keyboard.cpp
+++ b/core/os/keyboard.cpp
@@ -86,6 +86,25 @@ static const _KeyCodeText _keycodes[] = {
{Key::F14 ,"F14"},
{Key::F15 ,"F15"},
{Key::F16 ,"F16"},
+ {Key::F17 ,"F17"},
+ {Key::F18 ,"F18"},
+ {Key::F19 ,"F19"},
+ {Key::F20 ,"F20"},
+ {Key::F21 ,"F21"},
+ {Key::F22 ,"F22"},
+ {Key::F23 ,"F23"},
+ {Key::F24 ,"F24"},
+ {Key::F25 ,"F25"},
+ {Key::F26 ,"F26"},
+ {Key::F27 ,"F27"},
+ {Key::F28 ,"F28"},
+ {Key::F29 ,"F29"},
+ {Key::F30 ,"F30"},
+ {Key::F31 ,"F31"},
+ {Key::F32 ,"F32"},
+ {Key::F33 ,"F33"},
+ {Key::F34 ,"F34"},
+ {Key::F35 ,"F35"},
{Key::KP_MULTIPLY ,"Kp Multiply"},
{Key::KP_DIVIDE ,"Kp Divide"},
{Key::KP_SUBTRACT ,"Kp Subtract"},
@@ -333,6 +352,25 @@ bool keycode_has_unicode(Key p_keycode) {
case Key::F14:
case Key::F15:
case Key::F16:
+ case Key::F17:
+ case Key::F18:
+ case Key::F19:
+ case Key::F20:
+ case Key::F21:
+ case Key::F22:
+ case Key::F23:
+ case Key::F24:
+ case Key::F25:
+ case Key::F26:
+ case Key::F27:
+ case Key::F28:
+ case Key::F29:
+ case Key::F30:
+ case Key::F31:
+ case Key::F32:
+ case Key::F33:
+ case Key::F34:
+ case Key::F35:
case Key::SUPER_L:
case Key::SUPER_R:
case Key::MENU:
diff --git a/core/os/keyboard.h b/core/os/keyboard.h
index 3176a8a210..517a53e505 100644
--- a/core/os/keyboard.h
+++ b/core/os/keyboard.h
@@ -85,6 +85,25 @@ enum class Key {
F14 = SPECIAL | 0x29,
F15 = SPECIAL | 0x2A,
F16 = SPECIAL | 0x2B,
+ F17 = SPECIAL | 0x2C,
+ F18 = SPECIAL | 0x2D,
+ F19 = SPECIAL | 0x2E,
+ F20 = SPECIAL | 0x2F,
+ F21 = SPECIAL | 0x30,
+ F22 = SPECIAL | 0x31,
+ F23 = SPECIAL | 0x32,
+ F24 = SPECIAL | 0x33,
+ F25 = SPECIAL | 0x34,
+ F26 = SPECIAL | 0x35,
+ F27 = SPECIAL | 0x36,
+ F28 = SPECIAL | 0x37,
+ F29 = SPECIAL | 0x38,
+ F30 = SPECIAL | 0x39,
+ F31 = SPECIAL | 0x3A,
+ F32 = SPECIAL | 0x3B,
+ F33 = SPECIAL | 0x3C,
+ F34 = SPECIAL | 0x3D,
+ F35 = SPECIAL | 0x3E,
KP_MULTIPLY = SPECIAL | 0x81,
KP_DIVIDE = SPECIAL | 0x82,
KP_SUBTRACT = SPECIAL | 0x83,
@@ -100,54 +119,54 @@ enum class Key {
KP_7 = SPECIAL | 0x8D,
KP_8 = SPECIAL | 0x8E,
KP_9 = SPECIAL | 0x8F,
- SUPER_L = SPECIAL | 0x2C,
- SUPER_R = SPECIAL | 0x2D,
- MENU = SPECIAL | 0x2E,
- HYPER_L = SPECIAL | 0x2F,
- HYPER_R = SPECIAL | 0x30,
- HELP = SPECIAL | 0x31,
- DIRECTION_L = SPECIAL | 0x32,
- DIRECTION_R = SPECIAL | 0x33,
- BACK = SPECIAL | 0x40,
- FORWARD = SPECIAL | 0x41,
- STOP = SPECIAL | 0x42,
- REFRESH = SPECIAL | 0x43,
- VOLUMEDOWN = SPECIAL | 0x44,
- VOLUMEMUTE = SPECIAL | 0x45,
- VOLUMEUP = SPECIAL | 0x46,
- BASSBOOST = SPECIAL | 0x47,
- BASSUP = SPECIAL | 0x48,
- BASSDOWN = SPECIAL | 0x49,
- TREBLEUP = SPECIAL | 0x4A,
- TREBLEDOWN = SPECIAL | 0x4B,
- MEDIAPLAY = SPECIAL | 0x4C,
- MEDIASTOP = SPECIAL | 0x4D,
- MEDIAPREVIOUS = SPECIAL | 0x4E,
- MEDIANEXT = SPECIAL | 0x4F,
- MEDIARECORD = SPECIAL | 0x50,
- HOMEPAGE = SPECIAL | 0x51,
- FAVORITES = SPECIAL | 0x52,
- SEARCH = SPECIAL | 0x53,
- STANDBY = SPECIAL | 0x54,
- OPENURL = SPECIAL | 0x55,
- LAUNCHMAIL = SPECIAL | 0x56,
- LAUNCHMEDIA = SPECIAL | 0x57,
- LAUNCH0 = SPECIAL | 0x58,
- LAUNCH1 = SPECIAL | 0x59,
- LAUNCH2 = SPECIAL | 0x5A,
- LAUNCH3 = SPECIAL | 0x5B,
- LAUNCH4 = SPECIAL | 0x5C,
- LAUNCH5 = SPECIAL | 0x5D,
- LAUNCH6 = SPECIAL | 0x5E,
- LAUNCH7 = SPECIAL | 0x5F,
- LAUNCH8 = SPECIAL | 0x60,
- LAUNCH9 = SPECIAL | 0x61,
- LAUNCHA = SPECIAL | 0x62,
- LAUNCHB = SPECIAL | 0x63,
- LAUNCHC = SPECIAL | 0x64,
- LAUNCHD = SPECIAL | 0x65,
- LAUNCHE = SPECIAL | 0x66,
- LAUNCHF = SPECIAL | 0x67,
+ SUPER_L = SPECIAL | 0x40,
+ SUPER_R = SPECIAL | 0x41,
+ MENU = SPECIAL | 0x42,
+ HYPER_L = SPECIAL | 0x43,
+ HYPER_R = SPECIAL | 0x44,
+ HELP = SPECIAL | 0x45,
+ DIRECTION_L = SPECIAL | 0x46,
+ DIRECTION_R = SPECIAL | 0x47,
+ BACK = SPECIAL | 0x48,
+ FORWARD = SPECIAL | 0x49,
+ STOP = SPECIAL | 0x4A,
+ REFRESH = SPECIAL | 0x4B,
+ VOLUMEDOWN = SPECIAL | 0x4C,
+ VOLUMEMUTE = SPECIAL | 0x4D,
+ VOLUMEUP = SPECIAL | 0x4E,
+ BASSBOOST = SPECIAL | 0x4F,
+ BASSUP = SPECIAL | 0x50,
+ BASSDOWN = SPECIAL | 0x51,
+ TREBLEUP = SPECIAL | 0x52,
+ TREBLEDOWN = SPECIAL | 0x53,
+ MEDIAPLAY = SPECIAL | 0x54,
+ MEDIASTOP = SPECIAL | 0x55,
+ MEDIAPREVIOUS = SPECIAL | 0x56,
+ MEDIANEXT = SPECIAL | 0x57,
+ MEDIARECORD = SPECIAL | 0x58,
+ HOMEPAGE = SPECIAL | 0x59,
+ FAVORITES = SPECIAL | 0x5A,
+ SEARCH = SPECIAL | 0x5B,
+ STANDBY = SPECIAL | 0x5C,
+ OPENURL = SPECIAL | 0x5D,
+ LAUNCHMAIL = SPECIAL | 0x5E,
+ LAUNCHMEDIA = SPECIAL | 0x5F,
+ LAUNCH0 = SPECIAL | 0x60,
+ LAUNCH1 = SPECIAL | 0x61,
+ LAUNCH2 = SPECIAL | 0x62,
+ LAUNCH3 = SPECIAL | 0x63,
+ LAUNCH4 = SPECIAL | 0x64,
+ LAUNCH5 = SPECIAL | 0x65,
+ LAUNCH6 = SPECIAL | 0x66,
+ LAUNCH7 = SPECIAL | 0x67,
+ LAUNCH8 = SPECIAL | 0x68,
+ LAUNCH9 = SPECIAL | 0x69,
+ LAUNCHA = SPECIAL | 0x6A,
+ LAUNCHB = SPECIAL | 0x6B,
+ LAUNCHC = SPECIAL | 0x6C,
+ LAUNCHD = SPECIAL | 0x6D,
+ LAUNCHE = SPECIAL | 0x6E,
+ LAUNCHF = SPECIAL | 0x6F,
UNKNOWN = SPECIAL | 0xFFFFFF,
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 18ea29857b..a4260a3f3f 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1414,6 +1414,63 @@
<constant name="KEY_F16" value="16777259" enum="Key">
F16 key.
</constant>
+ <constant name="KEY_F17" value="16777260" enum="Key">
+ F17 key.
+ </constant>
+ <constant name="KEY_F18" value="16777261" enum="Key">
+ F18 key.
+ </constant>
+ <constant name="KEY_F19" value="16777262" enum="Key">
+ F19 key.
+ </constant>
+ <constant name="KEY_F20" value="16777263" enum="Key">
+ F20 key.
+ </constant>
+ <constant name="KEY_F21" value="16777264" enum="Key">
+ F21 key.
+ </constant>
+ <constant name="KEY_F22" value="16777265" enum="Key">
+ F22 key.
+ </constant>
+ <constant name="KEY_F23" value="16777266" enum="Key">
+ F23 key.
+ </constant>
+ <constant name="KEY_F24" value="16777267" enum="Key">
+ F24 key.
+ </constant>
+ <constant name="KEY_F25" value="16777268" enum="Key">
+ F25 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F26" value="16777269" enum="Key">
+ F26 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F27" value="16777270" enum="Key">
+ F27 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F28" value="16777271" enum="Key">
+ F28 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F29" value="16777272" enum="Key">
+ F29 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F30" value="16777273" enum="Key">
+ F30 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F31" value="16777274" enum="Key">
+ F31 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F32" value="16777275" enum="Key">
+ F32 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F33" value="16777276" enum="Key">
+ F33 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F34" value="16777277" enum="Key">
+ F34 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F35" value="16777278" enum="Key">
+ F35 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
<constant name="KEY_KP_MULTIPLY" value="16777345" enum="Key">
Multiply (*) key on the numeric keypad.
</constant>
@@ -1459,148 +1516,148 @@
<constant name="KEY_KP_9" value="16777359" enum="Key">
Number 9 on the numeric keypad.
</constant>
- <constant name="KEY_SUPER_L" value="16777260" enum="Key">
+ <constant name="KEY_SUPER_L" value="16777280" enum="Key">
Left Super key (Windows key).
</constant>
- <constant name="KEY_SUPER_R" value="16777261" enum="Key">
+ <constant name="KEY_SUPER_R" value="16777281" enum="Key">
Right Super key (Windows key).
</constant>
- <constant name="KEY_MENU" value="16777262" enum="Key">
+ <constant name="KEY_MENU" value="16777282" enum="Key">
Context menu key.
</constant>
- <constant name="KEY_HYPER_L" value="16777263" enum="Key">
+ <constant name="KEY_HYPER_L" value="16777283" enum="Key">
Left Hyper key.
</constant>
- <constant name="KEY_HYPER_R" value="16777264" enum="Key">
+ <constant name="KEY_HYPER_R" value="16777284" enum="Key">
Right Hyper key.
</constant>
- <constant name="KEY_HELP" value="16777265" enum="Key">
+ <constant name="KEY_HELP" value="16777285" enum="Key">
Help key.
</constant>
- <constant name="KEY_DIRECTION_L" value="16777266" enum="Key">
+ <constant name="KEY_DIRECTION_L" value="16777286" enum="Key">
Left Direction key.
</constant>
- <constant name="KEY_DIRECTION_R" value="16777267" enum="Key">
+ <constant name="KEY_DIRECTION_R" value="16777287" enum="Key">
Right Direction key.
</constant>
- <constant name="KEY_BACK" value="16777280" enum="Key">
+ <constant name="KEY_BACK" value="16777288" enum="Key">
Media back key. Not to be confused with the Back button on an Android device.
</constant>
- <constant name="KEY_FORWARD" value="16777281" enum="Key">
+ <constant name="KEY_FORWARD" value="16777289" enum="Key">
Media forward key.
</constant>
- <constant name="KEY_STOP" value="16777282" enum="Key">
+ <constant name="KEY_STOP" value="16777290" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_REFRESH" value="16777283" enum="Key">
+ <constant name="KEY_REFRESH" value="16777291" enum="Key">
Media refresh key.
</constant>
- <constant name="KEY_VOLUMEDOWN" value="16777284" enum="Key">
+ <constant name="KEY_VOLUMEDOWN" value="16777292" enum="Key">
Volume down key.
</constant>
- <constant name="KEY_VOLUMEMUTE" value="16777285" enum="Key">
+ <constant name="KEY_VOLUMEMUTE" value="16777293" enum="Key">
Mute volume key.
</constant>
- <constant name="KEY_VOLUMEUP" value="16777286" enum="Key">
+ <constant name="KEY_VOLUMEUP" value="16777294" enum="Key">
Volume up key.
</constant>
- <constant name="KEY_BASSBOOST" value="16777287" enum="Key">
+ <constant name="KEY_BASSBOOST" value="16777295" enum="Key">
Bass Boost key.
</constant>
- <constant name="KEY_BASSUP" value="16777288" enum="Key">
+ <constant name="KEY_BASSUP" value="16777296" enum="Key">
Bass up key.
</constant>
- <constant name="KEY_BASSDOWN" value="16777289" enum="Key">
+ <constant name="KEY_BASSDOWN" value="16777297" enum="Key">
Bass down key.
</constant>
- <constant name="KEY_TREBLEUP" value="16777290" enum="Key">
+ <constant name="KEY_TREBLEUP" value="16777298" enum="Key">
Treble up key.
</constant>
- <constant name="KEY_TREBLEDOWN" value="16777291" enum="Key">
+ <constant name="KEY_TREBLEDOWN" value="16777299" enum="Key">
Treble down key.
</constant>
- <constant name="KEY_MEDIAPLAY" value="16777292" enum="Key">
+ <constant name="KEY_MEDIAPLAY" value="16777300" enum="Key">
Media play key.
</constant>
- <constant name="KEY_MEDIASTOP" value="16777293" enum="Key">
+ <constant name="KEY_MEDIASTOP" value="16777301" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="Key">
+ <constant name="KEY_MEDIAPREVIOUS" value="16777302" enum="Key">
Previous song key.
</constant>
- <constant name="KEY_MEDIANEXT" value="16777295" enum="Key">
+ <constant name="KEY_MEDIANEXT" value="16777303" enum="Key">
Next song key.
</constant>
- <constant name="KEY_MEDIARECORD" value="16777296" enum="Key">
+ <constant name="KEY_MEDIARECORD" value="16777304" enum="Key">
Media record key.
</constant>
- <constant name="KEY_HOMEPAGE" value="16777297" enum="Key">
+ <constant name="KEY_HOMEPAGE" value="16777305" enum="Key">
Home page key.
</constant>
- <constant name="KEY_FAVORITES" value="16777298" enum="Key">
+ <constant name="KEY_FAVORITES" value="16777306" enum="Key">
Favorites key.
</constant>
- <constant name="KEY_SEARCH" value="16777299" enum="Key">
+ <constant name="KEY_SEARCH" value="16777307" enum="Key">
Search key.
</constant>
- <constant name="KEY_STANDBY" value="16777300" enum="Key">
+ <constant name="KEY_STANDBY" value="16777308" enum="Key">
Standby key.
</constant>
- <constant name="KEY_OPENURL" value="16777301" enum="Key">
+ <constant name="KEY_OPENURL" value="16777309" enum="Key">
Open URL / Launch Browser key.
</constant>
- <constant name="KEY_LAUNCHMAIL" value="16777302" enum="Key">
+ <constant name="KEY_LAUNCHMAIL" value="16777310" enum="Key">
Launch Mail key.
</constant>
- <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="Key">
+ <constant name="KEY_LAUNCHMEDIA" value="16777311" enum="Key">
Launch Media key.
</constant>
- <constant name="KEY_LAUNCH0" value="16777304" enum="Key">
+ <constant name="KEY_LAUNCH0" value="16777312" enum="Key">
Launch Shortcut 0 key.
</constant>
- <constant name="KEY_LAUNCH1" value="16777305" enum="Key">
+ <constant name="KEY_LAUNCH1" value="16777313" enum="Key">
Launch Shortcut 1 key.
</constant>
- <constant name="KEY_LAUNCH2" value="16777306" enum="Key">
+ <constant name="KEY_LAUNCH2" value="16777314" enum="Key">
Launch Shortcut 2 key.
</constant>
- <constant name="KEY_LAUNCH3" value="16777307" enum="Key">
+ <constant name="KEY_LAUNCH3" value="16777315" enum="Key">
Launch Shortcut 3 key.
</constant>
- <constant name="KEY_LAUNCH4" value="16777308" enum="Key">
+ <constant name="KEY_LAUNCH4" value="16777316" enum="Key">
Launch Shortcut 4 key.
</constant>
- <constant name="KEY_LAUNCH5" value="16777309" enum="Key">
+ <constant name="KEY_LAUNCH5" value="16777317" enum="Key">
Launch Shortcut 5 key.
</constant>
- <constant name="KEY_LAUNCH6" value="16777310" enum="Key">
+ <constant name="KEY_LAUNCH6" value="16777318" enum="Key">
Launch Shortcut 6 key.
</constant>
- <constant name="KEY_LAUNCH7" value="16777311" enum="Key">
+ <constant name="KEY_LAUNCH7" value="16777319" enum="Key">
Launch Shortcut 7 key.
</constant>
- <constant name="KEY_LAUNCH8" value="16777312" enum="Key">
+ <constant name="KEY_LAUNCH8" value="16777320" enum="Key">
Launch Shortcut 8 key.
</constant>
- <constant name="KEY_LAUNCH9" value="16777313" enum="Key">
+ <constant name="KEY_LAUNCH9" value="16777321" enum="Key">
Launch Shortcut 9 key.
</constant>
- <constant name="KEY_LAUNCHA" value="16777314" enum="Key">
+ <constant name="KEY_LAUNCHA" value="16777322" enum="Key">
Launch Shortcut A key.
</constant>
- <constant name="KEY_LAUNCHB" value="16777315" enum="Key">
+ <constant name="KEY_LAUNCHB" value="16777323" enum="Key">
Launch Shortcut B key.
</constant>
- <constant name="KEY_LAUNCHC" value="16777316" enum="Key">
+ <constant name="KEY_LAUNCHC" value="16777324" enum="Key">
Launch Shortcut C key.
</constant>
- <constant name="KEY_LAUNCHD" value="16777317" enum="Key">
+ <constant name="KEY_LAUNCHD" value="16777325" enum="Key">
Launch Shortcut D key.
</constant>
- <constant name="KEY_LAUNCHE" value="16777318" enum="Key">
+ <constant name="KEY_LAUNCHE" value="16777326" enum="Key">
Launch Shortcut E key.
</constant>
- <constant name="KEY_LAUNCHF" value="16777319" enum="Key">
+ <constant name="KEY_LAUNCHF" value="16777327" enum="Key">
Launch Shortcut F key.
</constant>
<constant name="KEY_UNKNOWN" value="33554431" enum="Key">
diff --git a/platform/linuxbsd/key_mapping_x11.cpp b/platform/linuxbsd/key_mapping_x11.cpp
index afe965e038..047ee74671 100644
--- a/platform/linuxbsd/key_mapping_x11.cpp
+++ b/platform/linuxbsd/key_mapping_x11.cpp
@@ -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 }
};
diff --git a/platform/osx/key_mapping_osx.mm b/platform/osx/key_mapping_osx.mm
index bfec45de58..0bf6bc7d1c 100644
--- a/platform/osx/key_mapping_osx.mm
+++ b/platform/osx/key_mapping_osx.mm
@@ -130,7 +130,7 @@ static const Key _osx_to_godot_table[128] = {
/* 3d */ Key::ALT,
/* 3e */ Key::CTRL,
/* 3f */ Key::UNKNOWN, /* Function */
- /* 40 */ Key::UNKNOWN, /* F17 */
+ /* 40 */ Key::F17,
/* 41 */ Key::KP_PERIOD,
/* 42 */ Key::UNKNOWN,
/* 43 */ Key::KP_MULTIPLY,
@@ -145,8 +145,8 @@ static const Key _osx_to_godot_table[128] = {
/* 4c */ Key::KP_ENTER,
/* 4d */ Key::UNKNOWN,
/* 4e */ Key::KP_SUBTRACT,
- /* 4f */ Key::UNKNOWN, /* F18 */
- /* 50 */ Key::UNKNOWN, /* F19 */
+ /* 4f */ Key::F18,
+ /* 50 */ Key::F19,
/* 51 */ Key::EQUAL, /* KeypadEqual */
/* 52 */ Key::KP_0,
/* 53 */ Key::KP_1,
@@ -156,7 +156,7 @@ static const Key _osx_to_godot_table[128] = {
/* 57 */ Key::KP_5,
/* 58 */ Key::KP_6,
/* 59 */ Key::KP_7,
- /* 5a */ Key::UNKNOWN, /* F20 */
+ /* 5a */ Key::F20,
/* 5b */ Key::KP_8,
/* 5c */ Key::KP_9,
/* 5d */ Key::YEN, /* JIS Yen */
@@ -366,7 +366,26 @@ static const _KeyCodeText _native_keycodes[] = {
{Key::F13 ,NSF13FunctionKey},
{Key::F14 ,NSF14FunctionKey},
{Key::F15 ,NSF15FunctionKey},
- {Key::F16 ,NSF16FunctionKey}, //* ... NSF35FunctionKey */
+ {Key::F16 ,NSF16FunctionKey},
+ {Key::F17 ,NSF17FunctionKey},
+ {Key::F18 ,NSF18FunctionKey},
+ {Key::F19 ,NSF19FunctionKey},
+ {Key::F20 ,NSF20FunctionKey},
+ {Key::F21 ,NSF21FunctionKey},
+ {Key::F22 ,NSF22FunctionKey},
+ {Key::F23 ,NSF23FunctionKey},
+ {Key::F24 ,NSF24FunctionKey},
+ {Key::F25 ,NSF25FunctionKey},
+ {Key::F26 ,NSF26FunctionKey},
+ {Key::F27 ,NSF27FunctionKey},
+ {Key::F28 ,NSF28FunctionKey},
+ {Key::F29 ,NSF29FunctionKey},
+ {Key::F30 ,NSF30FunctionKey},
+ {Key::F31 ,NSF31FunctionKey},
+ {Key::F32 ,NSF32FunctionKey},
+ {Key::F33 ,NSF33FunctionKey},
+ {Key::F34 ,NSF34FunctionKey},
+ {Key::F35 ,NSF35FunctionKey},
{Key::MENU ,NSMenuFunctionKey},
{Key::HELP ,NSHelpFunctionKey},
{Key::STOP ,NSStopFunctionKey},
diff --git a/platform/windows/key_mapping_windows.cpp b/platform/windows/key_mapping_windows.cpp
index e32dc0d1a6..2d8d68a575 100644
--- a/platform/windows/key_mapping_windows.cpp
+++ b/platform/windows/key_mapping_windows.cpp
@@ -179,7 +179,14 @@ static _WinTranslatePair _vk_to_keycode[] = {
{ Key::F14, VK_F14 }, // (0x7D)
{ Key::F15, VK_F15 }, // (0x7E)
{ Key::F16, VK_F16 }, // (0x7F)
- // We have no mappings for F17-F24. (0x80-87)
+ { Key::F17, VK_F17 }, // (0x80)
+ { Key::F18, VK_F18 }, // (0x81)
+ { Key::F19, VK_F19 }, // (0x82)
+ { Key::F20, VK_F20 }, // (0x83)
+ { Key::F21, VK_F21 }, // (0x84)
+ { Key::F22, VK_F22 }, // (0x85)
+ { Key::F23, VK_F23 }, // (0x86)
+ { Key::F24, VK_F24 }, // (0x87)
// 0x88-8F are reserved for UI navigation.
{ Key::NUMLOCK, VK_NUMLOCK }, // (0x90)
{ Key::SCROLLLOCK, VK_SCROLL }, // (0x91)
@@ -409,6 +416,14 @@ static _WinTranslatePair _scancode_to_keycode[] = {
{ Key::F14, 0x65 },
{ Key::F15, 0x66 },
{ Key::F16, 0x67 },
+ { Key::F17, 0x68 },
+ { Key::F18, 0x69 },
+ { Key::F19, 0x6A },
+ { Key::F20, 0x6B },
+ { Key::F21, 0x6C },
+ { Key::F22, 0x6D },
+ { Key::F23, 0x6E },
+ { Key::F24, 0x76 },
{ Key::UNKNOWN, 0 }
};