Testing for modifiers in Morphic?

Bert Freudenberg bert at isgnw.CS.Uni-Magdeburg.De
Thu Feb 25 17:50:46 UTC 1999


I'd like to have a left-shift-hack in a morph's step method. But it
doesn't work, at least not like expected:

When shift is pressed, nothing happens (that is, Sensor shiftPressed
answers false). If a key or mouse button is pressed while holding shift,
it flips to true and remains like this even if shift is released. It flips
back to false only when the next "unshifted" event is received.

(For testing, I inserted
	Transcript show: Sensor shiftPressed printString; cr.
into the morphs step method. Asking the hand for its last event is
equivalent to this method.)

What's going on?

/bert

-- 
 Bert Freudenberg                                            Department of
                                                            Simulation and
 mailto:bert at isg.cs.uni-magdeburg.de                     Computer Graphics
 http://isgwww.cs.uni-magdeburg.de/isg/bert.html        Univ. of Magdeburg





More information about the Squeak-dev mailing list