Hot Key with Modifiers Not Working


I am using TouchOSC on my iPad.

Hitting a button on it triggers Oscualtor to output the key-combo Option/Command/Z.

I then have Keyboard Maestro receiving that as a hot-key trigger to trigger a Keyboard Maestro macro.

The problem is that Keyboard Maestro is not responding?

I think that Keyboard Maestro is expecting the Option/Command modifiers to be held down and THEN the key Z typed, but it is receiving all three (the two modifiers and the Z key) at the same instant and Keyboard Maestro is not reacting to that hot-key trigger for that reason.

Is there an easy way to deal with this?

I went back in the forum and found lengthy posts about this and things like "AppleScript", which unfortunately is beyond my abilities!


It's more likely that KM is listening for actual key presses -- hardware events -- but Osculator is sending simulated hardware events.

But Osculator can also run AppleScripts -- and KM macros can be triggered via AppleScript. If you select "AppleScript" in your macro's "or by script" part of the trigger section in KM Editor you can see the code you need. For example:

-- ignoring application responses
tell application "Keyboard Maestro Engine"
	do script "5FC24990-E3B7-42BC-9EE1-67C8610C9BCE"
	-- or: do script "Start Screensaver"
	-- or: do script "5FC24990-E3B7-42BC-9EE1-67C8610C9BCE" with parameter "Whatever"
end tell
-- end ignoring

You can just copy that as-is, create a new script in the "AppleScript" pane of the "Parameters" window, and paste your script in. When Osculator receives the associated trigger event it will run the AppleScript, which will in turn trigger your KM macro.

1 Like

Whoa thank you so much!

That actually makes sense to me..even with my lack of computer skills.

Thanks very much for that.

Also if anybody in the future reads this, TouchOSC (Mk. 1, I have not moved up yet to the new version, which looks fabulous), just in this limited usage, benefits from setting the send OSC message to send both on push AND on release. There is that option, and I had it set to send only on push, but when I changed that, it was more reliable.

Nige-S's response above though makes it really reliable and not flakey the way TouchOS Mk. 1 often is.

I am aware of that and know to hit the button again if it doesn't work, but if other people are on your DAW in the recording studio, they will just figure things don't work.

Nigo-S's response above makes it rock-solid.