-
Notifications
You must be signed in to change notification settings - Fork 29.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac shortcut not working (in vscode) [cmd+h or cmd+m] #71800
Comments
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 |
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.
|
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. |
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. |
Moved here, for a better title and visibility: |
@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. |
@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 🙂 |
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. |
I was seeing this on the following version:
After updating to Edit: can confirm shortly after updating it returned |
I’m on |
Version: 1.59.1 Got the same problem. There is a osX workaround to hide the VS app. I leave this here maybe it helps someone.
|
Version: 1.59.1 Also broken for me. |
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 @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)? |
@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) |
This comment has been minimized.
This comment has been minimized.
Same thing here 😴 Version: 1.66.0 |
I've been feeling the Cmd+H / Cmd+M bug for a long time, I didn't realize all this time that it was the markdown previewer! Glad we at least know where it's coming from! I wish I could disable the previewer altogether given this effect — I don't recall even using it. I usually stick to Typora.. Regardless — a note on workarounds
I find this same behavior as well but I also realized that the "Double Click To Switch To Editor" feature also hands back focus in a way that resumes standard Cmd+H / Cmd+M control, and I believe this feature is on by default. Just open a markdown file, open the previewer, then double click anywhere in the previewer to hand focus back and get your keybindings back. It's almost funny. With both panes open you can click on the previewer, nothing works, double click it, key-binds work again, click the previewer and...they're back off. |
My workaround is to just define a Keyboard Maestro macro for command-H that hides VSCode. Not perfect, but it works. |
I also found that the SQLTools extension can cause this problem, they use a shortcut that looks for CMD+E, CMD+H (a sequence). Even though it is not bound to the CMD+H, it prevents the native CMD+H macOS functionality. I don't blame that extension, but I think this is a bug within Visual Studio Code. It could dynamically to the CMD+H only after the CMD+E is struck. |
Vào 16:48, T.6, 1 Th4, 2022 Zy ***@***.***> đã viết:
… Same here.
Version: 1.66.0
Commit: e18005f
<e18005f>
Date: 2022-03-30T05:49:37.118Z (2 days ago)
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Darwin arm64 21.4.0
—
Reply to this email directly, view it on GitHub
<#71800 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXWFI3QFFZNMCJAU4BOYR3LVC3A5LANCNFSM4HD4HNBQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Vào 18:04, T.2, 4 Th4, 2022 10bo ***@***.***> đã viết:
… Same thing here 😴
Version: 1.66.0
Commit: e18005f
<e18005f>
Date: 2022-03-30T05:49:37.118Z (5 days ago)
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Darwin arm64 21.1.0
—
Reply to this email directly, view it on GitHub
<#71800 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXWFI3WOWNXO3LC4GLIKIG3VDLECDANCNFSM4HD4HNBQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thank you for pointing out this workaround. This has worked for me. The workaround for anyone experiencing this issue with Markdown:
Note: Ensure 'Markdown > Preview: Double Click To Switch' is enabled in settings. |
I have a workaround: Open command palette and search: Open Keyboard Shortcuts (JSON) Then put this item in config file: {
"key": "",
"command": "testing.toggleTestingPeekHistory"
} Restart VSCode then it will be fine. |
FINALLY!! thank you! |
This also worked for me. And just a note that making this change in the visual editor for Keyboard Shortcuts (Code -> Preferences -> Keyboard Shortcuts) does not solve it. You really do need to go into the Keyboard Shortcuts JSON and make the change. The important thing for me was to remove the |
Thanks, it worked for me! |
I've had this item in my config for a while, but still ran into this bug today. Restarting VS Code obviously did temporarily fix the issue, but that's not exactly a viable workaround... |
Same here, I tried over week with this shortcut but bug still exist. |
How many more comments and upvotes should this issue receive to get it fixed?... |
I looked into this and created a PR for it. It does not make Cmd+H or Cmd+M work while in a webview (e.g. Markdown preview), but it does fix it breaking those keybindings until you reboot. More details are in the PR. As a workaround until the PR is merged, you can make sure that you focus on a different editor before closing a Markdown preview. You can also use that trick to get it working again instead of having to completely restart VS Code if you accidentally do close the editor while focused on the webview. |
I already had:
Does this not mean the same thing? However, this doesn't always do the trick. It's also hard to reproduce this bug because with |
I have the issue as well but the workaround doesn't work for me as |
Same for me. I can't find "cmd+h" but hiding vscode does not work. |
me too... I can not hide my vsc by And I've been annoyed by this problem for a looooong time... |
Mee too. I can't understand that this is consistently not solved and it stresses me every day. |
For what it's worth, I've recently noticed it happening only in environments that are not the regular text editor, so e.g. a Jupyter notebook. The "What's New" view for patch notes is another one, iirc. |
This happens to me too especially
|
Hello. it is still there and it is very annoying. If I am in a web view, cmd-H will not hide the application, and I am forced to click in a text pane first. I am using VS Code 1.81 and VSCodium 1.80 under macOS Sonoma |
Somehow My Mac M1 (13.5 Ventura) doesn't hide the last window whether it is VSCode (1.84) or terminal or Chrome. Unhide another window and see if you can hide VSCode now. I think it is a mac bug. |
This is not the same issue. The last window on Mac can not be hidden. If you click on menu "%whatever_app_you_have_currently_active%" > "Hide others", it will hide all other apps except %current%. To hide %current%, you have to focus Finder app first. It's not a bug, it has been like that forever. |
I have been experiencing this behavior a lot lately on VSCode 1.87.2 running on a M2 mac (Sonoma 14.4). Has anyone found a consistent workaround so that that ⌘H works? |
Steps to Reproduce:
cmd+h
orcmd+m
does not work (have not tried other shortcut).Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: