Skip to contentSkip to conversation

Key repeat is no longer working on TTY and grub menu

Qemu-devel Leonardo Soares Müller 4 participants 4 messages Feb 12, 2019 – Feb 19, 2019

lore
Share & tools
lore

Leonardo Soares Müller

author Reviewed-by Daniel P. Berrangé
#0 lore raw

I noticed that the key inputs are no longer repeating when using default setting on QEMU. For example, if I press "a" and keep it pressed it will print only one "a" instead of repeating them. Another example is when deleting text: instead of holding backspace pressed and the text is deleted, it's needed to press backspace once for each character.

As this makes many tasks much slower, requiring many key presses for tasks that were done in a single press, I did a bisect to see when this change happened. The result is:

0c0d42737dfdcea872a987ecba6ef55047df8881 is the first bad commit commit 0c0d42737dfdcea872a987ecba6ef55047df8881

Author: Gerd Hoffmann <[email protected]>
Date:   Tue Jan 22 10:28:11 2019 +0100

kbd-state: use state tracker for gtk

Use the new keyboard state tracked for gtk. Allows to drop the gtk-specific modifier state tracking code.

Message-id: [email protected]

:040000 040000 e882f144bafca90257a4604b5e62486a1ca038b2
0139afe1aee24256c3f711c080b0230ab104074a M include
:040000 040000 c258efc06107b944b0627792b9f2377600033118
4fd01a25a3e0d1fccca72c35ec58b205aa4fd882 M ui

I'm using the GTK interface and all guests without a Graphical User Interface (GUI) are affected by this. This happens on grub menu and on TTY of multiple Linux guests.

Workarounds found for the key repeat issue:

-Installing a GUI to server systems;
-Adding a usb-kbd device, but then the key '/' is lost.

#1 lore raw
Quoted 24 lines · Leonardo Soares Müller

I noticed that the key inputs are no longer repeating when using default setting on QEMU. For example, if I press "a" and keep it pressed it will print only one "a" instead of repeating them. Another example is when deleting text: instead of holding backspace pressed and the text is deleted, it's needed to press backspace once for each character.

As this makes many tasks much slower, requiring many key presses for tasks that were done in a single press, I did a bisect to see when this change happened. The result is:

0c0d42737dfdcea872a987ecba6ef55047df8881 is the first bad commit commit 0c0d42737dfdcea872a987ecba6ef55047df8881

Author: Gerd Hoffmann <[email protected]>
Date:   Tue Jan 22 10:28:11 2019 +0100

kbd-state: use state tracker for gtk

Use the new keyboard state tracked for gtk. Allows to drop the gtk-specific modifier state tracking code.

Message-id: [email protected]

Quoted 8 lines

:040000 040000 e882f144bafca90257a4604b5e62486a1ca038b2
0139afe1aee24256c3f711c080b0230ab104074a M include
:040000 040000 c258efc06107b944b0627792b9f2377600033118
4fd01a25a3e0d1fccca72c35ec58b205aa4fd882 M ui

I'm using the GTK interface and all guests without a Graphical User Interface (GUI) are affected by this. This happens on grub menu and on TTY of multiple Linux guests.

Yes, this is another regression accidentally introduced by the keyboard state tracker.

When GTK does key repeat it omits the Up event for repeated keys.

IOW, you get

Press (a)
Press (a)
Press (a)
Release (a)

Not

Press (a)
Release (a)
Press (a)
Release (a)
Press (a)
Release (a)

The keyboard state tracker doesn't take this into account, so it is surpressing all except the first Press event.

This might affect other frontends too if they use the same trick for key repeat

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
Quoted 11 lines · Daniel P. Berrangé

Yes, this is another regression accidentally introduced by the keyboard state tracker.

When GTK does key repeat it omits the Up event for repeated keys.

IOW, you get

Press (a)
Press (a)
Press (a)
Release (a)

This is how keyboards commonly do it, if I remember correctly.

Quoted 9 lines

Not

Press (a)
Release (a)
Press (a)
Release (a)
Press (a)
Release (a)

Quoted 5 lines

The keyboard state tracker doesn't take this into account, so it is surpressing all except the first Press event.

This might affect other frontends too if they use the same trick for key repeat

Plausible.

#3 lore raw
Quoted 7 lines · Markus Armbruster
Quoted 5 lines · Daniel P. Berrangé

Yes, this is another regression accidentally introduced by the keyboard state tracker.

When GTK does key repeat it omits the Up event for repeated keys.

Quoted 8 lines
Quoted 6 lines

IOW, you get

Press (a)
Press (a)
Press (a)
Release (a)

This is how keyboards commonly do it, if I remember correctly.

Yes, this is pretty much what the hardware sends, intentionally, so the software can figure whenever the event is a autorepeat event or not.

These days most software just ignores repeated events from the hardware and generates them in software instead, to not depend on the keyboard hardware capabilities for autorepeat.

Quoted 4 lines
Quoted 2 lines

This might affect other frontends too if they use the same trick for key repeat

Plausible.

UIs are not consistent here. But, yes, we probably should just allow down events even if the key is already in down state.

cheers,
Gerd