Skip to content

Commit

Permalink
Fix F11 key binding (microsoft#24323)
Browse files Browse the repository at this point in the history
* Fix F11 key binding to non-debug mode

* Disable F11 keybinding completely to toggle between full screen

* Fix compile error
  • Loading branch information
SakshiS-harma authored Sep 7, 2023
1 parent af00e94 commit 839d8b2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/vs/workbench/contrib/debug/browser/debugCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
import { IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
import { deepClone } from 'vs/base/common/objects';
import { isWeb, isWindows } from 'vs/base/common/platform';
import { isWeb } from 'vs/base/common/platform';
import { saveAllBeforeDebugStart } from 'vs/workbench/contrib/debug/common/debugUtils';
import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite';
import { showLoadedScriptMenu } from 'vs/workbench/contrib/debug/common/loadedScriptsPicker';
Expand Down Expand Up @@ -487,7 +487,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
});

// Windows browsers use F11 for full screen, thus use alt+F11 as the default shortcut
const STEP_INTO_KEYBINDING = (isWeb && isWindows) ? (KeyMod.Alt | KeyCode.F11) : KeyCode.F11;
// {{SQL CARBON EDIT}} - Disable F11 binding to use it as shortcut for full screen in ADS
/*const STEP_INTO_KEYBINDING = (isWeb && isWindows) ? (KeyMod.Alt | KeyCode.F11) : KeyCode.F11;
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: STEP_INTO_ID,
Expand All @@ -503,7 +504,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
await getThreadAndRun(accessor, context, (thread: IThread) => thread.stepIn());
}
}
});
});*/

KeybindingsRegistry.registerCommandAndKeybindingRule({
id: STEP_OUT_ID,
Expand Down Expand Up @@ -533,7 +534,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({

KeybindingsRegistry.registerCommandAndKeybindingRule({
id: STEP_INTO_TARGET_ID,
primary: STEP_INTO_KEYBINDING | KeyMod.CtrlCmd,
primary: KeyMod.CtrlCmd, // {{SQL CARBON EDIT}} - Remove STEP_INTO_KEYBINDING
when: ContextKeyExpr.and(CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_IN_DEBUG_MODE, CONTEXT_DEBUG_STATE.isEqualTo('stopped')),
weight: KeybindingWeight.WorkbenchContrib,
handler: async (accessor: ServicesAccessor, _: string, context: CallStackContext | unknown) => {
Expand Down

0 comments on commit 839d8b2

Please sign in to comment.