Bug 808661 - Only one can be received when sent multiple duplicate key-codes to the guest.
Summary: Only one can be received when sent multiple duplicate key-codes to the guest.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Gunannan Ren
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-31 05:13 UTC by lei wang
Modified: 2012-04-03 16:37 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-03 16:37:16 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description lei wang 2012-03-31 05:13:21 UTC
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 13:48:53 UTC
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 13:56:11 UTC
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 14:08:25 UTC
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 16:37:16 UTC
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.