Mac OSX remove Hide Window keyboard shortcut

When I press commandH, the current window is hidden. I'd like to disable this shortcut, because I'm using it in another application.

I opened System Preferences -> Hardware -> Keyboard -> Keyboard Shortcuts -> Application Shortcuts -> All Applications

I tried adding "No Action" as MenuTitle and commandH as KeyboardShortcut (see screenshot below).

screenshot

But this doesn't work.

What am I doing wrong?

Edit: What solved my problem was assigning shortcut commandOptionShiftH to actions like "Hide Eclipse". Since I never press this key combination, this action never gets executed.


Solution 1:

Adding an answer based on the Edit: above as it took me a while to figure this out.

If you want to disable the -h shortcut you have to do it per-app.

First open the app, and confirm from the preferences what text option the shortcut is mapped to.

Using Kitty.app as an example, for me it's Hide kitty.

Original Kitty Preferences Screenshot

Then you open System Preferences and go to Keyboard -> Shortcuts -> App Shortcuts and then click +.

Limit it to the relevant app, enter Hide <yourappname> (e.g. Hide kitty in my case), and pick an obscure key combination. I use the section symbol because it's not in my default layout so I won't type it by mistake.

System Preferences Screenshot

Now when you click on the Application's menu, you should see your new shortcut has been set, and -h will no longer hide that application.

Kitty Menu after changing the shortcut

Unfortunately there doesn't seem to be a way to do this for all apps.

See also this Apple Support Page

Solution 2:

Adding yet another option:

If you use the Karabiner app (extremely useful in its own right), there is a "Complex Modification" that disables command-h window hiding. Install the app and see the listing: Prevent unintended command-h hide window on this page.