Apple+Q testing?

BlitzMax Forums/BlitzMax Programming/Apple+Q testing?

matt!(Posted 2005) [#1]
How can I test for the Apple+Q key cobination? This should quit my game.

Thanks,


Perturbatio(Posted 2005) [#2]
Use this code to find the scancode value for the apple key (since I can't see it listed in the scancodes (maybe Sys Key?)):
Graphics 640,480,0,0

While Not KeyDown(KEY_ESCAPE)
Cls
For Local a:Int = 1 To 256
	If KeyDown(a) Then DrawText(a, 10, 10)
Next
Flip
Wend
End




matt!(Posted 2005) [#3]
Thanks! Some strangeness here.

Left Apple = 164 (KEY_LALT)
Right Apple = not mapped
Left Control = 17 (KEY_CONTROL) and 162 (KEY_LCONTROL)
Right Control = 17 (KEY_CONTROL) and 163 (KEY_RCONTROL)
Left/Right Alt = 18 (KEY_ALT)


Perturbatio(Posted 2005) [#4]
I can understand why the others are like that, but it's strange that the right apple key doesn't register.

You could try increasing the For loop limit, but I don't think the keyboard buffer goes above that.


LeisureSuitLurie(Posted 2005) [#5]
To be fair, can you name an app that required you to use the right Apple key for anything?


drnmr(Posted 2005) [#6]
have you tried using (key_ralt) for the right apple?
i do not have bmax for apple but i think this might work


Perturbatio(Posted 2005) [#7]
i do not have bmax for apple but i think this might work

if it was Right Alt then the piece of code I posted above would have recognised it since Right Alt is within 1-256.