how to check keyhit for - and =

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

Hiya,

keyhit for - and = along the top of the keyboard isn't being detected - although numeric keypads are.

Laptops don't have numeric keypads.

How do I access those keys along the top?

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


Ah thanks!