microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.63k stars 29.04k forks source link

Mac shortcut not working (in vscode) [cmd+h or cmd+m] #71800

Open rkdmen opened 5 years ago

rkdmen commented 5 years ago

Steps to Reproduce:

  1. On Release Note Screen
  2. (hide or minimize) cmd+h or cmd+m does not work (have not tried other shortcut).

Does this issue occur when all extensions are disabled?: Yes

timdmackey commented 3 years ago

I'm having this issue everywhere in VSCode, regardless of the view or document open. Issue still occurs when all extensions are disabled.

VSCode Version: 1.56.2 MacOS 10.15.7

douira commented 3 years ago

I also have this issue. I can't even hide the window by right clicking on the application icon in the dock. When I try to hide it that way, the window hides for a split second and then re-appears immediately. cmd + H only works and actually hides the window when a native dialog like the "about" window or the dialog that opens if you close an unsaved file.

Version: 1.57.0
Commit: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c
Date: 2021-06-09T17:22:31.215Z
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin x64 19.6.0
jacobweber commented 3 years ago

Same here. For example, open Git Graph and close it. From then on, while that workspace is open, pressing command-H on the Mac will no longer hide the app. Opened #126859.

ryanromanov commented 3 years ago

I'm unable to hide or minimize with cmd + h / cmd + m regardless of where I am in the editor.

VS Code Version: 1.58.2.

bowernite commented 3 years ago

Moved here, for a better title and visibility:

https://github.com/microsoft/vscode/issues/130194

lramos15 commented 3 years ago

@mjbvz I think this issue is a little bit more annoying than initially thought because it breaks the keybinding for the entire VS code session until you quit the window and re-open it.

bowernite commented 3 years ago

@rkdmen could we rename the issue to clarify that these shortcuts are not just broken during webviews, but rather always? Just want to make sure it gets the attention it deserves πŸ™‚

rolf-langer commented 3 years ago

Happens with current latest version 1.59.0 under macOS Catalina (10.15.7) just with normal code views. Maybe related to the display of the changelog after update. App restart does fix this behavior for me.

nebbles commented 3 years ago

I was seeing this on the following version:

Version: 1.58.2 Commit: c3f126316369cd610563c75b1b1725e0679adfb3 Date: 2021-07-14T22:09:06.581Z Electron: 12.0.13 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Darwin x64 19.6.0

After updating to 1.59.0 seems to have fixed it (although maybe that was just the required restart when updating).

Edit: can confirm shortly after updating it returned

bowernite commented 3 years ago

I’m on 1.59.0, still broken for me

brachycera commented 3 years ago

Version: 1.59.1 Commit: 3866c35 Date: 2021-08-19T11:53:52.479Z Electron: 13.1.7 Chrome: 91.0.4472.124 Node.js: 14.16.0 V8: 9.1.269.36-electron.0 OS: Darwin x64 19.6.0

Got the same problem.

There is a osX workaround to hide the VS app. I leave this here maybe it helps someone.

use CMD + TAB keys to choose the VS code app keep pressing CMD and release the TAB key while holding down the CMD key hit H to hide the VS code app

operatorone commented 3 years ago

Version: 1.59.1 Commit: 3866c3553be8b268c8a7f8c0482c0c0177aa8bfa Date: 2021-08-19T11:53:52.479Z Electron: 13.1.7 Chrome: 91.0.4472.124 Node.js: 14.16.0 V8: 9.1.269.36-electron.0 OS: Darwin x64 20.5.0

Also broken for me.

mhutchie commented 3 years ago

Confirmed that the bug @jacobweber referenced above almost 3 months ago is still occurring in Visual Studio Code 1.61.1.

Version: 1.60.1 Commit: 83bd43bc519d15e50c4272c6cf5c1479df196a4d Date: 2021-09-10T17:09:14.403Z Electron: 13.1.8 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 20.6.0

@mjbvz Would you please consider increasing the priority of this issue, as it has been affecting users for quite some time (worsened by the Webview changes a few months back)?

bowernite commented 3 years ago

@rkdmen could we rename the issue to clarify that these shortcuts are not just broken during webviews, but rather always? Just want to make sure it gets the attention it deserves πŸ™‚ (and the VS Code team closed my other issue, that had a different title)

operatorone commented 3 years ago

Vielen Dank fΓΌr Ihre E-Mail.

Die medienflieger sind unterwegs und ab dem 05.10.2021 wieder zu erreichen. Ihre E-Mail wird erst nach unserer RΓΌckkehr bearbeitet.

Viele Grüße Tilman Behrend


Tilman Behrend | medienflieger GmbH | An der Sicker 7 | 97318 Kitzingen t: 09321.388 28 10 | f: 09321.388 28 09 www.medienflieger.de | @.***

rkdmen commented 3 years ago

Confirmed still not working with latest OS/Vscode. Updated in detail.

rantler commented 3 years ago

