User Tools

Site Tools


action:Type_a_Keystroke

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
action:Type_a_Keystroke [2018/03/25 22:43]
JMichaelTX Add note about using Keystroke same as trigger
action:Type_a_Keystroke [2018/03/26 02:14] (current)
peternlewis [Do Not Use for the Keystroke of an Active Hot Key Trigger]
Line 18: Line 18:
 Note: keys that are pressed stay pressed only as long as the macro continues to run. Note: keys that are pressed stay pressed only as long as the macro continues to run.
  
-==== Do Not Use Keystroke ​Same as Trigger ====+==== Do Not Use for the Keystroke ​of an Active Hot Key Trigger ==== 
 + 
 +You should not use this action to simulate a keystroke that is the same as an active [[trigger:​Hot_Key|Hot Key Trigger]]. Typing a keystroke that is the hot key trigger for an active macro has unpredictable behaviour, it may type the keystroke or trigger the macro, and which will vary depending on unpredictable factors including the load on the Mac, the version of OS X or Keyboard Maestro and other factors. ​  
 + 
 +Instead use the [[action:​Trigger_Macros_by_Hot_Key|Trigger Macros by Hot Key]] action if triggering the macro is desired, or alternatively,​ find another way to cause the desired action (eg use the [[action:​Select_or_Show_a_Menu_Item|Select or Show a Menu Item]] action to select a menu instead of simulating a menu command key). 
 + 
 +If you really need to simulate the keystroke, then you will need to deactivate or disable any macros with the matching hot key trigger, type the keystroke, pause for it to be completed, and then re-activate/​enable the macro.
  
-:!: Caution: ​ You should avoid using a keystroke in this Action that is the same as the [[trigger:​Hot_Key|Hot Key Trigger]] for the macro. 
  
-[[https://​forum.keyboardmaestro.com/​t/​want-to-create-a-simple-macro-to-empty-the-trash/​9851/​16?​u=jmichaeltx | Per @PeterNLewis]]:​ 
->Typing a keystroke that is the hot key trigger for an active macro has unpredictable behaviour, it may type the keystroke or trigger the macro, and which will vary depending on unpredictable factors including the load on the Mac, the version of OS X or Keyboard Maestro and other factors. 
  
 ===== Send to Background App (v8+) ===== ===== Send to Background App (v8+) =====
action/Type_a_Keystroke.1522032225.txt.gz · Last modified: 2018/03/25 22:43 by JMichaelTX