diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-07-09 17:59:15 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-09 17:59:15 +0900 |
| commit | a5407131d4d15edca924e2718902cefd81e49ee2 (patch) | |
| tree | bad6d1e08071e9e14624a4d64fb851f137bb4fee /packages/frontend/src/scripts/keycode.ts | |
| parent | Bump release actions to v2 (develop-stable(master) branches system) (#13941) (diff) | |
| download | sharkey-a5407131d4d15edca924e2718902cefd81e49ee2.tar.gz sharkey-a5407131d4d15edca924e2718902cefd81e49ee2.tar.bz2 sharkey-a5407131d4d15edca924e2718902cefd81e49ee2.zip | |
fix/refactor(frontend): hotkeyの改修 (#14157)
* improve(frontend): hotkeyの改修 (#234)
(cherry picked from commit 678be147f4db709dadf25d007cc2e679e98a370e)
* Change path, add missing script
Co-authored-by: taiy <53635909+taiyme@users.noreply.github.com>
* fix
* fix
* add missing keycodes
* fix
* update changelog
---------
Co-authored-by: taiy <53635909+taiyme@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/scripts/keycode.ts')
| -rw-r--r-- | packages/frontend/src/scripts/keycode.ts | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/packages/frontend/src/scripts/keycode.ts b/packages/frontend/src/scripts/keycode.ts deleted file mode 100644 index 7ffceafada..0000000000 --- a/packages/frontend/src/scripts/keycode.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-FileCopyrightText: syuilo and misskey-project - * SPDX-License-Identifier: AGPL-3.0-only - */ - -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'], - 'space': [' ', 'Spacebar'], - 'up': 'ArrowUp', - 'down': 'ArrowDown', - 'left': 'ArrowLeft', - 'right': 'ArrowRight', - 'plus': ['NumpadAdd', 'Semicolon'], -}; |