|DIAdem 2017 Help|
|DIAdem 2018 Help|
|DIAdem 2019 Help|
|DIAdem 2020 Help|
|DIAdem 2020 SP1 Help|
Specifies whether the specified key was pressed.
|KeyValue||Specifies the pressed key.|
|ReturnValue||The return value is a Boolean variable type.|
Use the IsKeyPressed command to request the keys of the keyboard and of the mouse. The command returns the physical key not the logical key. For example, even if a left-handed user re-configured the mouse buttons, the command returns the left mouse button when this button is pressed.
The following example outputs a message after the space bar was pressed. The KeyWait stops the script until a key is pressed.
Call MsgBoxDisp("Press space bar.",,,,5,True) Do While Not IsKeyPressed(&H20) Call KeyWait Loop Call MsgBoxDisp("Space bar pressed")