Mouse button tester
Last updated at 4:00 pm UTC on 4 April 2017
Open a Workspace and paste the following code snippet into it.
Select all and choose 'do-it'.
m := Morph new.
m on: #mouseDown send: #value: to:[:evt|
evt redButtonPressed ifTrue:[m color: Color red].
evt yellowButtonPressed ifTrue:[m color: Color yellow].
evt blueButtonPressed ifTrue:[m color: Color blue]
You get a rectangle which changes color according to the mouse button clicked. This may help you setting up the right mouse configuration.
By Andreas Raab, March 2002
Unfortunately, this doesn't quite work as intended, since the Morph in question insists on bringing up the halo instead of changing color on a blue button click.
Morph>>blueButtonDown: catches the blue button and brings up a halo first.
If you want to see the events, you can just do this:
HandMorph showEvents: true
and when you're done you can do this:
HandMorph showEvents: false
Andrew P. Black on mouse button colors and the command key