Apple+Q testing?
BlitzMax Forums/BlitzMax Programming/Apple+Q testing?
| ||
How can I test for the Apple+Q key cobination? This should quit my game. Thanks, |
| ||
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 |
| ||
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) |
| ||
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. |
| ||
To be fair, can you name an app that required you to use the right Apple key for anything? |
| ||
have you tried using (key_ralt) for the right apple? i do not have bmax for apple but i think this might work |
| ||
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. |