Browse the docs

Modifier held

Passes while all of the listed modifier keys are held.

modifiers held down

Keyboard Maestro: Modifiers

Details #

Checks the keyboard at the moment the condition is evaluated. It passes when every key in modifiers is down: cmd, ctrl, opt, shift, fn or hyper (all of cmd, ctrl, opt and shift). An empty list never passes.

Every condition accepts "negate": true, which flips the verdict. The trace records what was compared before the flip, so a negated condition that blocks a macro still shows the real values.

Conditions in an Only if list combine with all: every one must pass, and an empty list always passes. An if step or a repeat loop takes a match of all (default) or any.

The trace shows down, the sorted list of modifiers that were held.

Parameters #

ParameterTypeRequiredValuesWhat it does
modifierslist ofYescmd ctrl opt shift fn hyperOne or more of cmd, ctrl, opt, shift, fn, hyper.

Examples #

Shift held: alternate action
When
  1. Press ⌃⌥J
Only if
  1. If ⇧ is held
Do
  1. Show “Shift was held”
Open in Switchboard to try it
Shift not held
When
  1. Press ⌃⌥J
Only if
  1. If ⇧ isn't held
Do
  1. Show “Shift was up”
Open in Switchboard to try it

Gotchas #

See also #