fix(frontend): read KeyboardEvent.key instead of which/code (#10083)
This commit is contained in:
parent
830fabef12
commit
6d82371449
4 changed files with 23 additions and 25 deletions
|
@ -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}`];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue