Bug 808661 - Only one can be received when sent multiple duplicate key-codes to the guest.
Only one can be received when sent multiple duplicate key-codes to the guest.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Gunannan Ren
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-31 01:13 EDT by lei wang
Modified: 2012-04-03 12:37 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-03 12:37:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description lei wang 2012-03-31 01:13:21 EDT
Description of problem: 
Only one can be received when sent multiple duplicate key-codes to the guest.

Version-Release number of selected component (if applicable):
kernel-2.6.32-251.el6
libvirt-0.9.10-6.el6
netcf-0.1.9-2.el6
qemu-kvm-0.12.1.2-2.251.el6

How reproducible:
always

Steps to Reproduce:
1.#virsh send-key<domain>  0x10 0x11 0x10
	==>the "qwq" will be shown on guest console, it's a expected result.
2.#virsh send-key<domain>  16 17 16
	==>the "qwq" will be shown on guest console, it's a expected result.
3.#virsh send-key<domain>  0x10 0x10 0x10
	==>the "q" will be shown on guest console, it's a unexpected result.
4.#virsh send-key<domain>  16 16 16
	==>the "q" will be shown on guest console, it's a unexpected result.

Actual results:
Guest console can receive multiple duplicate key-codes.

Expected results:
Only one can be received when sent multiple duplicate key-codes to the guest.
Comment 3 Gunannan Ren 2012-04-03 09:48:53 EDT
The sendkey command in qemu is to emulate keyboard events. Use - to press several keys simultaneously for combination key events(such as ctl-alt-f1). If you want to press multiple duplicated key-codes, the effect is the same as the case that only one key is pressed, so it makes sense to give only one letter in your cases in guest.

BTW, when I tried it by hand in qemu-kvm monitor console, the result is like what I said above. so I don't think this is a bug in both libvirt and qemu.
If I am wrong, this is not a libvirt bug at least.
Comment 4 Dave Allan 2012-04-03 09:56:11 EDT
Guannan, that makes sense.  So what would the correct command be to send multiple keystrokes, for example, if a user wanted to send the string "qqq" or "reboot" ?
Comment 5 Gunannan Ren 2012-04-03 10:08:25 EDT
I think if we still want to use sendkey to do that, we could invoke the command with the same letter multiple times.like the follows for "qqq"
virsh send-key <domain> 0x10
virsh send-key <domain> 0x10
virsh send-key <domain> 0x10
Or use virtio-serial for data messaging between host and guest.
Comment 6 Dave Allan 2012-04-03 12:37:16 EDT
Thanks, Guannan.  Given that, I am closing as NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.