Wait Key Press

Waits until there is a keypress in the keyboard input queue

Syntax

Wait Key Press

Description

This command will wait until there is at least one keypress in the keyboard input queue. If there are keys already in the queue, then the command will return immediately.

You can use this command to wait until the user presses a key, by emptying the keyboard queue with Clear Keyboard and then waiting until a new key is pressed. Eg:

Print "Press any key to continue"
Clear Keyboard
Wait Key Press

The key pressed is then left into the keyboard queue and can be read with the Keyboard Raw Key command.

See also the Keyboard Input Guide, Keyboard Raw Key, Clear Keyboard, Pressed and Wait Mouse Click commands.

Table of contents