mouseEvents - which mouseKey?
Ned Konz
ned at bike-nomad.com
Tue Jun 3 15:59:29 UTC 2003
On Tuesday 03 June 2003 05:54 am, Ingo Hohmann wrote:
> Hi Squeakers,
>
> I am using
>
> self
> on: #mouseUp
> send: #mouseClick:
> to: self.
>
> to catch mouseEvents.
>
> When exploring the Event I get sent, I see
>
> whichButton: 4
> and
> whichButton: 2
>
> for what is my left and right mouseButton respectively.
>
> Are these numbers tied to my mouseButtons as layoutet on my mouse,
> or to the squeaky coloured button names? Or is there even a better
> way to find out which button has been pressed?
The numbers tie to the colors.
So you can ask:
event redButtonPressed
or
event yellowButtonPressed
or
event blueButtonPressed
(or also shiftPressed, etc. to get the modifier keys).
The mapping between the physical buttons and the logical
red/yellow/blue can be changed in two ways: by the VM, and by the
Preference for swapMouseButtons.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|