Press and hold keystroke

I would like to press and hold a keystroke. Is there a way to do this? I’ve read before that you but that was an older post so maybe it has changed. Specifically I need to hold number pad 1 and number pad 2 in order to make use of the fast forward and fast reverse transport controls in a recording software. I want the macro to be executed by a MIDI foot controller so that I can use foot control of my software’s transport. I would like the macro executed with a note on command and I will make another macro that cancels it with a note off command.

1 Like

No, Keyboard Maestro cannot press and hold any button or key.

Karabiner is perfect for you use case. Define a key combo in Karabiner and map this to your KM macro.

Later versions of Keyboard Maestro can press and hold keys, modifiers, and mouse buttons.

Although you might not be able to press and hold a non-modifier key literally, you can get around this with two macros (there might be a more efficient way to do this..). One macro is used to send a midi note on message. Rather than keydown, I tell KM to activate it when the key is pressed, so it only happens once. The second macro sends a note off message as soon as the key is released (When this hotkey is released, Send note off). Don't forget to put pauses in between the actionable commands so everything works in the order you want!

Also, even if you don't use MIDI this is a great way to make any key a "modifier" key.