dxKeyHit%(key%)

Parameters

scancode = the scancode for the key to test

Description

This command returns the number of times a specified key has been hit since the last time you called the dxKeyHit() command. Check the ScanCodes for a complete listing of scancodes.

Example

; dxKeyHit Example

; Set up the timer
current=MilliSecs()
dxPrint "Press ESC a bunch of times for five seconds..."

; Wait 5 seconds
While MilliSecs() < current+5000
Wend

; dxPrint the results
dxPrint "Pressed ESC " + dxKeyHit(1) + " times."

Index