GNOME Bugzilla – Bug 774989
Keystrokes in search field are multiplied
Last modified: 2017-06-23 13:10:15 UTC
Often the search field behaves weirdly, when I enter "thunderbird" it shows "ttttthhunder". This Behaviour affects only gnome-shell, no other application, so it is definitely not an issue with the physical keyboard.
Created attachment 340676 [details] screenshot of bug Here is a screenshort. Note the letter "g" in the search field which is there three times, even though I have entered it only once.
Created attachment 340746 [details] [review] clutter/evdev: Avoid losing key repeat timestamp resolution Commit 9214d5029c630e6ed8fd9793f6bcb0a0ae451576 changed the notify* API to use microseconds and we already have a microsecond time source here so we can use the timestamp directly without losing resolution at this layer. -- Unrelated to this bug, just noticed while looking at this.
Created attachment 340747 [details] [review] clutter/evdev: Dispatch libinput before generating key repeat events Since both the libinput event source and the key repeat timer have the same priority, the order in which both handlers are called is arbitrary if both sources are ready on the same poll return. This means that sometimes we generate key repeats when there's already a real key event queued on libinput that would cancel the repeat timer if only it was processed before. One solution would be lowering the repeat timer source priority a notch lower than the libinput source but that would mean that a steady stream of events from libinput (e.g. pointer device motion) would prevent any key repeats to happen. Instead, we can fix this problem by trying to dispatch libinput from the key repeat timer and checking if the timer source has been destroyed before generating more key repeats.
Created attachment 342598 [details] Video showing the keyboard repeats Additional comments, which "might" help in reproducing this: * I mostly see it repeating the first character, might be a different bug, but hopefully it is the same, so this comment makes sense here * whenever this first appears, it is reproducible until a restart happens (I guess logout/login should also work, so gnome-shell restart should solve it) * unfortunately gnome-shell restart with <Alt+F2> r <Enter> does not work on wayland, so a full logout/login is required * with each gnome-shell search invocation the number of repeats for the first letter is increased by one: whenever I notice the bug by entering something, and the first letter appears n times: * I press escape twice to close the search (overview) * press Meta key/Win key to bring up the search again * press an alphanumeric key letter, and it appears n+1 times in the search field * note that in the above sequence if Escape is only pressed once, the search field is cleared, pressing an alphanumeric key makes the character appear n times again in the search bar * I did see this on two different computers, but I can not reliably reproduce it Attaching a video to show the behaviour after it appeared (recorded with the built-in screencast tool). If you could provide instructions on how to find more debug information that could help you, I would be glad to help solve this, as it is really annoying, and on one of the computers I saw it on, it appears on a daily basis.
Review of attachment 340747 [details] [review]: Makes sense to me
Review of attachment 340746 [details] [review]: OK
Attachment 340746 [details] pushed as 73524ca - clutter/evdev: Avoid losing key repeat timestamp resolution Attachment 340747 [details] pushed as 1597b35 - clutter/evdev: Dispatch libinput before generating key repeat events
*** Bug 778704 has been marked as a duplicate of this bug. ***