Unworthy patron has Demeaning Inquiry. No Shift!?
BlitzMax Forums/BlitzMax Programming/Unworthy patron has Demeaning Inquiry. No Shift!?
| ||
Can someone tell me why MODIFIER_SHIFT does not work? I feel like an idiot asking because I know it's going to be something stupidly simple.AppTitle = "Shiftless Window ver 0.8 Beta 2 (2006)" Graphics 512, 32, 0, 60 Repeat If KeyDown(modifier_shift) Then SetColor Rand(255),100,100 If KeyDown(key_a) Then SetColor 100,Rand(255),100 DrawRect 0,0,512,32 SetColor 180, 50, 230 DrawText "Key 'a' works. But what's up with SHIFT!?", 80,10 SetColor 0, 0, 0 Flip;Cls Until KeyHit(key_escape) Or AppTerminate() |
| ||
drew you test on a modifier not the single shift key! Use KEY_LSHIFT or KEY_RSHIFT in your example and it will work. jsp |
| ||
See? Thanks, jsp. [edit]I was thrown off because the MaxIDE help file still says that "MODIFIER_SHIFT" is the name to use. I think someone should update that. |
| ||
edit: oops, somehow lost that someone had already replied |
| ||
Yeah, MODIFIER_SHIFT is to be used in conjunction with another key, such as KEY_C | MODIFIER_SHIFT. I'm sure there's a reason for the two uses... Russell |
| ||
Wha? I don't think they are ever combined in BlitzMax. The keycode, modifier pair are used with hotkeys, menu shortcuts and feature in the event.data and event.mods keyboard events. |