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 #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
modifiers | list of | Yes | cmd ctrl opt shift fn hyper | One or more of cmd, ctrl, opt, shift, fn, hyper. |
Examples #
Shift held: alternate action
When
- Press ⌃⌥J
Only if
- If ⇧ is held
Do
- Show “Shift was held”
Shift not held
When
- Press ⌃⌥J
Only if
- If ⇧ isn't held
Do
- Show “Shift was up”