Vscode: Cmd-Q on Mac is captured as a short-cut combination.

Created on 11 Oct 2016  Â·  10Comments  Â·  Source: microsoft/vscode

VSCode doesn't close with standard Mac short-cut key combination.

  • VSCode Version: Code 1.6.0 (e52fb0bc87e6f5c8f144e172639891d8d8c9aa55, 2016-10-10T18:28:55.412Z)
  • OS Version: Darwin x64 16.0.0
  • Extensions: EditorConfig.EditorConfig-0.3.3, PeterJausovec.vscode-docker-0.0.6, TimonVS.ReactSnippetsStandard-1.0.3, TwentyChung.jsx-0.0.1, Tyriar.sort-lines-1.1.0, dbaeumer.vscode-eslint-1.0.7, eg2.tslint-0.5.39, hdg.live-html-previewer-0.0.1, hypnoes.word-count-0.1.1, joelday.docthis-0.3.4, michelemelluso.gitignore-1.0.1, ms-vscode.csharp-1.4.1, msjsdiag.debugger-for-chrome-1.1.0, sidthesloth.html5-boilerplate-1.0.1, steve8708.Align-0.2.0, stevencl.addDocComments-0.0.8, vilicvane.es-quotes-0.2.4, wmaurer.change-case-0.4.1, wmaurer.join-lines-0.1.5, zgudino.editorconfig-vscode-snippet-0.1.0

Steps to Reproduce:

  1. Open vscode on a mac
  2. Type Cmd-Q to close
  3. Status bar notes that Cmd-Q was pressed. Waiting for second key of chord

Expected behaviour:

  1. Open vscode on a mac
  2. Type Cmd-Q to close
  3. vscode should close
*caused-by-extension

Most helpful comment

You can at least put the following at the end of your shortcut settings (keybindings.json):

{ "key": "cmd+q",                 "command": "workbench.action.quit" }

Personal settings are evaluated last, so if it's something inside of VSCode it would override it again to the default key. Doesn't really help to find what's the cause of the problem, but at least it has the nice side effect that it works as expected ;)

If the key doesn't work with this keybinding entry, it's most likely some other external tool. There are so many of them on macOS, so it's hard to guess. I'd check the OS preferences (Keyboard-Shortcuts) first. Maybe you have something like KeyboardMaestro, Alfred, etc. installed?

All 10 comments

Works for me. Do you have some custom keybindings?

No custom keyboard settings.
I'm wondering if something else is wrong. The file icons don't show either. Also, I'm using OSX Sierra.

On Oct 11, 2016, at 1:49 PM, Isidor Nikolic [email protected] wrote:

Works for me. Do you have some custom keybindings?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Can you please start vscode with --disable-extensions. That way we will figure out if one of your extensions is causing this

Had the same problem and investigated which extension is causing it. In my case it's "Live HTML Previewer" (https://marketplace.visualstudio.com/items?itemName=hdg.live-html-previewer), which uses "CMD-Q" as a chord for its commands. I guess the author is coming from a different platform and is simply not aware of the system shortcut.

@cramhead There might be other extensions that have this behaviour, you can check for the predefined shortcuts under the "Contributions" tab in the extension description.

This seems to be casue by an extension, thus closing the issue since there is nothing to be done on the vscode side

How to know which extension overwrites the default MacOS key bindings?

@wheelhot There's a contributions tab in every extensions overview page which lists every shortcut:

screen shot 2016-12-20 at 08 53 03

Thanks!

I just checked my extensions and none seem to map to cmd+q, any other way to find out what could be overriding it? I notice it's only an issue if I were to cmd+q in the code editor itself, if I were to click on the file browser on the left, the program will quit normally

You can at least put the following at the end of your shortcut settings (keybindings.json):

{ "key": "cmd+q",                 "command": "workbench.action.quit" }

Personal settings are evaluated last, so if it's something inside of VSCode it would override it again to the default key. Doesn't really help to find what's the cause of the problem, but at least it has the nice side effect that it works as expected ;)

If the key doesn't work with this keybinding entry, it's most likely some other external tool. There are so many of them on macOS, so it's hard to guess. I'd check the OS preferences (Keyboard-Shortcuts) first. Maybe you have something like KeyboardMaestro, Alfred, etc. installed?

Thanks! That keybinding entry worked! Finally, the annoying issue I have with VSCode is gone.

Was this page helpful?
0 / 5 - 0 ratings