File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/vs/workbench/contrib/interactiveEditor/browser Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -226,9 +226,13 @@ export class LiveStrategy extends EditModeStrategy {
226
226
this . _ctxShowingDiff = CTX_INTERACTIVE_EDITOR_SHOWING_DIFF . bindTo ( contextKeyService ) ;
227
227
this . _ctxShowingDiff . set ( this . _diffEnabled ) ;
228
228
this . _inlineDiffDecorations . visible = this . _diffEnabled ;
229
- this . _diffToggleListener = ModifierKeyEmitter . getInstance ( ) . event ( e => {
230
- if ( e . altKey || e . lastKeyReleased === 'alt' ) {
229
+ const modKeys = ModifierKeyEmitter . getInstance ( ) ;
230
+ let lastIsAlt : boolean | undefined ;
231
+ this . _diffToggleListener = modKeys . event ( ( ) => {
232
+ const isAlt = modKeys . keyStatus . altKey && ( ! modKeys . keyStatus . ctrlKey && ! modKeys . keyStatus . metaKey && ! modKeys . keyStatus . shiftKey ) ;
233
+ if ( lastIsAlt !== isAlt ) {
231
234
this . toggleDiff ( ) ;
235
+ lastIsAlt = isAlt ;
232
236
}
233
237
} ) ;
234
238
}
You can’t perform that action at this time.
0 commit comments