-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remapping command+h on macos doesn't work #948
Comments
I dont know of a way around it. As far as I understand cocoa key processing (and I am no expert) those shortcuts are intercepted by the OS before reaching the application. |
One way around this is to set up an app-specific keybinding in Preferences, which can override the default keybinding. I've moved the Some other potential options: https://apple.stackexchange.com/questions/101754/os-x-disable-cmd-h-or-hide-app-command |
iTerm manages to do it if you specify a custom key binding, which is why I said there's probably a way. |
Well, I am happy to learn from iTerm if you can figure out what it does. |
If you figure out how to do it, feel free to send a PR (assuming it requires jumping through only a reasonable number of hoops). In the meantime closing this issue. |
It turns out mappings for command+h do work in fullscreen, where the hide option in the menu is disabled. I normally work in fullscreen so that's good enough for me. For non fullscreen mode, manually removing the key equivalent on the hide menu item when command+h is mapped might work. |
Hmm too much work at least for me. Patches welcome. |
I use this to map "Hide Kitty" to something untypable, and then use Cmd-h in kitty shortcuts: if ! defaults read net.kovidgoyal.kitty NSUserKeyEquivalents | grep -q "Hide kitty"; then
defaults write net.kovidgoyal.kitty NSUserKeyEquivalents -dict-add "Hide kitty" '~^$\\U00a7'
fi I find having it as a shell command I can run in my dotfiles makes it easy enough that a hack in kitty wouldn't be necessary. |
That was a great suggestion, thanks! The same method though does not work for |
Any shortcuts that exist in the default configuration can be configured directly in kitty.conf. There is no need for these workarounds. https://sw.kovidgoyal.net/kitty/conf/#keyboard-shortcuts For example, for kitty -o "map cmd+k no_op" kitty +kitten show_key -m kitty |
@page-down you are right, I managed to get this to work. Simply reloading the |
A mapping such as
map super+h previous_window
doesn't override the system's Hide shortcut, so pressing command+h hides Kitty. There's probably some way around this, not too sure what it is.The text was updated successfully, but these errors were encountered: