Skip to main content

Wait for mouse or key

Pause until the person at the runner presses a chosen key, any key, or clicks the mouse, e.g. 'press F9 when the form is ready' in an attended agent.

Command in the Mouse and keyboard toolkit · id ooa.desktop/wait_for_input · 4 inputs, 4 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Wait forStringNokeykey: the key below; any_key: any key; click: any mouse button; key_or_click: the key below or a click.
KeyStringNoKey name, e.g. F9, ENTER, ESC or A.
Timeout (seconds)NumberNo60Give up after this many seconds.
Fail on timeoutBooleanNofalseFail with DESKTOP.INPUT_TIMEOUT when nothing happens in time; when off, timed_out is true and the agent carries on.

Outputs​

OutputTypeWhat it is
timed_outBooleanTrue when nothing happened in time.
inputStringWhat happened: the key name, LEFT_CLICK, RIGHT_CLICK or MIDDLE_CLICK; empty on time-out.
xNumberPointer position (physical screen pixels) when it happened.
yNumberPointer position (physical screen pixels) when it happened.