summaryrefslogtreecommitdiff
path: root/src/client/scripts/keycode.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/scripts/keycode.ts')
-rw-r--r--src/client/scripts/keycode.ts33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/client/scripts/keycode.ts b/src/client/scripts/keycode.ts
deleted file mode 100644
index c127d54bb2..0000000000
--- a/src/client/scripts/keycode.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-export default (input: string): string[] => {
- if (Object.keys(aliases).some(a => a.toLowerCase() === input.toLowerCase())) {
- const codes = aliases[input];
- return Array.isArray(codes) ? codes : [codes];
- } else {
- return [input];
- }
-};
-
-export const aliases = {
- 'esc': 'Escape',
- 'enter': ['Enter', 'NumpadEnter'],
- 'up': 'ArrowUp',
- 'down': 'ArrowDown',
- 'left': 'ArrowLeft',
- 'right': 'ArrowRight',
- 'plus': ['NumpadAdd', 'Semicolon'],
-};
-
-/*!
-* Programatically add the following
-*/
-
-// lower case chars
-for (let i = 97; i < 123; i++) {
- const char = String.fromCharCode(i);
- aliases[char] = `Key${char.toUpperCase()}`;
-}
-
-// numbers
-for (let i = 0; i < 10; i++) {
- aliases[i] = [`Numpad${i}`, `Digit${i}`];
-}