xP: fix ESC H detection on Macintosh systems
This commit is contained in:
parent
9dc3dd02f3
commit
4b7258cba0
@ -1058,6 +1058,13 @@ let lastWasEscape = false
|
||||
document.addEventListener('keydown', event => {
|
||||
event.escapePrefix = lastWasEscape
|
||||
if (lastWasEscape) {
|
||||
// https://www.w3.org/TR/uievents-key/#keys-modifier
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1232918
|
||||
if (["Alt", "AltGraph", "CapsLock", "Control", "Fn", "FnLock",
|
||||
"Meta", "NumLock", "ScrollLock", "Shift", "Symbol", "SymbolLock",
|
||||
"Hyper", "Super", "OS"].indexOf(event.key) != -1)
|
||||
return
|
||||
|
||||
lastWasEscape = false
|
||||
} else if (event.code == 'Escape' &&
|
||||
navigator.userAgentData?.platform === 'macOS') {
|
||||
|
Loading…
Reference in New Issue
Block a user