[Wayland-bugs] [Bug 105222] RFE: keyboard debouncing

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 1 08:28:07 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=105222

--- Comment #8 from Adam Dingle <adam at medovina.org> ---
Created attachment 137713
  --> https://bugs.freedesktop.org/attachment.cgi?id=137713&action=edit
keyboard state redux

Peter,

thanks for the quick response and the in-depth analysis.  Your
keyboard-state.py is a useful tool and I hope it will live on.

You are looking for bounces by looking for any two consecutive events that are
closely separated.  I believe that approach will not work.  Instead, we need to
look for two successive key down events from the *same key* that occur too
closely together.

I've modified keyboard-state.py to do exactly this, using a bounce threshold of
70 ms.  I ran it on my event recording and have attached the output.  It
detects exactly the bounces that occurred as I was typing, including one that I
didn't mention previously (a bounced "n") since I backspaced over it
immediately after it occurred.  Here they are:

10.773511 - after "even"
11.235823 - after "with"
15.791665 - after "I'm"
16.211357 - after "still"

66.204838 - 'n' in "key repeating"
72.104026 - before "double"
86.092569 - before "The delay"

I believe this shows that bounce detection is viable, at least for my keyboard.

I'll make a pull request at your github site with my changes to
keyboard-state.py, in case you want them.

You've said that you are reluctant to fix this in libinput.  I guess the
question then comes down to this: would you accept a patch to add keyboard
debouncing along these lines?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20180301/47acd92f/attachment-0001.html>


More information about the wayland-bugs mailing list