try key codes for all non-ascii input characters

This commit is contained in:
Martin Raifer
2022-02-11 16:17:26 +01:00
parent bb3ab9257a
commit 22bd62836d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :bug: Bugfixes
* Fix rendering of KeepRight issues ([#8963])
* Fix KeepRight warnings showing up as "Unknown" issues ([#8925])
* Fix `⌥` + `W` keyboard shortcut not working on MacOS in certain system languages / keyboard layouts (e.g. Spanish) ([#8905])
* Fix <kbd>⌥</kbd><kbd>W</kbd> keyboard shortcut not working on MacOS in certain system languages / keyboard layouts (e.g. Spanish) ([#8905])
#### :rocket: Presets
* Optimize order of values in dropdowns of `access` fields ([#8945])
* Use value of `vehicle` tag as placeholder value of `access` fields for `motor_vehicle` and `bicycle`
+2 -2
View File
@@ -54,7 +54,7 @@ export function utilKeybinding(namespace) {
// Prefer a match on `KeyboardEvent.key`
if (event.key !== undefined) {
tryKeyCode = (event.key.charCodeAt(0) > 255); // outside ISO-Latin-1
tryKeyCode = (event.key.charCodeAt(0) > 127); // outside ISO-Latin-1
isMatch = true;
if (binding.event.key === undefined) {
@@ -73,7 +73,7 @@ export function utilKeybinding(namespace) {
}
// Fallback match on `KeyboardEvent.keyCode`, can happen if:
// - `KeyboardEvent.key` is outside ASCII range (e.g. cyrillic - #4618)
// - `KeyboardEvent.key` is outside ASCII range (e.g. cyrillic - # )
// - alt/option/⌥ key is also requested (e.g. Spanish keyboard on MacOS - #8905)
if (!isMatch && (tryKeyCode || binding.event.modifiers.altKey)) {
isMatch = (event.keyCode === binding.event.keyCode);