* [Qemu-devel] [PULL 0/3] input: misc fixes.
@ 2015-01-22 11:32 Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 1/3] input: improve docs for input-send-event qmp command Gerd Hoffmann
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2015-01-22 11:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
A few input layer fixes.
pleaase pull,
Gerd
The following changes since commit 699eae17b841e6784dc3864bf357e26bff1e9dfe:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-misc-20150120' into staging (2015-01-20 16:19:58 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-input-20150122-1
for you to fetch changes up to 0ee4de5840ccc1072459ec68062bfb63c888a94d:
hw/input/hid.c Fix capslock hid code (2015-01-22 12:19:48 +0100)
----------------------------------------------------------------
input: misc fixes.
----------------------------------------------------------------
Dinar Valeev (1):
hw/input/hid.c Fix capslock hid code
Gerd Hoffmann (2):
input: improve docs for input-send-event qmp command
hid: handle full ptr queues in post_load
hw/input/hid.c | 23 ++++++++++++++++++++++-
qapi-schema.json | 12 ++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 1/3] input: improve docs for input-send-event qmp command
2015-01-22 11:32 [Qemu-devel] [PULL 0/3] input: misc fixes Gerd Hoffmann
@ 2015-01-22 11:32 ` Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 2/3] hid: handle full ptr queues in post_load Gerd Hoffmann
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2015-01-22 11:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Markus Armbruster, Gerd Hoffmann, Luiz Capitulino
Text partly suggested by Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qapi-schema.json | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/qapi-schema.json b/qapi-schema.json
index fbfc52f..f5b1ed1 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3258,6 +3258,18 @@
# Send input event(s) to guest.
#
# @console: #optional console to send event(s) to.
+# This parameter can be used to send the input event to
+# specific input devices in case (a) multiple input devices
+# of the same kind are added to the virtual machine and (b)
+# you have configured input routing (see docs/multiseat.txt)
+# for those input devices. If input routing is not
+# configured this parameter has no effect.
+# If @console is missing, only devices that aren't associated
+# with a console are admissible.
+# If @console is specified, it must exist, and both devices
+# associated with that console and devices not associated with a
+# console are admissible, but the former take precedence.
+
#
# @events: List of InputEvent union.
#
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 2/3] hid: handle full ptr queues in post_load
2015-01-22 11:32 [Qemu-devel] [PULL 0/3] input: misc fixes Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 1/3] input: improve docs for input-send-event qmp command Gerd Hoffmann
@ 2015-01-22 11:32 ` Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 3/3] hw/input/hid.c Fix capslock hid code Gerd Hoffmann
2015-01-22 18:57 ` [Qemu-devel] [PULL 0/3] input: misc fixes Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2015-01-22 11:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, Dr. David Alan Gilbert
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
---
hw/input/hid.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/hw/input/hid.c b/hw/input/hid.c
index 148c003..ad18555 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -514,6 +514,27 @@ static int hid_post_load(void *opaque, int version_id)
HIDState *s = opaque;
hid_set_next_idle(s);
+
+ if (s->n == QUEUE_LENGTH && (s->kind == HID_TABLET ||
+ s->kind == HID_MOUSE)) {
+ /*
+ * Handle ptr device migration from old qemu with full queue.
+ *
+ * Throw away everything but the last event, so we propagate
+ * at least the current button state to the guest. Also keep
+ * current position for the tablet, signal "no motion" for the
+ * mouse.
+ */
+ HIDPointerEvent evt;
+ evt = s->ptr.queue[(s->head+s->n) & QUEUE_MASK];
+ if (s->kind == HID_MOUSE) {
+ evt.xdx = 0;
+ evt.ydy = 0;
+ }
+ s->ptr.queue[0] = evt;
+ s->head = 0;
+ s->n = 1;
+ }
return 0;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 3/3] hw/input/hid.c Fix capslock hid code
2015-01-22 11:32 [Qemu-devel] [PULL 0/3] input: misc fixes Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 1/3] input: improve docs for input-send-event qmp command Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 2/3] hid: handle full ptr queues in post_load Gerd Hoffmann
@ 2015-01-22 11:32 ` Gerd Hoffmann
2015-01-22 18:57 ` [Qemu-devel] [PULL 0/3] input: misc fixes Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2015-01-22 11:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Dinar Valeev, Gerd Hoffmann
From: Dinar Valeev <dvaleev@suse.com>
When ever USB keyboard is used, e.g. '-usbdevice keyboard' pressing
caps lock key send 0x32 hid code, which is treated as backslash.
Instead it should be 0x39 code. This affects sending uppercase keys,
as they typed whith caps lock active.
While on x86 this can be workarounded by using ps/2 protocol. On
Power it is crusial as we don't have anything else than USB.
This is fixes guest automation tasts over vnc.
Signed-off-by: Dinar Valeev <dvaleev@suse.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/input/hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/input/hid.c b/hw/input/hid.c
index ad18555..6841cb8 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -41,7 +41,7 @@ static const uint8_t hid_usage_keys[0x100] = {
0x07, 0x09, 0x0a, 0x0b, 0x0d, 0x0e, 0x0f, 0x33,
0x34, 0x35, 0xe1, 0x31, 0x1d, 0x1b, 0x06, 0x19,
0x05, 0x11, 0x10, 0x36, 0x37, 0x38, 0xe5, 0x55,
- 0xe2, 0x2c, 0x32, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
+ 0xe2, 0x2c, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
0x3f, 0x40, 0x41, 0x42, 0x43, 0x53, 0x47, 0x5f,
0x60, 0x61, 0x56, 0x5c, 0x5d, 0x5e, 0x57, 0x59,
0x5a, 0x5b, 0x62, 0x63, 0x00, 0x00, 0x00, 0x44,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PULL 0/3] input: misc fixes.
2015-01-22 11:32 [Qemu-devel] [PULL 0/3] input: misc fixes Gerd Hoffmann
` (2 preceding siblings ...)
2015-01-22 11:32 ` [Qemu-devel] [PULL 3/3] hw/input/hid.c Fix capslock hid code Gerd Hoffmann
@ 2015-01-22 18:57 ` Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2015-01-22 18:57 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 22 January 2015 at 11:32, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> A few input layer fixes.
>
> pleaase pull,
> Gerd
>
> The following changes since commit 699eae17b841e6784dc3864bf357e26bff1e9dfe:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-misc-20150120' into staging (2015-01-20 16:19:58 +0000)
>
> are available in the git repository at:
>
>
> git://git.kraxel.org/qemu tags/pull-input-20150122-1
>
> for you to fetch changes up to 0ee4de5840ccc1072459ec68062bfb63c888a94d:
>
> hw/input/hid.c Fix capslock hid code (2015-01-22 12:19:48 +0100)
>
> ----------------------------------------------------------------
> input: misc fixes.
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-22 18:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 11:32 [Qemu-devel] [PULL 0/3] input: misc fixes Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 1/3] input: improve docs for input-send-event qmp command Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 2/3] hid: handle full ptr queues in post_load Gerd Hoffmann
2015-01-22 11:32 ` [Qemu-devel] [PULL 3/3] hw/input/hid.c Fix capslock hid code Gerd Hoffmann
2015-01-22 18:57 ` [Qemu-devel] [PULL 0/3] input: misc fixes Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).