User Tools

Site Tools


trigger:Hot_Key

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
trigger:Hot_Key [2016/05/14 01:43]
peternlewis
trigger:Hot_Key [2021/10/12 01:50]
peternlewis
Line 1: Line 1:
 +====== Hot Key Trigger ======
 +
 The *Hot Key trigger* is perhaps the most common and most basic of all triggers. ​ When you press the configured keyboard key, the system swallows the keystroke, and Keyboard Maestro executes the macro. The *Hot Key trigger* is perhaps the most common and most basic of all triggers. ​ When you press the configured keyboard key, the system swallows the keystroke, and Keyboard Maestro executes the macro.
  
Line 7: Line 9:
 The keystroke may include zero or more of the normal modifiers (Command, Option, Shift, Control), together with another key (such as a letter, number, function key or other keys). ​ The Fn key is not a modifier and cannot be used as such.  It retains its normal purpose in toggling the function keys role, and so it might be part of a hot key, but only if the function keys normally have their hardware (eg brightness up) role and then Fn key makes them into a function key suitable for use in a hot key trigger. The keystroke may include zero or more of the normal modifiers (Command, Option, Shift, Control), together with another key (such as a letter, number, function key or other keys). ​ The Fn key is not a modifier and cannot be used as such.  It retains its normal purpose in toggling the function keys role, and so it might be part of a hot key, but only if the function keys normally have their hardware (eg brightness up) role and then Fn key makes them into a function key suitable for use in a hot key trigger.
  
-You can configure the hot key trigger to execute the macro when the key is pressed, when it is released, or repeatedly while the key is held down.  This allows you to do things like have a macro execute when the key is pressed, and then a second macro execute when the key is released, for example to toggle a setting on and then off again.+You can configure the hot key trigger to execute the macro when the key is pressed, when it is long pressed (v10.0+), when it is released, or repeatedly while the key is held down.  This allows you to do things like have a macro execute when the key is pressed, and then a second macro execute when the key is released, for example to toggle a setting on and then off again.
  
 You can configure the hot key trigger to execute when the key is tapped (press and released quickly) each time, the first tap, double tapped, triple tapped, or quadruple tapped (v7.0+). ​ Keep in mind that Keyboard Maestro cannot see the future, so "​tapped once" will fire even on the first tap even if you tap the key twice ("​tapped"​ would fire both times). You can configure the hot key trigger to execute when the key is tapped (press and released quickly) each time, the first tap, double tapped, triple tapped, or quadruple tapped (v7.0+). ​ Keep in mind that Keyboard Maestro cannot see the future, so "​tapped once" will fire even on the first tap even if you tap the key twice ("​tapped"​ would fire both times).
 +
 +You can use the [[token:​TriggerValue|%TriggerValue% Text Token]] to determine the hot key that was typed.
  
 Hot Keys will override application menu Command Keys or any other keys typically used in applications, ​ but if any other application registers the same hot key, then both your macro and the other application'​s action will happen. Hot Keys will override application menu Command Keys or any other keys typically used in applications, ​ but if any other application registers the same hot key, then both your macro and the other application'​s action will happen.
  
-(!) Note that whether or not a key typed by Keyboard Maestro itself will trigger a hot key (and thus be swallowed and execute a macro) or not (and thus go through to the application is not defined - either behaviour may happen and which behaviour happens will vary depending on many unpredictable factors. ​+(!) Note that whether or not a key typed by Keyboard Maestro itself will trigger a hot key (and thus be swallowed and execute a macro) or not (and thus go through to the applicationis not defined - either behaviour may happen and which behaviour happens will vary depending on many unpredictable factors. ​
  
 So keep in mind that regardless of whether you trigger the macro on hot key pressed, down, released or tapped, the key is swallowed by the system and cannot be used for its normal purposes. ​ You can use the [[trigger:​USB_Device_Key]] trigger if you you want to trigger the macro without the system swallowing the key. So keep in mind that regardless of whether you trigger the macro on hot key pressed, down, released or tapped, the key is swallowed by the system and cannot be used for its normal purposes. ​ You can use the [[trigger:​USB_Device_Key]] trigger if you you want to trigger the macro without the system swallowing the key.
Line 30: Line 34:
  
 ===== See Also ===== ===== See Also =====
- 
----- 
  
 ===  Triggers === ===  Triggers ===
Line 37: Line 39:
 * [USB Device Key](https://​wiki.keyboardmaestro.com/​trigger/​USB_Device_Key) trigger * [USB Device Key](https://​wiki.keyboardmaestro.com/​trigger/​USB_Device_Key) trigger
 * [Typed String](https://​wiki.keyboardmaestro.com/​trigger/​Typed_String) trigger * [Typed String](https://​wiki.keyboardmaestro.com/​trigger/​Typed_String) trigger
 +* [[:​Triggers|See all Triggers]]
  
 === Actions === === Actions ===
Line 42: Line 45:
 * [Type a Keystroke](https://​wiki.keyboardmaestro.com/​action/​Type_a_Keystroke) action * [Type a Keystroke](https://​wiki.keyboardmaestro.com/​action/​Type_a_Keystroke) action
 * [Insert Text by Typing](https://​wiki.keyboardmaestro.com/​action/​Insert_Text_by_Typing) action * [Insert Text by Typing](https://​wiki.keyboardmaestro.com/​action/​Insert_Text_by_Typing) action
 +* [[:​Actions|See all Actions]]
  
 === Tokens === === Tokens ===
  
 * [[token:​Trigger|%Trigger%]] * [[token:​Trigger|%Trigger%]]
- +* [[token:​TriggerBase|%TriggerBase%]] 
-----+* [[token:​TriggerValue|%TriggerValue%]] 
 +* [[:​Tokens|See all Tokens]]
  
 ==== Forum ==== ==== Forum ====
trigger/Hot_Key.txt · Last modified: 2023/09/13 00:28 by peternlewis