Mouse example on GitHub home page does not work in Ubuntu 12.04

Bug #1271310 reported by Winston
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-uinput
Fix Released
Low
a

Bug Description

Greetings,

The mouse example provided in the GitHub documentation on the following page does not work:
https://github.com/tuomasjjrasanen/python-uinput

Fortunately, the mouse example provided here is valid:
https://github.com/tuomasjjrasanen/python-uinput/tree/master/examples

The problem lies on this line:
device = uinput.Device([uinput.REL_X, uinput.REL_Y])

Fixed line:
device = uinput.Device([uinput.REL_X, uinput.REL_Y, uinput.BTN_LEFT, uinput.BTN_RIGHT])

At least on Ubuntu 12.04, those final two indices in the list are required for the mouse input to actually be sent. Otherwise, nothing happens.

Thanks!

a (tuomasjjrasanen)
Changed in python-uinput:
importance: Undecided → Low
assignee: nobody → Tuomas Räsänen (tuomasjjrasanen)
status: New → Confirmed
Revision history for this message
a (tuomasjjrasanen) wrote :

Thanks for reporting this.

And yes ,you are correct, that nothing happens if the device is created without those button descriptors, but the reason is that the device is not recognized as a mouse without those button descriptors. X/Y-events are always sent, regardless of other event descriptors, but the mouse pointer does not move if the device is not handled by mouse event handler.

a (tuomasjjrasanen)
Changed in python-uinput:
status: Confirmed → Fix Committed
a (tuomasjjrasanen)
Changed in python-uinput:
status: Fix Committed → 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.