[ENH] Yellow/Blue mouse button swapping via Preferences

Ned Konz ned at bike-nomad.com
Wed Jul 12 17:14:10 UTC 2000


This change set allows the user to exchange the assignment of the Yellow
and Blue
mouse buttons (buttons 2 and 3) through use of the Preferences panel. It
requires
no VM changes.

So if you'd rather see your context menus on your right button clicks,
you can change it in one place. (I know that you can re-map this in
the Windows VM, but the Unix VM does not currently allow this).

I had previously posted a change to the Unix VM that would allow a
command
line option or an environment variable to do this. Then Henrik Gedenryd
wrote:

> Why not do this in the image instead? That way you could remove this code
> from the Win VM as well!

I couldn't find a fast way to do this initially (because I had to poll
Preferences for every mouse query). So I wrote my
PreferencesNotification
enhancement, and now Sensor gets notified when you change your
swapMouseButtons preference.

It requires my PreferencesNotification enhancement, because it only
rebuilds
its mapping table upon a Preferences change, rather than polling
Preferences
on every button query (this is MUCH faster). This change set is also
attached.

File in PreferencesNotification-nk.4.cs first, then
SwapMouseButtons-nk.1.cs.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SwapMouseButtons-nk.1.cs
Type: application/octet-stream
Size: 6562 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000712/97399723/SwapMouseButtons-nk.1.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PreferencesNotification-nk.4.cs
Type: application/octet-stream
Size: 26408 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000712/97399723/PreferencesNotification-nk.4.obj


More information about the Squeak-dev mailing list