4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Visual Studio Codeでエスケープキーの代りに^[を使用する設定

Last updated at Posted at 2018-04-21

TouchBarつきのMacBookでは、エスケープキーが使いにくいので、Escapeキーの代りに ^[を割り当てます。Cmd-K Cmd-s からkeybindigs.jsonを開いて以下を追加。

[
  {
    "key": "ctrl+[",
    "command": "search.action.cancel",
    "when": "searchViewletVisible"
  },
  {
    "key": "ctrl+[",
    "command": "closeFindWidget",
    "when": "findWidgetVisible"
  },
  {
    "key": "ctrl+[",
    "command": "closeReplaceInFilesWidget",
    "when": "replaceInputBoxFocus && searchViewletVisible"
  },
  {
    "key": "ctrl+[",
    "command": "workbench.action.hideInterfaceOverview",
    "when": "interfaceOverviewVisible"
  },
  {
    "key": "ctrl+[",
    "command": "workbench.action.terminal.hideFindWidget",
    "when": "terminalFindWidgetVisible && terminalFocus"
  },
  {
    "key": "ctrl+[",
    "command": "cancelRenameInput",
    "when": "editorFocus && renameInputVisible"
  },
  {
    "key": "ctrl+[",
    "command": "cancelSelection",
    "when": "editorHasSelection && textInputFocus"
  },
  {
    "key": "ctrl+[",
    "command": "closeAccessibilityHelp",
    "when": "accessibilityHelpWidgetVisible && editorFocus"
  },
  {
    "key": "ctrl+[",
    "command": "closeBreakpointWidget",
    "when": "breakpointWidgetVisible && textInputFocus"
  },
  {
    "key": "ctrl+[",
    "command": "closeDirtyDiff",
    "when": "dirtyDiffVisible"
  },
  {
    "key": "ctrl+[",
    "command": "closeFindWidget",
    "when": "editorFocus && findWidgetVisible"
  },
  {
    "key": "ctrl+[",
    "command": "closeMarkersNavigation",
    "when": "editorFocus && markersNavigationVisible"
  },
  {
    "key": "ctrl+[",
    "command": "closeParameterHints",
    "when": "editorTextFocus && parameterHintsVisible"
  },
  {
    "key": "ctrl+[",
    "command": "closeReferenceSearch",
    "when": "referenceSearchVisible && !config.editor.stablePeek"
  },
  {
    "key": "ctrl+[",
    "command": "closeReferenceSearchEditor",
    "when": "inReferenceSearchEditor && !config.editor.stablePeek"
  },
  {
    "key": "ctrl+[",
    "command": "editor.action.webvieweditor.hideFind",
    "when": "webviewEditorFocus && webviewFindWidgetVisible"
  },
  {
    "key": "ctrl+[",
    "command": "hideSuggestWidget",
    "when": "suggestWidgetVisible && textInputFocus"
  },
  {
    "key": "ctrl+[",
    "command": "keybindings.editor.clearSearchResults",
    "when": "inKeybindings && inKeybindingsSearch"
  },
  {
    "key": "ctrl+[",
    "command": "leaveEditorMessage",
    "when": "messageVisible"
  },
  {
    "key": "ctrl+[",
    "command": "leaveSnippet",
    "when": "editorTextFocus && inSnippetMode"
  },
  {
    "key": "ctrl+[",
    "command": "list.clear",
    "when": "listFocus && !inputFocus"
  },
  {
    "key": "ctrl+[",
    "command": "notifications.hideList",
    "when": "notificationCenterVisible"
  },
  {
    "key": "ctrl+[",
    "command": "notifications.hideToasts",
    "when": "notificationToastsVisible"
  },
  {
    "key": "ctrl+[",
    "command": "removeSecondaryCursors",
    "when": "editorHasMultipleSelections && textInputFocus"
  },
  {
    "key": "ctrl+[",
    "command": "search.action.cancel",
    "when": "listFocus && searchViewletVisible && !inputFocus"
  },
  {
    "key": "ctrl+[",
    "command": "settings.action.clearSearchResults",
    "when": "inSettingsSearch"
  },
  {
    "key": "ctrl+[",
    "command": "workbench.action.closeQuickOpen",
    "when": "inQuickOpen"
  },
  {
    "key": "ctrl+[",
    "command": "workbench.action.exitZenMode",
    "when": "inZenMode"
  }
]
4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?