I want to disable the system-wide use of command-H to hide the current app; among other reasons, I hit it by accident sometimes. I also want to use that hotkey to do a particular task in Word. So I was very pleased that hotkey triggers are swallowed! I created a macro with a command-H hotkey trigger that checks to see if the current app is Word, and if it is, it does the task; if it isn’t, the macro does nothing. This worked beautifully until today, when I find that KM Is no longer swallowing the command-H hotkey! Now when I type command-H, the current app is hidden as the macro begins. (Testing with display-text actions at various places in the macro confirms that it’s running, but the current app hides as the macro begins.)
Other hotkey triggers are still being swallowed. Why not command-H?
Yes, I know that’s what command-H does by default. I don’t want it to do that, and defining a macro triggered by command-H ought to prevent command-H from doing it, because KM should swallow the trigger. But, as I said, KM is no longer doing so. That’s the problem.
Thanks, Chris. I’ve rebooted a couple of times since I posted this, and KM is still not swallowing the command-H hotkey.
The macro does run; as I said, I’ve inserted display-text actions in it to confirm this.
Both Keyboard Maestro and Keyboard Maestro Engine are listed and checked under System Preferences: Security and Privacy: Privacy: Accessibility. Nothing else in the troubleshooting page seems relevant.
Other hotkeys I’ve checked are being properly swallowed.
Help? There is no way to disable the command-H “hide front app” command in the Finder; I literally punched the air when I realized I could do it with KM! And it worked for a while!
Please upload the macro in addition to the image. That saves a lot of time and effort for people who are willing to test it.
You can export it and drag the file into the forum editor, or you can use the share button in the Keyboard Maestro Editor. (See Using the Keyboard Maestro Forum)
I disabled all but the first display text actions. Still fine.
It eats ⌘H just as it should, and it functions in Word as it should – except that I don’t have your “Toggle Match Case” macro – but that shouldn’t be an issue.
My conclusion in the absence of other evidence is that you’ve done something to interfere with this macro either within Keyboard Maestro or to your System. So…
Think back to when this problem started – did you change anything in Keyboard Maestro – did you install any new software on your system?
Do your detective work and run through the troubleshooting process.
Some instruction is available on the wiki under Troubleshooting.
Disable the macro completely and experiment with ⌘H.
Does it work the way it’s supposed to?
Create a brand new macro with ⌘H as the hotkey trigger, and set it to just beep.
Does that work?
If this still fails to eat ⌘H then keep working the troubleshooting process.
Other debugging methodology:
Disable every action in the macro, and reenable them one at a time.
The problem is due to the recently installed SuperTab. Once I quit ST, bang, KM Is properly swallowing command-H again. Thank you for prompting me to think about recent changes to my system!
I’d love to be able to use both programs, but I don’t know if that could be possible; I don’t know enough about the deep workings of Apple Events to describe the problem to the SuperTab folks any better than “Your app prevents Keyboard Maestro from swallowing a command-H trigger, make it stop” and hope they can go from there. Or perhaps this is something that KM could work around, if I ask Peter nicely? I’d be glad to understand the conflict better, for my own curiosity; but if it comes to a choice, I’m sticking with KM and my macro!
Write up a detailed bug report describing the problematic interaction between the two utilities, and submit to the Keyboard Maestro support address and to the SuperTab people. They may or may not be able to work things out.
Read the Hot Key trigger, particularly the note on terminology at the bottom.
What might be happening is SuperTab might be configuring its own hot key for Command-H. In that case, the Command-H will be swallowed but both the macro will be triggered and SuperTap will be informed of the hot key press and will do whatever it wants to do too.
So if it has a hot key of Command-H and it does the hiding of the applications, then that would look much the same as the hot key not being swallowed.
Yeah – scrutinizing SuperTab, I’m pretty sure that that’s what’s happening, even though it doesn’t describe its workings that way. Welp, so much for SuperTab. Thank you for an amazing program, Peter; I regularly sing its praises to friends!
@peternlewis, this note is very helpful. I suspect most people (like me) don’t know the difference between a “Hot Key” and an app “Command Key”. So I thought I’d make it easy for eveyone, and just quote the wiki here:
A note on terminology:
Hot Key - system wide hot key API (swallows keys and overrides other
behaviours, fires in every application that registers it).
Command Key (or Menu Command Keys or sometimes Menu Shortcut) - menu keys for
selecting a menu, usually but not always with the Command key
modifier, generally application specific (except for the shared menus
like the Services, but they are still application specific, but the
menu is duplicated in each application like the Edit menu typically
is).
Keyboard Shortcut - could be either (hence the use in the System
Preferences, Keyboard preferences).