Skip to content
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

Add MacOS menu option to close window #3240

merged 1 commit into from Jan 13, 2021


Copy link

I often find that I accidentally hit Cmd-W when coding, and accidentally close the window, sometimes losing changes, and often just having to deal with the pain of recovering swap files. MacOS allows you to overwrite the shortcuts for an app, but it seems like it's only if the command is explicitly in one of the menus.

For example, I am able to create a new shortcut for "Quit kitty" so that I don't accidentally quit the entire application, but I am not able to do it for "Close" since there is not a dedicated menu option for it.

Other applications I have looked at have it in the "Window" menu tab and call it "Close", so the UX will be similar enough to other MacOS applications.

@kovidgoyal kovidgoyal merged commit 578bf96 into kovidgoyal:master Jan 13, 2021
Copy link

Copy link
Contributor Author

quentin-fox commented Jan 13, 2021

Thanks! Looks like a very useful option, will look into it.

Copy link

I see this is already merged, but is it too late to make an argument for why the default shortcut should be different?

This violates how all other Mac apps treat that shortcut (⌘w). ⌘w closes the window when the window doesn't have tabs, but when the window has tabs it closes only the current tab (this is the case in Safari, Finder, any other tabbed app I know of).

It seems the problem can be solved if the default shortcut (if a default is needed) in the commit is changed to ⇧⌘w, which would still allow the user to change it in System Preferences, but would be more in line with Mac app conventions and would be less surprising to new users.

Copy link

Exhibits A and B to support my case:

Screen Shot 2021-01-16 at 2 50 55 AM

Screen Shot 2021-01-16 at 2 50 43 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants