summaryrefslogtreecommitdiff
path: root/platform/web/dom_keys.inc
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-03-06 11:24:41 +0200
committerYuri Sizov <yuris@humnom.net>2023-03-13 22:00:15 +0100
commitef3f1d426d4bb10be75b9984989f3fd145eddf53 (patch)
treef4679df5721c40c774f4ac46ba12b8642864cbb1 /platform/web/dom_keys.inc
parentbc6743c96d6ef353433ee230015f2e19562ea08c (diff)
[Web] Fix some missing keycode mappings.
(cherry picked from commit 0b0587af9775dc5e6fe5707f99634f280e22f4c7)
Diffstat (limited to 'platform/web/dom_keys.inc')
-rw-r--r--platform/web/dom_keys.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/web/dom_keys.inc b/platform/web/dom_keys.inc
index e63bd7c69f..ae3b2fc1a5 100644
--- a/platform/web/dom_keys.inc
+++ b/platform/web/dom_keys.inc
@@ -51,6 +51,7 @@ Key dom_code2godot_scancode(EM_UTF8 const p_code[32], EM_UTF8 const p_key[32], b
DOM2GODOT("Numpad9", KP_9);
DOM2GODOT("NumpadAdd", KP_ADD);
DOM2GODOT("NumpadBackspace", BACKSPACE);
+ DOM2GODOT("Clear", CLEAR); // NumLock on macOS.
DOM2GODOT("NumpadClear", CLEAR);
DOM2GODOT("NumpadClearEntry", CLEAR);
//DOM2GODOT("NumpadComma", UNKNOWN);
@@ -125,16 +126,22 @@ Key dom_code2godot_scancode(EM_UTF8 const p_code[32], EM_UTF8 const p_key[32], b
DOM2GODOT("Slash", SLASH);
// Functional keys in the Alphanumeric section.
+ DOM2GODOT("Alt", ALT);
DOM2GODOT("AltLeft", ALT);
DOM2GODOT("AltRight", ALT);
DOM2GODOT("Backspace", BACKSPACE);
DOM2GODOT("CapsLock", CAPSLOCK);
DOM2GODOT("ContextMenu", MENU);
+ DOM2GODOT("Control", CTRL);
DOM2GODOT("ControlLeft", CTRL);
DOM2GODOT("ControlRight", CTRL);
DOM2GODOT("Enter", ENTER);
+ DOM2GODOT("Meta", META);
DOM2GODOT("MetaLeft", META);
DOM2GODOT("MetaRight", META);
+ DOM2GODOT("OSLeft", META); // Command on macOS.
+ DOM2GODOT("OSRight", META); // Command on macOS.
+ DOM2GODOT("Shift", SHIFT);
DOM2GODOT("ShiftLeft", SHIFT);
DOM2GODOT("ShiftRight", SHIFT);
DOM2GODOT("Space", SPACE);