gEDA-user: [pcb/lesstif] configurable mouse event mappings

DJ Delorie dj at delorie.com
Wed Jul 26 01:08:03 EDT 2006


I added the ability to specify mouse actions in pcb-menu.res for the
lesstif HID.  I copied the current mappings, which now look like this:

Mouse =
{
  Left = {
    Mode(Notify)
    up = Mode(Release)
  }
  Right = {
  }
  Middle = {
    Pan(1)
    up = Pan(0)
    ctrl = Pan(thumb,1)
    ctrl-up = Pan(thumb,0)
  }
  Up = Zoom(0.8)
  Down = Zoom(1.25)
}

The first level is button names/numbers; the inner level (if any) is
modifiers.  You can go another level if you need to specify more than
one action, like this:

    Right = { ctrl = { Foo() Save() Bar() } }

You can attach actions to up to five mouse buttons (Up and Down are
the scroll wheel) either by name (above) or number(1..5), combined
with any shift/ctrl/alt/up modifiers (up means releasing the button).
Unspecified modifiers are copied from specified ones with less
modifiers (except up), with alt preferred over ctrl and ctrl preferred
over shift (i.e. if you specify ctrl-left and shift-left, if the user
presses ctrl-shift-left it does the ctrl-left action).

Enjoy!
DJ


More information about the geda-user mailing list