How to detect shift down

John M McIntosh johnmci at smalltalkconsulting.com
Sat Apr 27 00:35:01 UTC 2002


>On Wed, Apr 24, 2002 at 11:27:55AM +0200, Andreas Raab wrote:
>>  > >	ActiveEvent shiftPressed.
>  > >
>  > >

The global var Sensor points to the active Sensor for managing events 
from the VM.

So

Sensor shiftPressed

should do what you want it


ActiveEvent is a global that points to the current MorphicEvent 
subclass instance which might or might not know about the shift key 
right yet, since of course the Sensor knows about the shift key a bit 
ahead of giving it to Morphic.

Mind it seems as you noticed be set to nil, (should it be?).
-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================



More information about the Squeak-dev mailing list