From b9cdfe55cc0b190a5e4013724cac736c0537eb64 Mon Sep 17 00:00:00 2001 From: vivek Date: Wed, 20 Nov 2024 12:50:20 +0530 Subject: [PATCH 1/2] Update keybinding for ShowAllSymbolsAction to include Alt modifier --- src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts b/src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts index 8be969e07884c..33d5872bf056f 100644 --- a/src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts +++ b/src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts @@ -29,7 +29,7 @@ registerAction2(class ShowAllSymbolsAction extends Action2 { f1: true, keybinding: { weight: KeybindingWeight.WorkbenchContrib, - primary: KeyMod.CtrlCmd | KeyCode.KeyT + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyT }, menu: { id: MenuId.MenubarGoMenu, From 1cdb7f9f87fbd56ae54975abb4b3b14fc10c91f4 Mon Sep 17 00:00:00 2001 From: vivek Date: Sun, 24 Nov 2024 12:42:37 +0530 Subject: [PATCH 2/2] Add Alt modifier keybinding for ShowAllSymbolsAction in web context --- .../contrib/search/browser/searchActionsSymbol.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts b/src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts index 33d5872bf056f..c333fc4f9fe5a 100644 --- a/src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts +++ b/src/vs/workbench/contrib/search/browser/searchActionsSymbol.ts @@ -10,6 +10,9 @@ import { Action2, MenuId, registerAction2 } from '../../../../platform/actions/c import { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js'; import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js'; import { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.js'; +import { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js'; +import { EditorContextKeys } from '../../../../editor/common/editorContextKeys.js'; +import { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js'; //#region Actions registerAction2(class ShowAllSymbolsAction extends Action2 { @@ -27,10 +30,18 @@ registerAction2(class ShowAllSymbolsAction extends Action2 { mnemonicTitle: nls.localize({ key: 'miGotoSymbolInWorkspace', comment: ['&& denotes a mnemonic'] }, "Go to Symbol in &&Workspace..."), }, f1: true, - keybinding: { + keybinding: [{ weight: KeybindingWeight.WorkbenchContrib, - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyT + primary: KeyMod.CtrlCmd | KeyCode.KeyT }, + { + weight: KeybindingWeight.WorkbenchContrib, + when: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, IsWebContext), + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyT, + mac: { primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KeyT } + } + + ], menu: { id: MenuId.MenubarGoMenu, group: '3_global_nav',