You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 21, 2024. It is now read-only.
Pressing one of the buttons on the mouse triggers an event with a button id that is not present in the Button enum, raising a ValueError. I'm not sure how this could be handled properly with Python's Enum; maybe a UNKNOWN enum constant with its value set to the actual id, if that's possible, but that doesn't really sound like a clean solution.
Traceback (most recent call last):
File "test.py", line 13, in <module>
button = pointer_event.get_button()
File "/home/minus/dev/mousebuttond/venv3/lib/python3.6/site-packages/libinput/event.py", line 512, in get_button
return self._libinput.libinput_event_pointer_get_button(self._handle)
File "/usr/lib/python3.6/enum.py", line 291, in __call__
return cls.__new__(cls, value)
File "/usr/lib/python3.6/enum.py", line 533, in __new__
return cls._missing_(value)
File "/usr/lib/python3.6/enum.py", line 546, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 280 is not a valid Button