How to detect shift down

Ross Boylan RossBoylan at
Sun Apr 28 21:01:12 UTC 2002

On Fri, Apr 26, 2002 at 06:35:39PM -0700, Ned Konz wrote:
> On Friday 26 April 2002 06:17 pm, Ross Boylan wrote:
> > Unfortunately, Sensor shiftPressed not working was what got me
> > started on this thread :(.  I just double-checked, and it does not
> > test as true, even though I'm sitting on the shift key.
> >
> > This is on Linux, 3.2alpha #4599.
> See my earlier post. This'll need a VM fix (look at sqXWindow.c) to 
> work. I suspect that we could emit a dummy mouse position event when 
> the modifier keys change state.
> It also seems to me that there was a discussion about this a year or 
> so ago...

I checked, and it's a problem under MS Windows too, though not quite
as bad.  On windows, the Sensor shift press works, but very slowly.  I
have a loop that activates every 10 seconds.  If I hold down the shift
key for 15 "mississippi's" and then let go I got an interrupt window
popping up about 10 seconds later.

I find it a bit surprising and annoying that there is no way to access
the current keyboard state.

More information about the Squeak-dev mailing list