Q: How to detect shift down

Ross Boylan RossBoylan at stanfordalumni.org
Tue Apr 23 18:00:38 UTC 2002


I am in a morphic project trying to detect if the shift key is
pressed.
I have tried a bunch of things like
Sensor shiftPressed
InputSensor default anyModifierKeyPressed (with ctl, since comment
says it ignores shift)

but it always returns false.

What's the trick?

By the way, I'm just doing this so I can say
Sensor leftShiftDown ifTrue: [self halt]
so that the halt doesn't stick me in a loop.



More information about the Squeak-dev mailing list