Unworthy patron has Demeaning Inquiry. No Shift!?

BlitzMax Forums/BlitzMax Programming/Unworthy patron has Demeaning Inquiry. No Shift!?

Dubious Drewski(Posted 2006) [#1]
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()



jsp(Posted 2006) [#2]
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


Dubious Drewski(Posted 2006) [#3]
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.


taxlerendiosk(Posted 2006) [#4]
edit: oops, somehow lost that someone had already replied


Russell(Posted 2006) [#5]
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


skidracer(Posted 2006) [#6]
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.