User Tools

Site Tools


Type Keystroke Action

The Type Keystroke action lets you type a single keystroke, pretty much any kind of keystroke you can type on the keyboard.

The Type Keystroke action is just like typing yourself, so you can type any keystroke and any number of them, but it can be tedious to create a sequence of keystrokes in a macro.

How To Use

Use Type Keystroke when:

  • You are entering a single keystroke and perhaps need particular control over the exact keystroke typed, or
  • The keystroke includes Command or Control (and sometimes Option).

You can optionally have the key pressed and held, or pressed and repeated, or released if you previously pressed it.

Note: keys that are pressed stay pressed only as long as the macro continues to run.

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 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 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 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.

Send to Background App (v8+)

You can also optionally choose (v8+) which application to send the keystrokes to. This allows you to send keystrokes to an application in the background. Note that the system and many applications do not expect to see keystrokes in the background, so how well this solves any given problem will vary depending on the exact circumstances.

See Also



action/Type_a_Keystroke.txt · Last modified: 2018/03/26 02:14 by peternlewis