[bb] GetScanCode() by Russell [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:43

Previous topic - Next topic

BlitzBot

Title : GetScanCode()
Author : Russell
Posted : 1+ years ago

Description : Returns the current scan code so that it can be used in a select/case structure, etc.

Code :
Code (blitzbasic) Select
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...