Still experiencing this on my machine. It is intermittent though and only happens after VSCode has been running for some time. If I quit and restart the VSCode, the Cmd-H works as expected for some period of time afterward.

Version: 1.60.2
Commit: 7f6ab5485bbc008386c4386d08766667e155244e
Date: 2021-09-22T11:59:27.195Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.6.0
amordo commented 3 years ago

opt+cmd+h still doesn't work

Version: 1.61.0 Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea Date: 2021-10-07T18:11:58.853Z (16 hrs ago) Electron: 13.5.1 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 20.6.0

guimaraes13 commented 3 years ago

I was having this issue with the cmd + H shortcut, and this solved the issue for me.

Checking the VSCode keymaps, I figured out that this shortcut was assigned to another commanding within VSCode. After deleting the shortcut for the VSCode command and restarting VSCode, cmd + H came back to work to hide VSCode.

amordo commented 3 years ago

@guimaraes13 I'm surprised, that after reloading VSCode shortcut started working! TY!

douira commented 3 years ago

I checked the keyboard shortcuts. By default a shortcut called "Test: Toggle Test History in Peek" is assigned to cmd + H. Maybe this isn't a bug but rather a bad default keymap? One way or another, VSCode needs to fix this. Be it a bugfix or by changing the default assignment for that command.

bowernite commented 3 years ago

Restarting VS Code, whether you removed the default keymap or not, will always fix this issue.

The proposed keymap solution also doesn’t addressed the broken ⌘M behavior.

So I’m afraid I don’t think this solution is a viable workaround πŸ˜•

jakeboone02 commented 3 years ago

This appears to be working now, for both Cmd+H (Hide Visual Studio Code) and Opt+Cmd+H (Hide Others).

Version: 1.61.1 Commit: c13f1abb110fc756f9b3a6f16670df9cd9d4cf63 Date: 2021-10-14T01:23:30.274Z Electron: 13.5.1 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 20.6.0

jacobweber commented 3 years ago

Not for me -- opened and closed Git Graph, and command-H stopped working.

Version: 1.61.1 Commit: c13f1abb110fc756f9b3a6f16670df9cd9d4cf63 Date: 2021-10-14T01:23:30.274Z (23 hrs ago) Electron: 13.5.1 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 18.7.0

egorgam commented 2 years ago

Doesn't work for me too

Version: 1.62.1 Commit: f4af3cbf5a99787542e2a30fe1fd37cd644cc31f Date: 2021-11-05T09:23:14.144Z (4 days ago) Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 21.1.0

UPD: but it was (temporary) fixed after I set "window.clickThroughInactive": false, and then after restart set it back to true

malhar-trivedi commented 2 years ago

For me cmd + h works after launching the vscode but after few hours, it stops working. I have to restart to make it work again.

Version: 1.62.1 Commit: f4af3cbf5a99787542e2a30fe1fd37cd644cc31f Date: 2021-11-05T09:23:14.144Z (6 days ago) Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 20.6.0

Fischmuetze commented 2 years ago

same here

For me cmd + h works after launching the vscode but after few hours, it stops working. I have to restart to make it work again.

Version: 1.62.2 Commit: 3a6960b964327f0e3882ce18fcebd07ed191b316 Datum: 2021-11-11T20:59:05.913Z (Vor 3 Tagen) Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 Betriebssystem: Darwin x64 20.6.0

ilyabirman commented 2 years ago

