how to check keyhit for - and =

BlitzMax Forums/BlitzMax Beginners Area/how to check keyhit for - and =

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Try to use this code to check the keycode of your Keys

In my case '=' = 48 and '-' = 189.

Graphics 100,100,0,-1
While Not KeyHit(Key_Escape)
Cls
	Char = GetKEY()
	DrawText Char,20,20
Flip
Wend

Function GetKEY:Int()
For Local _I:Int = 0 To 255
	If KeyDown(_I) Then
		Return _I
	EndIf
Next
Return Null

End Function