Skip to content

Commit

Permalink
fixes #115810
Browse files Browse the repository at this point in the history
  • Loading branch information
sbatten committed Feb 5, 2021
1 parent 9ec337b commit ae0cfa4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/vs/base/browser/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1476,12 +1476,13 @@ export class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
};

this._subscriptions.add(domEvent(document.body, 'keydown', true)(e => {
// if keydown event is repeated, ignore it #112347
if (e.repeat) {
return;
}

const event = new StandardKeyboardEvent(e);
// If Alt-key keydown event is repeated, ignore it #112347
// Only known to be necessary for Alt-Key at the moment #115810
if (event.keyCode === KeyCode.Alt && e.repeat) {
return;
}

if (e.altKey && !this._keyStatus.altKey) {
this._keyStatus.lastKeyPressed = 'alt';
Expand Down

0 comments on commit ae0cfa4

Please sign in to comment.