mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-01 04:31:36 +02:00
Fix broken ⌥+w keyboard shortcut on MacOS in some keyboard layouts (#8905)
This commit is contained in:
@@ -73,9 +73,9 @@ export function utilKeybinding(namespace) {
|
||||
}
|
||||
|
||||
// Fallback match on `KeyboardEvent.keyCode`, can happen if:
|
||||
// - browser doesn't support `KeyboardEvent.key`
|
||||
// - `KeyboardEvent.key` is outside ISO-Latin-1 range (cyrillic?)
|
||||
if (!isMatch && tryKeyCode) {
|
||||
// - `KeyboardEvent.key` is outside ASCII range (e.g. cyrillic - #4618)
|
||||
// - 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user