From b7265738444f1eee05762341b4361ee6452a4154 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Wed, 26 Jun 2019 17:44:02 -0700 Subject: [PATCH] menubar alt key settings cleanup --- .../workbench/browser/parts/titlebar/menubarControl.ts | 10 ++++++---- src/vs/workbench/browser/workbench.contribution.ts | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts index 3c6b5806aaf..1e7c9049c09 100644 --- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts +++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts @@ -42,7 +42,7 @@ export abstract class MenubarControl extends Disposable { protected keys = [ 'window.menuBarVisibility', 'window.enableMenuBarMnemonics', - 'window.disableCustomMenuBarAltFocus', + 'window.customMenuBarAltFocus', 'window.nativeTabs' ]; @@ -610,9 +610,11 @@ export class CustomMenubarControl extends MenubarControl { } private get currentDisableMenuBarAltFocus(): boolean { - let disableMenuBarAltBehavior = this.configurationService.getValue('window.disableCustomMenuBarAltFocus'); - if (typeof disableMenuBarAltBehavior !== 'boolean') { - disableMenuBarAltBehavior = false; + let settingValue = this.configurationService.getValue('window.customMenuBarAltFocus'); + + let disableMenuBarAltBehavior = false; + if (typeof settingValue === 'boolean') { + disableMenuBarAltBehavior = !settingValue; } return disableMenuBarAltBehavior; diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index e6851e575ba..e13b2539b22 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -291,14 +291,14 @@ import { isMacintosh, isWindows, isLinux, isWeb } from 'vs/base/common/platform' 'type': 'boolean', 'default': true, 'scope': ConfigurationScope.APPLICATION, - 'description': nls.localize('enableMenuBarMnemonics', "If enabled, the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead."), + 'description': nls.localize('enableMenuBarMnemonics', "Controls whether the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead."), 'included': isWindows || isLinux }, - 'window.disableCustomMenuBarAltFocus': { + 'window.customMenuBarAltFocus': { 'type': 'boolean', - 'default': false, + 'default': true, 'scope': ConfigurationScope.APPLICATION, - 'markdownDescription': nls.localize('disableCustomMenuBarAltFocus', "If enabled, disables the ability to focus the menu bar with the Alt-key when not set to toggle."), + 'markdownDescription': nls.localize('customMenuBarAltFocus', "Controls whether the menu bar will be focused by pressing the Alt-key. This setting has no effect on toggling the menu bar with the Alt-key."), 'included': isWindows || isLinux || isWeb }, 'window.openFoldersInNewWindow': { -- GitLab