KeyDown (scancode)  

Definition:

Returns TRUE if the specified key on keyboard is being held down.

Parameter Description:


scancode = corresponding key scancode

Command Description:

This command (similar to its counterparts MouseDown and JoyDown) is used to detect if a key is being held down. This command returns a 0 if the key is not held down, a 1 if the key is held down. See ScanCodes.

Example:

; KeyDown() example

Print "Hold down ENTER key!"
Delay 3000
While Not KeyHit(1)
If KeyDown(28) Then
Print "Enter is being pressed!"
Else
Print
End If
Wend

Index