diff options
author | Pierre Ossman <ossman@cendio.se> | 2020-12-04 16:44:54 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2020-12-07 10:10:53 +0100 |
commit | 5b5b747494742eddf2bab63f29c1e4a25d59efc9 (patch) | |
tree | 579eac80c96c76e5692d38c7ec68ae55273ae4fa /core/input | |
parent | 6cd9bacf8bbf1c87c9e7421aad61e792c6b10caa (diff) | |
download | novnc-5b5b747494742eddf2bab63f29c1e4a25d59efc9.tar.gz |
Remove many small, obsolete, old browser hacks
These are for browsers no longer supported anyway.
Diffstat (limited to 'core/input')
-rw-r--r-- | core/input/util.js | 20 | ||||
-rw-r--r-- | core/input/vkeys.js | 1 |
2 files changed, 0 insertions, 21 deletions
diff --git a/core/input/util.js b/core/input/util.js index 3822d4e..182be7f 100644 --- a/core/input/util.js +++ b/core/input/util.js @@ -68,26 +68,6 @@ export function getKeycode(evt) { export function getKey(evt) { // Are we getting a proper key value? if (evt.key !== undefined) { - // IE and Edge use some ancient version of the spec - // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/ - switch (evt.key) { - case 'Spacebar': return ' '; - case 'Esc': return 'Escape'; - case 'Scroll': return 'ScrollLock'; - case 'Win': return 'Meta'; - case 'Apps': return 'ContextMenu'; - case 'Up': return 'ArrowUp'; - case 'Left': return 'ArrowLeft'; - case 'Right': return 'ArrowRight'; - case 'Down': return 'ArrowDown'; - case 'Del': return 'Delete'; - case 'Divide': return '/'; - case 'Multiply': return '*'; - case 'Subtract': return '-'; - case 'Add': return '+'; - case 'Decimal': return evt.char; - } - // Mozilla isn't fully in sync with the spec yet switch (evt.key) { case 'OS': return 'Meta'; diff --git a/core/input/vkeys.js b/core/input/vkeys.js index f84109b..dacc358 100644 --- a/core/input/vkeys.js +++ b/core/input/vkeys.js @@ -13,7 +13,6 @@ export default { 0x08: 'Backspace', 0x09: 'Tab', 0x0a: 'NumpadClear', - 0x0c: 'Numpad5', // IE11 sends evt.keyCode: 12 when numlock is off 0x0d: 'Enter', 0x10: 'ShiftLeft', 0x11: 'ControlLeft', |