summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/keycode.ts
diff options
context:
space:
mode:
authorKagami Sascha Rosylight <saschanaz@outlook.com>2023-03-01 07:24:09 +0100
committerGitHub <noreply@github.com>2023-03-01 15:24:09 +0900
commit6d82371449cc97f1ee8a7425b17ec536a3095640 (patch)
tree199afc9df4d21d20ab5e780b46a42a8d89a006bc /packages/frontend/src/scripts/keycode.ts
parentrefactor: plugin.tsの型を修正する (#10027) (diff)
downloadsharkey-6d82371449cc97f1ee8a7425b17ec536a3095640.tar.gz
sharkey-6d82371449cc97f1ee8a7425b17ec536a3095640.tar.bz2
sharkey-6d82371449cc97f1ee8a7425b17ec536a3095640.zip
fix(frontend): read KeyboardEvent.key instead of which/code (#10083)
Diffstat (limited to 'packages/frontend/src/scripts/keycode.ts')
-rw-r--r--packages/frontend/src/scripts/keycode.ts15
1 files changed, 0 insertions, 15 deletions
diff --git a/packages/frontend/src/scripts/keycode.ts b/packages/frontend/src/scripts/keycode.ts
index 69f6a82803..35813edbd5 100644
--- a/packages/frontend/src/scripts/keycode.ts
+++ b/packages/frontend/src/scripts/keycode.ts
@@ -16,18 +16,3 @@ export const aliases = {
'right': 'ArrowRight',
'plus': ['NumpadAdd', 'Semicolon'],
};
-
-/*!
-* Programmatically 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}`];
-}