Key Codes Question
BlitzMax Forums/BlitzMax Beginners Area/Key Codes Question
| ||
Would someone mind telling me what the Modifiers are for? e.g MODIFIER_SHIFT etc. And how they might be used? *EDIT* - fixed my original problem - would still like to know the answer to the above question though. Thank you very much - Rico |
| ||
This works for me. Graphics 640,480 While Not KeyHit(KEY_ESCAPE) Cls If KeyHit(KEY_LSHIFT) SetColor 255,0,0 If KeyHit(KEY_RSHIFT) SetColor 0,0,255 DrawOval 0,0,640,480 Flip Wend It's always handy to show the code you're using for this type of issue. As for Modifier keys I found the following when searching : modifiers Keydown / modifiers in 1.12 |
| ||
Thanks Tony - Actually I still have a problem with detecting Shift keys - I wanted to check for both being pressed at the same time. For some reason it only detects one Shift key - can you get both? I can get both individually. I am doing If KeyDown(KEY_LSHIFT) And KeyDown(KEY_RSHIFT) Then ...... Whats happening is that if I press both shift keys then only the left shift key is detected. Do you get this too? Thanks |
| ||
It's probably a limitation of your keyboard. The vast majority of keyboards can only detect a certain number of simultaneous key presses (3 or 4 I think), and the actual number depends on the combination of keys pressed. To confirm, load up a game, redefine to use both left and right shift and see if the actions work simultaneously. |