summaryrefslogtreecommitdiff
path: root/platform/javascript/dom_keys.inc
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/dom_keys.inc')
-rw-r--r--platform/javascript/dom_keys.inc26
1 files changed, 13 insertions, 13 deletions
diff --git a/platform/javascript/dom_keys.inc b/platform/javascript/dom_keys.inc
index 0e62776923..31589f3f40 100644
--- a/platform/javascript/dom_keys.inc
+++ b/platform/javascript/dom_keys.inc
@@ -34,7 +34,7 @@
Key dom_code2godot_scancode(EM_UTF8 const p_code[32], EM_UTF8 const p_key[32], bool p_physical) {
#define DOM2GODOT(p_str, p_godot_code) \
if (memcmp((const void *)p_str, (void *)p_code, strlen(p_str) + 1) == 0) { \
- return KEY_##p_godot_code; \
+ return Key::p_godot_code; \
}
// Numpad section.
@@ -105,16 +105,16 @@ Key dom_code2godot_scancode(EM_UTF8 const p_code[32], EM_UTF8 const p_key[32], b
DOM2GODOT("BracketLeft", BRACKETLEFT);
DOM2GODOT("BracketRight", BRACKETRIGHT);
DOM2GODOT("Comma", COMMA);
- DOM2GODOT("Digit0", 0);
- DOM2GODOT("Digit1", 1);
- DOM2GODOT("Digit2", 2);
- DOM2GODOT("Digit3", 3);
- DOM2GODOT("Digit4", 4);
- DOM2GODOT("Digit5", 5);
- DOM2GODOT("Digit6", 6);
- DOM2GODOT("Digit7", 7);
- DOM2GODOT("Digit8", 8);
- DOM2GODOT("Digit9", 9);
+ DOM2GODOT("Digit0", KEY_0);
+ DOM2GODOT("Digit1", KEY_1);
+ DOM2GODOT("Digit2", KEY_2);
+ DOM2GODOT("Digit3", KEY_3);
+ DOM2GODOT("Digit4", KEY_4);
+ DOM2GODOT("Digit5", KEY_5);
+ DOM2GODOT("Digit6", KEY_6);
+ DOM2GODOT("Digit7", KEY_7);
+ DOM2GODOT("Digit8", KEY_8);
+ DOM2GODOT("Digit9", KEY_9);
DOM2GODOT("Equal", EQUAL);
DOM2GODOT("IntlBackslash", BACKSLASH);
//DOM2GODOT("IntlRo", UNKNOWN);
@@ -170,7 +170,7 @@ Key dom_code2godot_scancode(EM_UTF8 const p_code[32], EM_UTF8 const p_key[32], b
DOM2GODOT("Tab", TAB);
// ControlPad section.
- DOM2GODOT("Delete", DELETE);
+ DOM2GODOT("Delete", KEY_DELETE);
DOM2GODOT("End", END);
DOM2GODOT("Help", HELP);
DOM2GODOT("Home", HOME);
@@ -227,6 +227,6 @@ Key dom_code2godot_scancode(EM_UTF8 const p_code[32], EM_UTF8 const p_key[32], b
DOM2GODOT("AudioVolumeMute", VOLUMEMUTE);
DOM2GODOT("AudioVolumeUp", VOLUMEUP);
//DOM2GODOT("WakeUp", UNKNOWN);
- return KEY_UNKNOWN;
+ return Key::UNKNOWN;
#undef DOM2GODOT
}