Only repeat one key
ClosedPublic

Authored by graesslin on Oct 5 2016, 6:31 AM.

Details

Summary

So far KWin tried to repeat all pressed keys which should repeat. But
this is not how X11 and e.g. QtWayland handle it. There only one key -
the last one which got pressed - repeats. And this makes sense as the
key is used to generate a keysym and that one KWin caches. Thus the
logic so far resulted in incorrect keysyms to be generated during the
repeat. E.g. pressing a, pressing b, releasing b would repeat b instead
of the hold a as b was the last generated keysym.

This change addresses this problem and let's only one key repeat at a
time. When the currently repeating key gets released the repeat timer is
stopped and other hold keys won't repeat any more. This also matches the
behavior of X11 and QtWayland.

BUG: 369091
FIXED-IN: 5.8.1

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 7106.Oct 5 2016, 6:31 AM
graesslin retitled this revision from to Only repeat one key.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptOct 5 2016, 6:31 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
sebas accepted this revision.Oct 5 2016, 2:33 PM
sebas added a reviewer: sebas.
This revision is now accepted and ready to land.Oct 5 2016, 2:33 PM
This revision was automatically updated to reflect the committed changes.