diff options
Diffstat (limited to 'platform/javascript/dom_keys.h')
-rw-r--r-- | platform/javascript/dom_keys.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/platform/javascript/dom_keys.h b/platform/javascript/dom_keys.h index 5ef212ce4a..53a2705577 100644 --- a/platform/javascript/dom_keys.h +++ b/platform/javascript/dom_keys.h @@ -236,7 +236,7 @@ int dom2godot_scancode(int dom_keycode) { return KEY_F1 + (dom_keycode - DOM_VK_F1); } - switch(dom_keycode) { + switch (dom_keycode) { //case DOM_VK_CANCEL: return KEY_UNKNOWN; case DOM_VK_HELP: return KEY_HELP; case DOM_VK_BACK_SPACE: return KEY_BACKSPACE; @@ -258,7 +258,8 @@ int dom2godot_scancode(int dom_keycode) { return KEY_ALT; case DOM_VK_PAUSE: return KEY_PAUSE; - case DOM_VK_CAPS_LOCK: return KEY_CAPSLOCK; + case DOM_VK_CAPS_LOCK: + return KEY_CAPSLOCK; /* case DOM_VK_KANA: return KEY_UNKNOWN; @@ -270,7 +271,8 @@ int dom2godot_scancode(int dom_keycode) { case DOM_VK_KANJI: return KEY_UNKNOWN; */ - case DOM_VK_ESCAPE: return KEY_ESCAPE; + case DOM_VK_ESCAPE: + return KEY_ESCAPE; /* case DOM_VK_CONVERT: return KEY_UNKNOWN; case DOM_VK_NONCONVERT: return KEY_UNKNOWN; @@ -286,7 +288,8 @@ int dom2godot_scancode(int dom_keycode) { case DOM_VK_LEFT: return KEY_LEFT; case DOM_VK_UP: return KEY_UP; case DOM_VK_RIGHT: return KEY_RIGHT; - case DOM_VK_DOWN: return KEY_DOWN; + case DOM_VK_DOWN: + return KEY_DOWN; //case DOM_VK_SELECT: return KEY_UNKNOWN; @@ -303,15 +306,18 @@ int dom2godot_scancode(int dom_keycode) { return KEY_META; case DOM_VK_CONTEXT_MENU: return KEY_MENU; - case DOM_VK_SLEEP: return KEY_STANDBY; + case DOM_VK_SLEEP: + return KEY_STANDBY; // these are numpad keys according to MDN case DOM_VK_MULTIPLY: return KEY_KP_MULTIPLY; case DOM_VK_ADD: return KEY_KP_ADD; - case DOM_VK_SEPARATOR: return KEY_KP_PERIOD; // good enough? + case DOM_VK_SEPARATOR: + return KEY_KP_PERIOD; // good enough? case DOM_VK_SUBTRACT: return KEY_KP_SUBTRACT; case DOM_VK_DECIMAL: return KEY_KP_PERIOD; - case DOM_VK_DIVIDE: return KEY_KP_DIVIDE; + case DOM_VK_DIVIDE: + return KEY_KP_DIVIDE; /* case DOM_VK_F17: return KEY_UNKNOWN; @@ -325,7 +331,8 @@ int dom2godot_scancode(int dom_keycode) { */ case DOM_VK_NUM_LOCK: return KEY_NUMLOCK; - case DOM_VK_SCROLL_LOCK: return KEY_SCROLLLOCK; + case DOM_VK_SCROLL_LOCK: + return KEY_SCROLLLOCK; /* case DOM_VK_WIN_OEM_FJ_JISHO: return KEY_UNKNOWN; @@ -364,7 +371,8 @@ int dom2godot_scancode(int dom_keycode) { case DOM_VK_OPEN_BRACKET: return KEY_BRACKETLEFT; case DOM_VK_BACK_SLASH: return KEY_BACKSLASH; case DOM_VK_CLOSE_BRACKET: return KEY_BRACKETRIGHT; - case DOM_VK_QUOTE: return KEY_APOSTROPHE; + case DOM_VK_QUOTE: + return KEY_APOSTROPHE; // rest is OEM/unusual |