Bug 1161184 - RFE: support input-send-event command in libvirt/virsh
Summary: RFE: support input-send-event command in libvirt/virsh
Keywords:
Status: CLOSED DUPLICATE of bug 636163
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: All
medium
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fangge Jin
URL:
Whiteboard:
Depends On: 1145028
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-06 15:32 UTC by Amos Kong
Modified: 2017-01-24 18:46 UTC (History)
19 users (show)

Fixed In Version:
Clone Of: 1145028
Environment:
Last Closed: 2017-01-24 18:46:05 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 636163 0 low CLOSED RFE: qemu: support input-send-event for mouse input 2021-02-22 00:41:40 UTC

Internal Links: 636163

Comment 2 Martin Kletzander 2014-11-10 14:07:00 UTC
Hi Amos, I have got three question to make sure we'll do this correctly.

1) How do you number the consoles, i.e. how should I know what number should I use for the 'console' parameter?  And is it mandatory?  I presume we will always want to use '0' as that should represent the default (first) display, am I right?

2) What is the difference between:

{ "execute": "send-key", "arguments": { "keys": [{"type": "qcode", "data": "ctrl_r"} ] } }

and:

{ "execute": "input-send-event", "arguments": { "console": 0, "events": [ { "type": "key", "data" : { "down": true, "key": {"type": "qcode", "data": "ctrl_r" } } }, { "type": "key", "data" : { "down": false, "key": {"type": "qcode", "data": "ctrl_r" } } } ] } }

or do they have the same functionality?  I guess they do, I just want to be sure.

Thank you in advance for the answers.

Comment 3 Amos Kong 2014-11-10 14:57:43 UTC
(In reply to Martin Kletzander from comment #2)
> Hi Amos, I have got three question to make sure we'll do this correctly.
> 
> 1) How do you number the consoles, i.e. how should I know what number should
> I use for the 'console' parameter?  And is it mandatory?  I presume we will
> always want to use '0' as that should represent the default (first) display,
> am I right?

I posted a patch to make the 'console' parameter optional, so the default parameter should be none, then QEMU will use the first available console.
http://lists.nongnu.org/archive/html/qemu-devel/2014-11/msg01188.html
 
> 2) What is the difference between:
> 
> { "execute": "send-key", "arguments": { "keys": [{"type": "qcode", "data":
> "ctrl_r"} ] } }
> 
> and:
> 
> { "execute": "input-send-event", "arguments": { "console": 0, "events": [ {
> "type": "key", "data" : { "down": true, "key": {"type": "qcode", "data":
> "ctrl_r" } } }, { "type": "key", "data" : { "down": false, "key": {"type":
> "qcode", "data": "ctrl_r" } } } ] } }
> 
> or do they have the same functionality?  I guess they do, I just want to be
> sure.

Yes. But we can split second command to two commands, even send other key events by input-send-event between two commands, it's more flexible.

> Thank you in advance for the answers.

Thank you.

Comment 10 Martin Kletzander 2017-01-24 15:01:40 UTC
The original need for input-send-event was fixed by other means, so this is just nice to have. Moving to upstream.

Comment 11 Cole Robinson 2017-01-24 18:46:05 UTC

*** This bug has been marked as a duplicate of bug 636163 ***


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