Same problem for me in 1.62.2, annoying as hell :–( I had no idea I used to press ⌘H every minute or so. Please please fix!

crh19970307 commented 2 years ago

Command-M still not working for me!!!!!! My environment: VsCode Version: 1.62.2 MacOS Version: 10.15.5

kdzhang commented 2 years ago

same here

For me cmd + h works after launching the vscode but after few hours, it stops working. I have to restart to make it work again.

Version: 1.62.3 Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247 Date: 2021-11-17T08:14:33.711Z (1 wk ago) Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin arm64 21.1.0

icezohu commented 2 years ago

image image changing these key bindings could fix the problem

Version: 1.62.3 Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247 Date: 2021-11-17T07:59:13.865Z Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 21.1.0

Fischmuetze commented 2 years ago

yes, thank you! the first one was helping for my configuration - solved!

Am 08.12.2021 um 03:17 schrieb icezohu @.***>:

changing these key bindings could fix the problem

Version: 1.62.3 Commit: ccbaa2d Date: 2021-11-17T07:59:13.865Z Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 21.1.0

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

andrewmcdonald-oxb commented 2 years ago

Made no difference to me unfortunately. Not sure I remember that "toggle test history in peek" command being there when I first started experiencing the issue. It's still a problem after viewing markdown preview in the VS Code window, such as the release notes.

ra4ul commented 2 years ago

This broken Cmd+h binding has existed for years now. It manifests (at least on my Mac) only after opening certain kinds of files. One sure fire way to reproduce it is to open up the Preview version of a Markdown file (with Cmd+Shift+v) and then close the Preview. Cmd+h no longer functions while that window is active, but will work properly if you open up a new window.

Is this really not a priority given its importance to accessibility?

EDIT: I'm just now reading the previous comment, reiterating the clear Markdown Preview connection.

angusm73 commented 2 years ago

Success! βœ… It's working for me after:

Would be nice if vscode didn't overwrite this global keyboard shortcut though.


Edit: doesn't work after a short while. Only works temporarily after restarting VS code - which is a less than ideal solution when using the integrated terminal for a long-running process πŸ˜’

bengry commented 2 years ago

Success! βœ… It's working for me after:

  • Remove key binding for Toggle test history in peek
  • Restart vscode
  • cmd+h & cmd+m work now! πŸŽ‰

Would be nice if vscode didn't overwrite this global keyboard shortcut though.

Doesn't fix it for me.

godly-devotion commented 2 years ago

Success! βœ… It's working for me after:

  • Remove key binding for Toggle test history in peek
  • Restart vscode
  • cmd+h & cmd+m work now! πŸŽ‰

Would be nice if vscode didn't overwrite this global keyboard shortcut though.

Doesn't fix it for me.

Yup doesn't work for me either. It works initially because VS Code was restarted but after some time cmd + h no longer works again despite removing the key bindings.

Also couldn't help but notice that this bug is as old as covid..

operatorone commented 2 years ago

Yeah, same here. I thought the removal of the keybinding helped initially, I discovered it didn't after a short time.

bfsmith9 commented 2 years ago

Success! βœ… It's working for me after:

  • Remove key binding for Toggle test history in peek
  • Restart vscode
  • cmd+h & cmd+m work now! πŸŽ‰

Would be nice if vscode didn't overwrite this global keyboard shortcut though.

Yes, this worked for me too. It also fixed "Hide others", which is cmd + option + h. Thank you.

mjbvz commented 2 years ago

/cc @connor4312 Are these commands from the test explorer? Do they need to better scoped?

oliverepper commented 2 years ago

Still not working for me. No keybindings inside VSCode.

connor4312 commented 2 years ago

Are these commands from the test explorer? Do they need to better scoped?

This is scoped for when the peek is open:

https://github.com/microsoft/vscode/blob/994f907fa8b39c89440bc01b2486c7380721f786/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L1722

also, this issue predates testing support in VS Code, and people report that even without the keybinding it stops working, so I'm not sure it's the root cause.

larzon83 commented 2 years ago

also, this issue predates testing support in VS Code, and people report that even without the keybinding it stops working, so I'm not sure it's the root cause.

I also have no keybindings. Still stops working.

mjbvz commented 2 years ago

@larzon83 @oliverepper Have you tried removing the keybindings as suggested here: https://github.com/microsoft/vscode/issues/71800#issuecomment-997485090

jmkng commented 2 years ago

Success! βœ… It's working for me after:

  • Remove key binding for Toggle test history in peek
  • Restart vscode
  • cmd+h & cmd+m work now! πŸŽ‰

Would be nice if vscode didn't overwrite this global keyboard shortcut though.

Doesn't fix it for me.

Worked for me, I might suggest that you reset all of your keybindings for VScode and MacOS to defaults and then erase the suggested keybinding.

niekvandepas commented 2 years ago

Success! βœ… It's working for me after:

  • Remove key binding for Toggle test history in peek
  • Restart vscode
  • cmd+h & cmd+m work now! πŸŽ‰

Would be nice if vscode didn't overwrite this global keyboard shortcut though.

Doesn't fix it for me.

Worked for me, I might suggest that you reset all of your keybindings for VScode and MacOS to defaults and then erase the suggested keybinding.

@jokocide Are you sure this fixed it persistently and not just for a few hours?

jmkng commented 2 years ago

Success! βœ… It's working for me after:

  • Remove key binding for Toggle test history in peek
  • Restart vscode
  • cmd+h & cmd+m work now! πŸŽ‰

Would be nice if vscode didn't overwrite this global keyboard shortcut though.

Doesn't fix it for me.

Worked for me, I might suggest that you reset all of your keybindings for VScode and MacOS to defaults and then erase the suggested keybinding.

@jokocide Are you sure this fixed it persistently and not just for a few hours?

I noticed that it stopped working the next morning, but closing and re-opening VScode restored functionality again.

andrewmcdonald-oxb commented 2 years ago

For everyone noticing it starts then stops working, can we check whether this coincides with displaying a markup document (such as the new version readme which automatically appears when VSCode updates itself)?

chalkygames123 commented 2 years ago

Ha, that seems to be the exact cause! Once I select Help > Release Notes, cmd+h, alt+cmd+h and cmd+m no longer work.

larzon83 commented 2 years ago

Ha, that seems to be the exact cause! Once I select Help > Release Notes, cmd+h, alt+cmd+h and cmd+m no longer work.

Yes, I can reproduce it as well!