Bug 474752 - Bounce keys does not work on Wayland
Summary: Bounce keys does not work on Wayland
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_accessibility (show other bugs)
Version: 5.27.8
Platform: Fedora RPMs Linux
: NOR grave
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: accessibility, wayland
Depends on:
Blocks:
 
Reported: 2023-09-21 02:14 UTC by cangrejopr
Modified: 2023-11-23 17:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cangrejopr 2023-09-21 02:14:55 UTC
SUMMARY
The Bounce Key settings under System settings > Accessibility > Keyboard Filters is not working. Repeated keys do not get eliminated and the bell ring does not sound.


STEPS TO REPRODUCE
1. Activate Bounce Keys under Accessibility > Keyboard Filters
2. Activate Ring system bell when rejected
3. Quickly tap a specific key

OBSERVED RESULT
Repeated keys do not get rejected and no notification sound is made.

EXPECTED RESULT
Thee second repeated key should get rejected and a system bell notification sound should be made alerting that the system rejected the repeated key.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 38
(available in About System)
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
I have used KDE for years in my laptop and I've always had an issue when typing fast I will get repeated keys randomly. I managed to "fix" this issue by making a custom script that will modify xkbset and allow me to set Bounce Keys to 20ms. However, xkbset does not work in Wayland. I tried activating the Bounce keys setting under accessibility but no matter what ms I write it doesn't filter the repeat key. This makes KDE very hard to use specially for coding. I've had the same issue in Kuubuntu 23.04. 

Hardware:
Product Name: HP EliteBook x360 1030 G4
Manufacturer: HP
Graphics Processor: Mesa Intel® UHD Graphics 620
Memory: 8gb of RAM
Processors: 8 × Intel® Core™ i5-8265U CPU @ 1.60GHz
Comment 1 Nicolas Fella 2023-09-21 10:56:24 UTC
Bounce keys are not implemented on Wayland. This needs an implementation similar to what I did for sticky keys: https://invent.kde.org/plasma/kwin/-/merge_requests/3365
Comment 2 cangrejopr 2023-09-21 19:46:32 UTC
(In reply to Nicolas Fella from comment #1)
> Bounce keys are not implemented on Wayland. This needs an implementation
> similar to what I did for sticky keys:
> https://invent.kde.org/plasma/kwin/-/merge_requests/3365

As a request, since the delay can't be tweaked in Wayland using xkbset, could it be allowed to decrease the bounce key ms to an option below 50ms.  X11 had the cap at 50ms which was still too high. Thanks.
Comment 3 Bug Janitor Service 2023-11-21 00:48:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4677
Comment 4 Nicolas Fella 2023-11-23 13:07:38 UTC
Git commit e7942c3485f332f478be23040e2f0a3b7ed12cb6 by Nicolas Fella.
Committed on 23/11/2023 at 14:07.
Pushed by nicolasfella into branch 'master'.

Implement bounce keys on Wayland

Bouce keys suppresses additional key presses during a given interval

This is used by people with motor impairments or bad keyboards

It works by remembering the last input timestamp for a key

If an event's timestamp is too close to the last timestamp for that key the event is rejected

M  +1    -0    autotests/integration/CMakeLists.txt
A  +127  -0    autotests/integration/bounce_keys_test.cpp     [License: GPL(v2.0+)]
M  +1    -1    src/input_event.h
M  +1    -0    src/plugins/CMakeLists.txt
A  +18   -0    src/plugins/bouncekeys/CMakeLists.txt
A  +55   -0    src/plugins/bouncekeys/bouncekeys.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +28   -0    src/plugins/bouncekeys/bouncekeys.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +32   -0    src/plugins/bouncekeys/main.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +5    -0    src/plugins/bouncekeys/metadata.json

https://invent.kde.org/plasma/kwin/-/commit/e7942c3485f332f478be23040e2f0a3b7ed12cb6