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/03/17 21:28]
peternlewis
trigger:Hot_Key [2019/07/01 01:34]
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 10: Line 12:
  
 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. ​
  
 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 17: Line 23:
 Modifiers alone (eg just Control) cannot be used as a hot key, although you can use the [[trigger:​USB_Device_Key]] trigger to detect modifier key presses as well as other button presses like the mouse buttons or keys on non-standard keyboards like the XK-24. Modifiers alone (eg just Control) cannot be used as a hot key, although you can use the [[trigger:​USB_Device_Key]] trigger to detect modifier key presses as well as other button presses like the mouse buttons or keys on non-standard keyboards like the XK-24.
  
-Hot_Keys ​suffer from the drawback that you need to remember a cryptic keystroke. ​ This can be mitigated by selecting consistent keystrokes (such as Control-Letter to mean insert text and Control-Option-Letter to mean launch an application). ​ You can also use a tool like [KeyCue](http://​www.stairways.com/​action/​linkthru?​keycue) to display command keys and macro hot keys.+Hot Keys suffer from the drawback that you need to remember a cryptic keystroke. ​ This can be mitigated by selecting consistent keystrokes (such as Control-Letter to mean insert text and Control-Option-Letter to mean launch an application). ​ You can also use a tool like [KeyCue](http://​www.stairways.com/​action/​linkthru?​keycue) to display command keys and macro hot keys.
  
 To further help with this, if multiple macros are executed with the same hot key, the conflicting macros are displayed in a palette allowing you to select the desired macro. ​ You can select a macro from the palette using either number keys, or by typing the first distinct character to filter the macros down until only one is left. You could use this feature to allow a single hot key to do multiple user-selected actions. To further help with this, if multiple macros are executed with the same hot key, the conflicting macros are displayed in a palette allowing you to select the desired macro. ​ You can select a macro from the palette using either number keys, or by typing the first distinct character to filter the macros down until only one is left. You could use this feature to allow a single hot key to do multiple user-selected actions.
Line 26: Line 32:
 * Command Key (or Menu Command Keys or sometimes Menu Shortcut) - menu keys for selecting a menu, usually but not always with the Command key modifier, generally application specific (except for the shared menus like the Services, but they are still application specific, but the menu is duplicated in each application like the Edit menu typically is). * Command Key (or Menu Command Keys or sometimes Menu Shortcut) - menu keys for selecting a menu, usually but not always with the Command key modifier, generally application specific (except for the shared menus like the Services, but they are still application specific, but the menu is duplicated in each application like the Edit menu typically is).
 * Keyboard Shortcut - could be either (hence the use in the System Preferences,​ Keyboard preferences). * Keyboard Shortcut - could be either (hence the use in the System Preferences,​ Keyboard preferences).
 +
 +===== See Also =====
 +
 +===  Triggers ===
 +
 +* [USB Device Key](https://​wiki.keyboardmaestro.com/​trigger/​USB_Device_Key) trigger
 +* [Typed String](https://​wiki.keyboardmaestro.com/​trigger/​Typed_String) trigger
 +
 +=== Actions ===
 +
 +* [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
 +
 +=== Tokens ===
 +
 +* [[token:​TriggerValue|%TriggerValue%]] token
 +* [[token:​Trigger|%Trigger%]]
 +
 +==== Forum ====
 +
 +* [A Type a Key action can trigger another macro](https://​forum.keyboardmaestro.com/​t/​tip-a-type-a-key-action-can-trigger-another-macro/​3633/​2)
 +
trigger/Hot_Key.txt ยท Last modified: 2023/09/13 00:28 by peternlewis