Code archives/User Input/GetScanCode()

This code has been declared by its author to be Public Domain code.

Download source code

GetScanCode() by Russell2001
Returns the current scan code so that it can be used in a select/case structure, etc.
Function GetScanCode(Low,Hi)
For a = Low to Hi
If KeyDown(a) then Return a
Next
Return False
End Function

; Returns the current key, or false if none in the low/hi range are being pressed. Low/Hi allow you to only scan a certain range (ignoring the escape key, for example) 

Comments

None.

Code Archives Forum