This commit is contained in:
SteVen Batten
2021-05-07 11:51:45 -07:00
parent 0925af498c
commit 244eccdbcc
2 changed files with 11 additions and 0 deletions

View File

@@ -1441,6 +1441,9 @@ export class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
};
this._subscriptions.add(domEvent(window, 'keydown', true)(e => {
if (e.defaultPrevented) {
return;
}
const event = new StandardKeyboardEvent(e);
// If Alt-key keydown event is repeated, ignore it #112347
@@ -1475,6 +1478,10 @@ export class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
}));
this._subscriptions.add(domEvent(window, 'keyup', true)(e => {
if (e.defaultPrevented) {
return;
}
if (!e.altKey && this._keyStatus.altKey) {
this._keyStatus.lastKeyReleased = 'alt';
} else if (!e.ctrlKey && this._keyStatus.ctrlKey) {