summaryrefslogtreecommitdiff
path: root/core/input/keyboard.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/input/keyboard.js')
-rw-r--r--core/input/keyboard.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/input/keyboard.js b/core/input/keyboard.js
index 48f65cf..ddb5ce0 100644
--- a/core/input/keyboard.js
+++ b/core/input/keyboard.js
@@ -153,6 +153,16 @@ export default class Keyboard {
keysym = this._keyDownList[code];
}
+ // macOS doesn't send proper key releases if a key is pressed
+ // while meta is held down
+ if ((browser.isMac() || browser.isIOS()) &&
+ (e.metaKey && code !== 'MetaLeft' && code !== 'MetaRight')) {
+ this._sendKeyEvent(keysym, code, true);
+ this._sendKeyEvent(keysym, code, false);
+ stopEvent(e);
+ return;
+ }
+
// macOS doesn't send proper key events for modifiers, only
// state change events. That gets extra confusing for CapsLock
// which toggles on each press, but not on release. So pretend