mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
give DisposableStore set character (helps with #74446)
This commit is contained in:
@@ -909,7 +909,7 @@ class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
ctrlKey: false
|
||||
};
|
||||
|
||||
this._subscriptions.push(domEvent(document.body, 'keydown', true)(e => {
|
||||
this._subscriptions.add(domEvent(document.body, 'keydown', true)(e => {
|
||||
const event = new StandardKeyboardEvent(e);
|
||||
|
||||
if (e.altKey && !this._keyStatus.altKey) {
|
||||
@@ -933,7 +933,7 @@ class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
}
|
||||
}));
|
||||
|
||||
this._subscriptions.push(domEvent(document.body, 'keyup', true)(e => {
|
||||
this._subscriptions.add(domEvent(document.body, 'keyup', true)(e => {
|
||||
if (!e.altKey && this._keyStatus.altKey) {
|
||||
this._keyStatus.lastKeyReleased = 'alt';
|
||||
} else if (!e.ctrlKey && this._keyStatus.ctrlKey) {
|
||||
@@ -957,21 +957,21 @@ class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
}
|
||||
}));
|
||||
|
||||
this._subscriptions.push(domEvent(document.body, 'mousedown', true)(e => {
|
||||
this._subscriptions.add(domEvent(document.body, 'mousedown', true)(e => {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}));
|
||||
|
||||
this._subscriptions.push(domEvent(document.body, 'mouseup', true)(e => {
|
||||
this._subscriptions.add(domEvent(document.body, 'mouseup', true)(e => {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}));
|
||||
|
||||
this._subscriptions.push(domEvent(document.body, 'mousemove', true)(e => {
|
||||
this._subscriptions.add(domEvent(document.body, 'mousemove', true)(e => {
|
||||
if (e.buttons) {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}
|
||||
}));
|
||||
|
||||
this._subscriptions.push(domEvent(window, 'blur')(e => {
|
||||
this._subscriptions.add(domEvent(window, 'blur')(e => {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
this._keyStatus.lastKeyReleased = undefined;
|
||||
this._keyStatus.altKey = false;
|
||||
|
||||
Reference in New Issue
Block a user