Mouseemu prevents use of multi-button mice
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.
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.