[Q] Mouse Wheel from eToys

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Sun Aug 17 11:57:29 UTC 2003


diegogomezdeck at consultar.com wrote:

> Hi folks...
> 
> Just like JoystickMorph has the option to "track real joystick" (from the
> Morph menu) I'd like to track from eToys the mouse wheel.
> 
> I see different alternatives:
> 
> - Track from a SliderMorph.  The slider's knob can be moved directly from
> the wheel.
> - Create an special numeric tile (like random, etc) tracking the wheel.
> - Track (I don't know how) mouse-wheel up and mouse-whell down events.
> 
> The ideas are, more or less, clear but I'm blind to do it for myself.

You need to look for the changeset that allowed scripts to fire on 
keystrokes.

> Any idea where I can find the mouse-wheel related information in Squeak?

Yes. It's in sqfixes #42 (!):

http://swiki.gsug.org/sqfixes/42.html

"Change Set:            scrolling-bf
Date:                   14 April 1999
Author:                 Bert Freudenberg

Makes command+up/down scrolling. For use with a scrollwheel mouse, but 
can be used with the keyboard as well. See 
ScrollController>>#scrollByKeyboard (MVC) and 
ScrollPane>>#scrollByKeyboard: (Morphic)"

Uh, nostalgia ;-)

We changed that a little later to use other modifiers:
	http://swiki.gsug.org/sqfixes/273.html

> Is this an platform-dependent feature?

No. Mouse-wheel events are translated into keystrokes in the VM 
(Ctrl-UpArrow and Ctrl-DownArrow). Just try "Sensor kbdTest" and roll 
the wheel.

-- Bert



More information about the Squeak-dev mailing list