Skip to main content

Each time a key is pressed

Windows only. Run the nested steps each time the named key or combination (such as F9, CTRL+ENTER or SHIFT+F2) is pressed, optionally only while a given window is in front. Typed text is never recorded: the event gives only the key, the window title and the process. The key still reaches the application.

Loop type in the Trigger Loop toolkit · id ooa.triggerloop/key_pressed · 6 inputs (1 required), no outputs

Inputs​

InputTypeRequiredDefaultWhat it is
KeyStringYesThe key or combination: CTRL, ALT, SHIFT, WIN with one key such as A-Z, 0-9, F1-F24, ENTER, TAB, ESC, arrows. Letters and digits need CTRL, ALT or WIN.
WindowStringNoOnly while this window is in front: title text, a pattern with * and ?, or re: and a regular expression. Empty: any window.
ProcessStringNoOnly in this program, such as excel.exe. Empty: any program.
Debounce (milliseconds)NumberNo500Ignore repeats within this many milliseconds of the last event.
Maximum eventsNumberNo0Stop after this many events; 0 = no limit.
Maximum (seconds)NumberNo0Stop waiting after this many seconds in total; 0 = no limit (until the run is stopped or an Exit loop step runs).