From 4b7258cba0dc71cfc7d3adef1b5dd7f9e610c28b Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Tue, 4 Oct 2022 20:14:52 +0200 Subject: xP: fix ESC H detection on Macintosh systems --- xP/public/xP.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xP/public/xP.js b/xP/public/xP.js index 795641d..8a117f0 100644 --- a/xP/public/xP.js +++ b/xP/public/xP.js @@ -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') { -- cgit v1.2.3-70-g09d2