dxKeyDown%(key%)

Parameters

scancode = corresponding key scancode

Description

This command (similar to its counterparts dxMouseDown 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 Also: ScanCodes

Example

; dxKeyDown() example

dxPrint "Hold down ENTER key!"
Delay 3000
While Not dxKeyHit(1)
If dxKeyDown(28) Then
dxPrint "Enter is being pressed!"
Else
dxPrint
End If
Wend

Index