[plt-scheme] Mouse wheel

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 15 23:30:02 EST 2005

At Mon, 14 Mar 2005 13:20:16 +0100 (CET), Ivanyi Peter wrote:
> Now I have a problem with the mouse wheel, since in
> PLT-scheme it is
> a keyboard action. Is there a way to "redirect" the mouse
> wheel actions
> so they will appear in the "on-event" event of a canvas%???

Not without manually calling `on-event' from inside some `on-char'

> I do not know whether it could be a solution but it caught
> my eye in the
> documentation where it says, that a keymap% can be used not
> only with editors but with other classes as well. How can I
> do that?

Just create an instance of keymap% using `new', and then call the
object's methods to add name-to-functions mappings, key-to-name
mappings (the indirection through a name is an artifact of the bad old
days), and to handle character and keyboard events.


Posted on the users mailing list.