Mouseemu prevents use of multi-button mice

Bug #419947 reported by Jo Shields
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mouseemu (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: mouseemu

Mouseemu creates an emulated "3-button scroll" mouse, i.e. left and right buttons, plus a clickable scrollwheel. This is useful when running on a system with this many buttons or less (e.g. a laptop touchpad)

Unfortunately, mouseemu also swallows all events from the system's "real" mouse, including events caused by buttons outside the 3-button-scroll limitation. As a result, if your system has more buttons (e.g. side buttons, or a wheel with horizontal scroll) then the extra buttons are not used, as mouseemu does not forward those events.

The real mouse reports:
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
    Event code 275 (SideBtn)
    Event code 276 (ExtraBtn)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
    Event code 6 (HWheel)
    Event code 7 (Dial)
    Event code 8 (Wheel)
  Event type 4 (Misc)

The emulated mouse reports:
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
    Event code 8 (Wheel)

The delta between the two are the "Lost" buttons.

Related branches

Revision history for this message
Colin Watson (cjwatson) wrote :

mouseemu is already doing EVIOCGBIT ioctls to check the nature of each input device in turn; I think it would be relatively simple to have it figure out which mouse buttons all the real mice on the system support, and turn all of those on for its virtual device.

Changed in mouseemu (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Colin Watson (cjwatson) wrote :

Could you try the attached patch, please?

Revision history for this message
Colin Watson (cjwatson) wrote :

Actually, I missed a bit. Try this instead.

Revision history for this message
Jo Shields (directhex) wrote :

Creates an accurate device, but does not forward events for the extended buttons:

Input device name: "Razer Razer Lachesis"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
    Event code 275 (SideBtn)
    Event code 276 (ExtraBtn)
    Event code 277 (ForwardBtn)
    Event code 278 (BackBtn)
    Event code 279 (TaskBtn)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
    Event code 8 (Wheel)
  Event type 4 (Misc)
    Event code 4 (ScanCode)

Input device name: "Mouseemu virtual mouse"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 256 (Btn0)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
    Event code 275 (SideBtn)
    Event code 276 (ExtraBtn)
    Event code 277 (ForwardBtn)
    Event code 278 (BackBtn)
    Event code 279 (TaskBtn)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
    Event code 6 (HWheel)
    Event code 8 (Wheel)

Revision history for this message
Colin Watson (cjwatson) wrote :

Hmm, right. Can you try this one instead? I think it should be a bit smarter.

Revision history for this message
Jo Shields (directhex) wrote :

Nicely done!

Works better than in Windows now, on this system, in fact - in that the OS can see both pairs of side buttons (although the right-hand side buttons are detected somewhat weirdly)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mouseemu - 0.16-0ubuntu4

---------------
mouseemu (0.16-0ubuntu4) karmic; urgency=low

  * more_mouse_buttons.dpatch: If the real mouse devices on the system
    support any buttons other than left, middle, and right, enable those on
    the virtual mouse device too so that passthrough will work properly for
    them (LP: #419947).

 -- Colin Watson <email address hidden> Fri, 28 Aug 2009 08:45:40 +0100

Changed in mouseemu (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.