Huion Kamvas Pro 16: Button release event is sent while pen button is held (and within proximity)
Summary
If I run libinput debug events | grep TOOL_BUTTON
, I can see pressed and released events for the buttons on my pen. I.e.:
event3 TABLET_TOOL_BUTTON +5.96s 332 (BTN_STYLUS2) pressed, seat count: 1
event3 TABLET_TOOL_BUTTON +6.10s 332 (BTN_STYLUS2) released, seat count: 0
However, If I hold down one of the buttons while I hover the pen within proximity of the tablet, I get a released event after a while even though I'm still holding the button down.
- If I then move the pen around, or press it onto the tablet, I don't get any new pressed event.
- If I move the pen out of proximity and back in again, I get a new pressed event
- If, initially, I continuously move the tool around within hover distance, the bug never occurs, but whenever I stop moving the pen around I get the unexpected release event.
- It happens only when hovering, not if the tip touches the surface
I ran this little python script to read events directly from evdev
import evdev
device = evdev.InputDevice('/dev/input/event3')
print(device)
for event in device.read_loop():
if event.type == evdev.ecodes.EV_KEY:
print(evdev.categorize(event))
And there, as expected, I don't get any release events when I hover with a button pressed. So it seems the bug must be somewhere within libinput.
Output when I run the script:
key event at 1576843756.854575, 332 (BTN_STYLUS2), down
key event at 1576843761.300591, 332 (BTN_STYLUS2), up
Steps to reproduce
- run
libinput debug events | grep TOOL_BUTTON
- put the stylus within hover distance
- press and hold a stylus button
Expected result: Only a pressed event is printed to the terminal
Actual result: A released event is printed even though the stylus button is held and within proximity
libinput version you encountered the bug on
- 1.14.3
- 1.14.901.r3.g970b5aff-1 (Arch Linux libinput-git package)
Hardware information:
Huion Kamvas Pro 16 (GT-156)
Other log output:
-
libinput record
output: libinput-record.log -
libinput debug-events --verbose
output: libinput-debug-events.log