Bug 489729 - Bounce key delay doesn't seem to use the correct value
Summary: Bounce key delay doesn't seem to use the correct value
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_accessibility (show other bugs)
Version: 6.1.2
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: accessibility, wayland
Depends on:
Blocks:
 
Reported: 2024-07-04 10:12 UTC by kattaleya22
Modified: 2025-01-30 00:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kattaleya22 2024-07-04 10:12:28 UTC
SUMMARY
Bounce key delay doesn't seem to use the correct value. When I set it to 100 (the lowest it seems to accept) I can mash a single key and it rejects quite a few presses. There is no unit of measurement next to the value, but I assume it's milliseconds. I would expect far fewer rejections for it to truly be set to 100ms. The main reason I was looking into this is because I have a mechanical keyboard that's chattering like crazy and discovered there's a built-in feature to reject double-key presses. 

Additionally, I had a friend test this setting out and he can't even type sentences without rejection. Something is definitely a bit off with the delay.

STEPS TO REPRODUCE
1. Navigate to System Settings > Accessibility > Keyboard Filters
2. Enable "Bounce Keys"
3. Adjust delay to 100 (Think default was 500?)
4. Ensure "Ring system bell when rejected" is enabled for easier debugging
5. Click Apply at the bottom right
6. Repeatedly mash a key as quickly as you can and wait for rejections.

OBSERVED RESULT
Far too many keys are rejected.

EXPECTED RESULT
I don't even think I can press a key 10 times in a second. I would expect a much lower, if not null, rejection rate. Keys get rejection just from words that have double letters.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 6.0
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0
Kernel Version: 6.5.0-41-generic (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 Tom Boshoven 2024-11-28 04:58:46 UTC
This feature indeed appears to not work very well for key chatter. 100ms is generally too high a value for this purpose.
When I manually set it to 40ms in .config/kaccessrc it does help in my case (also key chatter), but it's not perfect.

The libinput docs have a section on debouncing (https://wayland.freedesktop.org/libinput/doc/latest/button-debouncing.html#button-debouncing) to solve hardware defects versus for accessibility. It looks like the former is implemented as part of libinput and the latter is not.
KDE does not appear to provide both.
Comment 2 David Edmundson 2025-01-09 13:22:47 UTC
Can reproduce, it's not saving properly
Comment 3 David Edmundson 2025-01-27 10:20:09 UTC
Git commit 52e94bf0a39b6e6aeaadefc89d4b4dbd37547be0 by David Edmundson.
Committed on 27/01/2025 at 10:20.
Pushed by davidedmundson into branch 'master'.

kcms/access use working validator on spinboxes

The KCM is full of many Spinboxes with suffixes.
A function removes the suffix when extracting the value, however by
default all spinboxes have an IntValidator on them.

The value extraction is not run before the validation, meaning the
IntValidator always fails.

The end result is that typing in the spinbox does not work correctly
with no change signal ever emitted.

We cannot remove the IntValidator as no other code checks that values
are in bounds.

This patch adds a custom validator that strips additional text before
using the int validation code.

M  +21   -0    kcms/access/kcmaccess.cpp
M  +6    -5    kcms/access/ui/ActivationShortcuts.qml
M  +11   -2    kcms/access/ui/KeyboardFilters.qml
M  +16   -1    kcms/access/ui/MouseNavigation.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/52e94bf0a39b6e6aeaadefc89d4b4dbd37547be0
Comment 4 Bug Janitor Service 2025-01-30 00:04:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2777
Comment 5 Nate Graham 2025-01-30 00:18:44 UTC
Git commit 79629a65f65f32ed10fc9bb4ef94be123d4cabb9 by Nate Graham.
Committed on 30/01/2025 at 00:03.
Pushed by ngraham into branch 'Plasma/6.3'.

kcms/access use working validator on spinboxes

The KCM is full of many Spinboxes with suffixes.
A function removes the suffix when extracting the value, however by
default all spinboxes have an IntValidator on them.

The value extraction is not run before the validation, meaning the
IntValidator always fails.

The end result is that typing in the spinbox does not work correctly
with no change signal ever emitted.

We cannot remove the IntValidator as no other code checks that values
are in bounds.

This patch adds a custom validator that strips additional text before
using the int validation code.


(cherry picked from commit 52e94bf0a39b6e6aeaadefc89d4b4dbd37547be0)

84fa951a kcms/access use working validator on spinboxes

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +21   -0    kcms/access/kcmaccess.cpp
M  +6    -5    kcms/access/ui/ActivationShortcuts.qml
M  +11   -2    kcms/access/ui/KeyboardFilters.qml
M  +16   -1    kcms/access/ui/MouseNavigation.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/79629a65f65f32ed10fc9bb4ef94be123d4cabb9