Adding modifier keys

Is there any way to make additional modifier keys that can be used with Keyboard Maestro? It would be great if i could use a midi footpedal (or a key that i dont use often on the keyboard) as a modifier key

Add a “USB Device Key” trigger from the trigger menu and test if the input is seen by KM:

Thanks Tom. I just tried it and Keyboard Maestro doesnt pick up the input. It only picks up the input when midi trigger is selected.

Im not sure if i explained what i was looking for well though. I meant additional modifier keys, like making an entirely new modifier key in addition to command, option, ctrl, etc.

Not as trigger, AFAIK. But inside an macro you can do things like this:

_[example] Arbitrary Modifier Key.kmmacros (2.3 KB)

This way you can use any key as “modifier”. (You can also trigger other macros from within the “A is down” condition.)

Is it that what you meant?

hmmm… I’m not sure. A bit confused about what you mean.

I tried running it on its own (with no response) and tried including it in another macro (and it showed me the popup about A).

Could you please explain how you would use this?

Also, the “if all of the following is true” conditions part doesnt have any option for midi, so i’m supposing that its not possible to do with midi?
I have a midi footpedal so I was thinking it would be great if i could use that to act like an additional “command” key (but different than command or option etc)

Well, it should simply show you the “A is pressed” or the “A is not pressed” alert, depending on if you are holding down A shortly after the macro has launched. Of course the Alert action is placeholder (demo) action, and should be replaced by something useful.

My macro was meant as a reply to your question:

How about using variables ?

I want to do the same thing and that is the first that came to my mind. I am really new to KM though.

Hey, so I'm not super experienced, but I think you could have your midi trigger, but also have an if condition that mandates when your key is pressed. In the picture below, you would use whichever trigger you like best (I just threw in all of them because I'm not certain what you want) and then you would also have to be holding a down. Alternatively, you could reverse it (require a down and then the if condition be USB.,

RE: MIDI Foot Pedal Wizardry

Hi all,

I know this is an old thread, but I've been fantasizing about this for years because I have an automation fantasy: Being able to use a foot pedal as an additional modifier key or "context toggle/clutch". Anyone who plays piano or drums will understand the motivation behind this. And anyone who uses Vim can probably imagine the benefits. That said, I'd like to use my MIDI keyboard's foot pedal as a "modifier" or – at the very least – see how other KM users are leverage MIDI in their setup.

Do you know of any examples, successful implementations, or use-cases?

Per the existing discussion here, I'm including a post I made elsewhere on the KM Forum. It might prove pertinent...

One system I've set up with Keyboard Maestro that I'm particularly proud of is the use of faux-modifier keys. It opens up a great deal of potential for more keystrokes and more specific contextual uses. For example, I have a macro that when I'm holding down [ALT + ;], temporarily enables certain other macros triggers until I release [ALT + ;]. This macro (see below) takes the text selection (or lack thereof) and wraps it with bookends (a 'pre' variable and a 'post' variable). What makes it special is that it's triggered by this key combination:

[ALT + ;] + [ALT + 2]

The reason for depicting the keystroke like this is because [ALT + 2] isn't enabled unless [ ; ] is down. And since [ALT] is already down, it's not necessary to include with the [ ; ]. It all sounds very convoluted, but is actually quite simple; If you've driven a manual/stick-shift automobile, it's a lot like a clutch.

Here's a handy example macro...which you can also use as a template:

DOWNLOAD KM MACRO: Text Wrapper - PHP Multiline Comment Selection -

1 Like