Bug 736297 - Typo of virsh send-key.
Summary: Typo of virsh send-key.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 743047
TreeView+ depends on / blocked
 
Reported: 2011-09-07 10:24 UTC by yuping zhang
Modified: 2011-12-06 11:28 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.9.4-11.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:28:37 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description yuping zhang 2011-09-07 10:24:17 UTC
Description of problem:
# virsh help send-key
  NAME
    send-key - Send keycodes to the guest

  SYNOPSIS
    send-key <domain> [--codeset <string>] [--holdtime <number>] <keycode>...

  DESCRIPTION
    Send keycodes (integers or symbolic names) to the guest

  OPTIONS
    [--domain] <string>  domain name, id or uuid
    --codeset <string>  the codeset of keycodes, default:linux
    --holdtime <number>  the time (in millseconds) how long the keys will be held
    <keycode>        the key code

The millseconds should be milliseconds.

Version-Release number of selected component (if applicable):
libvirt-0.9.4-9.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. As description


Actual results:
As above

Expected results:

Comment 1 yuping zhang 2011-09-08 02:43:55 UTC
Another typo of virsh send-key:
#man virsh
............
 send-key domain-id [--codeset codeset] [--holdtime holdtime] keycode...
               Parse the keycode sequence as keystrokes to send to domain-id.  Each keycode can
               either be a numeric value or a symbolic name from the corresponding codeset.  If
               --holdtime is given, each keystroke will be held for that many milliseconds.
               The default codeset is linux, but use of the --codeset option allows other
               codesets to be chosen.
	......

	 xtkbd
                   The numeric values are those defined by the Linux KBD device.  These are a
                   variant on the original XT codeset, but often with different encoding for
                   extended keycodes. No symbolic names are provided.

	....

# virsh send-key 9 --codeset xtkbd 0x11
error: unknown codeset: 'xtkbd'

xtkbd should be xt_kbd.Find ' xt_kbd' codeset from the following link:
http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/util/virkeycode.c;h=f85fe4ac5d5e86b17febfc762ac8ae6fdde9c927;hb=HEAD

# virsh send-key 4 --codeset xt_kbd 0x11
No error message.
In guest: "w" print.

Comment 2 yuping zhang 2011-09-08 02:47:21 UTC
I think it's better to fix comment 1 in rhel6.2 as it's important to customer.

Comment 4 Alex Jia 2011-09-08 10:21:22 UTC
Patches have been ACKed and pushed, so please move the bug to POST status.

commit 9acaca7c24b3c8b14bcba9b92acac70bcaf6139b
Author: Alex Jia <ajia@redhat.com>
Date:   Thu Sep 8 00:53:46 2011 +0800

    doc: fix incorrect option in send-key
    
    * tools/virsh.pod: fix a option typo of send-key section.
    
    Signed-off-by: Alex Jia <ajia@redhat.com>

commit 07331bba6d2c947d4cfd257fd0c4276aacb6f6b1
Author: Alex Jia <ajia@redhat.com>
Date:   Thu Sep 8 11:11:27 2011 +0800

    virsh: fix typo in opts_send_key
    
    * tools/virsh.c: millseconds should be milliseconds in opts_send_key.
    
    Signed-off-by: Alex Jia <ajia@redhat.com>

Comment 7 yuping zhang 2011-09-09 02:43:03 UTC
Verify this issue with:
libvirt-0.9.4-11.el6.x86_64

1.# virsh help send-key
  NAME
    send-key - Send keycodes to the guest

  SYNOPSIS
    send-key <domain> [--codeset <string>] [--holdtime <number>] <keycode>...

  DESCRIPTION
    Send keycodes (integers or symbolic names) to the guest

  OPTIONS
    [--domain] <string>  domain name, id or uuid
    --codeset <string>  the codeset of keycodes, default:linux
    --holdtime <number>  the time (in milliseconds) how long the keys will be held
    <keycode>        the key code

2.#man virsh
.......
send-key domain-id [--codeset codeset] [--holdtime holdtime] keycode...
               Parse the keycode sequence as keystrokes to send to domain-id.  Each keycode can either be a numeric
               value or a symbolic name from the corresponding codeset.  If --holdtime is given, each keystroke
               will be held for that many milliseconds.  The default codeset is linux, but use of the --codeset
               option allows other codesets to be chosen.
...
 xt_kbd
                   The numeric values are those defined by the Linux KBD device.  These are a variant on the
                   original XT codeset, but often with different encoding for extended keycodes. No symbolic names
                   are provided.
....

3.# virsh send-key 13 --codeset xt_kbd 0x11
In guest:"w" print.

So change the bug status to VERIFIED.

Comment 8 errata-xmlrpc 2011-12-06 11:28:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


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