Thanks for the replies. Actually, I am in the code of selectedItem: of a list and I would like to add to the current selection if Shift is pressed. The problem is that I do not have access there at the event.
Cheers, Doru On 27 Sep 2009, at 03:14, Schwab,Wilhelm K wrote: > +1 to Sig's comments. Another problem with looking at the current > state vs. state from an event is that the current state is just > that, and often differs (covertly and frustratingly) from the user's > intentions. Such problems often arise with mouse cursor positions. > > Bill > > > -----Original Message----- > From: [email protected] > [mailto:[email protected] > ] On Behalf Of Igor Stasenko > Sent: Saturday, September 26, 2009 6:25 PM > To: [email protected] > Subject: Re: [Pharo-project] key pressed > > 2009/9/27 Tudor Girba <[email protected]>: >> Hi, >> >> How can I check whether a certain key is pressed (for example, a >> modifier like Shift)? >> > Depends on context. In Morphic, just take an event (mouse event or > keyboard event) and send #shiftPressed, or #controlKeyPressed, or > whatever. > > Another way is to ask the Sensor for same things, but i wouldn't do > that, because to my opinion this is the wrong way, because Sensor is > low-level object, which should be hidden from the eyes of developer, > and normally, if you need to use it, it means that you doing > something wrong :) > > >> Cheers, >> Doru >> >> >> -- >> www.tudorgirba.com >> >> "If you interrupt the barber while he is cutting your hair, you will >> end up with a messy haircut." >> >> >> _______________________________________________ >> Pharo-project mailing list >> [email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > > -- > Best regards, > Igor Stasenko AKA sig. > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- www.tudorgirba.com "One cannot do more than one can do." _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
