3

I've installed libinput to enable debounce. I added settings to /etc/libinput/local-overrides.quirks. But it doesn't work. I try to debug libinput with command libinput debug-events --verbose and it says:

event2  - debounce state: DEBOUNCE_STATE_DISABLED → DEBOUNCE_EVENT_OTHERBUTTON → DEBOUNCE_STATE_DISABLED
event2  - debounce state: DEBOUNCE_STATE_DISABLED → DEBOUNCE_EVENT_PRESS → DEBOUNCE_STATE_DISABLED
event2  - debounce state: DEBOUNCE_STATE_DISABLED → DEBOUNCE_EVENT_RELEASE → DEBOUNCE_STATE_DISABLED

So debounce doesn't work and I can't understand why. My local-overrides.quirks:

[DEXIN Tt eSPORTS THERON]
MatchName=DEXIN Tt eSPORTS THERON
ModelBouncingKeys=1

[DEXIN Tt eSPORTS THERON Keyboard]
MatchName=DEXIN Tt eSPORTS THERON Keyboard
ModelBouncingKeys=1

[DEXIN Tt eSPORTS THERON Consumer Control]
MatchName=DEXIN Tt eSPORTS THERON Consumer Control
ModelBouncingKeys=1

[mouse]
MatchUdevType=mouse
ModelBouncingKeys=1

[THERON]
MatchName=*THERON*
ModelBouncingKeys=1

[DEXIN]
MatchName=*DEXIN*
ModelBouncingKeys=1
4
  • 1
    Here you meticulously disabled the debounce ☺ Libinput has it enabled by default, and what the ModelBouncingKeys=1 quirk does is it says "bouncing keys for this model are, for whatever weird reason, the normal behavior" (I admit, it may not be immediately clear from the naming, I had to double-check it locally too). IIRC one such example is the virtual mouse pointer in VMWare: it slightly delays the click, and so upon double-clicking clicks get sent very close in time. FTR: when debounce is enabled, instead of DEBOUNCE_STATE_DISABLED you'll see DEBOUNCE_STATE_IS_UP.
    – Hi-Angel
    Feb 6, 2021 at 11:02
  • Oh, and btw, please note that quirks file is read when an application making use of libinput library is being started. It means that you can test the quirks with libinput debug-events --verbose immediately, because that utility is making use of the library and you just started it. But at the same time you'll see no actual changes in mouse behavior (as opposed to entries in the libinput-debug-events log) because your running Xorg/wayland-compositor are past the point they read the file, so you'll want to restart them.
    – Hi-Angel
    Feb 6, 2021 at 11:16
  • 1
    @Hi-Angel thank you, it helped me. Mouse works much better. If you copy comment as answer, I accept it.
    – Oboroten
    Feb 6, 2021 at 13:41
  • 1
    If you see some "bounces" are still getting through and you have any interest, you could experiment by changing the timeout when an event is considered a bounce. Sadly, it's not currently available as an option, so you'd have to build libinput yourself and modify the sources. The timeout is, I think (I'm not completely sure, I just quickly grepped through sources), is defined at this line
    – Hi-Angel
    Feb 6, 2021 at 13:56

1 Answer 1

2

In your text you meticulously disabled the debounce ☺ Libinput has it enabled by default, and what the ModelBouncingKeys=1 quirk does is it says "bouncing keys for this model are, for whatever weird reason, the normal behavior" (I admit, it may not be immediately clear from the naming, I had to double-check it locally too). IIRC one such example is the virtual mouse pointer in VMWare: it slightly delays the click, and so upon double-clicking clicks get sent very close in time.

When debounce is enabled, instead of DEBOUNCE_STATE_DISABLED you'll see DEBOUNCE_STATE_IS_UP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.