diff options
| author | Kagami Sascha Rosylight <saschanaz@outlook.com> | 2023-03-01 07:24:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-01 15:24:09 +0900 |
| commit | 6d82371449cc97f1ee8a7425b17ec536a3095640 (patch) | |
| tree | 199afc9df4d21d20ab5e780b46a42a8d89a006bc /packages/frontend/src/scripts/keycode.ts | |
| parent | refactor: plugin.tsの型を修正する (#10027) (diff) | |
| download | sharkey-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.ts | 15 |
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}`]; -} |