trigger:Typed_String
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| trigger:Typed_String [2017/03/06 03:33] – [Forum] peternlewis | trigger:Typed_String [2025/10/28 02:40] (current) – peternlewis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Typed String Trigger ====== | ||
| + | |||
| The *Typed String trigger* lets you execute a macro in response to a sequence of keys. | The *Typed String trigger* lets you execute a macro in response to a sequence of keys. | ||
| - | Typed String triggers allow you to use more verbose (and hence descriptive) sequences of keys to trigger a macro. Because the keys first go through to the current application, | + | Typed String triggers allow you to use more verbose (and hence descriptive) sequences of keys to trigger a macro. Because the keys first go through to the current application, |
| - | **WARNING: | + | (!) You should generally not use a Typed String trigger that simulates deletes in a non-text typing context, as the simulated delete keystrokes could be destructive. |
| - | **NOTE: | + | (i) If you are going to immediately change focus (for example, with a Prompt For User Input, or by switching windows or applications), |
| To avoid macros firing unexpectedly it is a good idea to include a consistent prefix and/or suffix to your strings. For example, to insert your email address, rather than use just “em” (which would fire if you typed “them”), | To avoid macros firing unexpectedly it is a good idea to include a consistent prefix and/or suffix to your strings. For example, to insert your email address, rather than use just “em” (which would fire if you typed “them”), | ||
| Line 11: | Line 13: | ||
| Keyboard Maestro will accept the trigger even if you use the delete key to correct it (for example, in the case above, if you typed " | Keyboard Maestro will accept the trigger even if you use the delete key to correct it (for example, in the case above, if you typed " | ||
| - | As above, typing Shift-Space will cancel the sequence, as will any control key or command key (eg Command-.), any macro execution, switching applications, | + | As above, typing Shift-Space will cancel the sequence, as will any control key or command key (eg Command-.), any actively (Hot Key, USB Device Key) triggered |
| - | You can optionally allow typed string triggers to work regardless of case, regardless of diacriticals, or to remember | + | You can optionally allow typed string triggers to work regardless of case, regardless of diacriticals. |
| + | |||
| + | You can have the case of the typed string and affect Insert Text actions. This means that if you type the string | ||
| + | |||
| + | You can limit the typed string trigger to only work after a word break (which means any non-alphanumeric character, or any case that cancels the sequence as described above). **Note** that this means the match will happen only after you type a word break and then the Typed String - Keyboard Maestro does not know what you will type in the future so it cannot restrict matches to only happen if you plan to type a word break next. | ||
| Alternatively, | Alternatively, | ||
| Line 21: | Line 27: | ||
| If multiple typed string triggers match from the end (eg " | If multiple typed string triggers match from the end (eg " | ||
| - | Note that the system will not allow Keyboard Maestro Engine to see keys typed in its own windows (such as the [[action: | + | Note that the system will not allow Keyboard Maestro Engine to see keys typed in its own windows (such as the [[action: |
| - | The system also will (rightly) not allow Keyboard Maestro to see keys typed in password fields, so Typed String triggers will not fire if you type them in most password fields. You can use Insert Text by Typing to type in to password fields (although this is a serious security concern), but you cannot use Typed String triggers while inside a password field. | + | The system also will (rightly) not allow Keyboard Maestro to see keys typed in password fields, so Typed String triggers will not fire if you type them in most password fields. You can use Insert Text by Typing to type in to password fields (although this is a serious security concern, and there are some cases where it will not work properly), but you cannot use Typed String triggers while inside a password field. |
| Note also that there is a relatively prevalent [[http:// | Note also that there is a relatively prevalent [[http:// | ||
| - | that makes the system think it is permanently in a password field, and thus will prevent typed string triggers from working. | + | that makes the system think it is permanently in a password field, and this will prevent typed string triggers from working. |
| ===== See Also ===== | ===== See Also ===== | ||
| - | |||
| - | ---- | ||
| === Tokens === | === Tokens === | ||
| Line 46: | Line 50: | ||
| * [[:Regular Expressions]] | * [[:Regular Expressions]] | ||
| - | |||
| - | ---- | ||
| ==== Forum ==== | ==== Forum ==== | ||
trigger/Typed_String.1488771191.txt.gz · Last modified: by peternlewis
