[4883] in java-interest
Re: Mouse evetns problem
daemon@ATHENA.MIT.EDU (Amy Fowler)
Wed Jan 17 13:57:41 1996
Date: Wed, 17 Jan 1996 09:30:47 -0800
From: Amy.Fowler@Eng.Sun.COM (Amy Fowler)
To: java-interest@java.Eng.Sun.COM, gil.bregman@applicom.co.il
>>
>>2) More importantly, there is no way to deduce the exact physical event.
>>The button which was pressed is put into the "modifiers" field.
>>Experimenting a bit, I found that the left button has a "0" value, the
>>middle button has an "8" value and the right button has a "4" value.
>>Those values are order together in case of more then button is pressed.
>>There are two problems with that:
>>
>> - You can't always tell that the left button is pressed. There is
>> no way to distinguish between "middle button is pressed" and "both
>> left and middle button are pressed". You can't use a value of "0"
>> when you OR bits together.
>>
>> - The masks of the button overlap those of the keyboard modifier
>> keys. You can't tell if the "ALT" key, for example, was pressed
>> or the equivalent button was pressed.
Yes, this is definitely a problem (and may be why the button
modifiers were not documented in the Event API spec).
I've filed a bug on this to remind us to look into fixing it;
we'd probably have to add another field to Event (other than "modifiers")
so we wouldn't break existing code that depends on the above
undocumented behavior.
Thanks for the comments.
Regards,
Amy Moore-Fowler
Java Products Group
Sun Microsystems, Inc.
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com