* [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input
@ 2017-12-18 13:24 Miika S
2017-12-18 13:24 ` [Qemu-devel] [PATCH 2/3] input: add mouse side buttons " Miika S
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Miika S @ 2017-12-18 13:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Miika S
Signed-off-by: Miika S <miika9764@gmail.com>
---
hw/input/virtio-input-hid.c | 7 +++++++
qapi/ui.json | 2 +-
ui/keycodemapdb | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index e78faec0b1..9628d289f9 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -139,6 +139,13 @@ static const unsigned int keymap_qcode[Q_KEY_CODE__MAX] = {
[Q_KEY_CODE_META_L] = KEY_LEFTMETA,
[Q_KEY_CODE_META_R] = KEY_RIGHTMETA,
[Q_KEY_CODE_MENU] = KEY_MENU,
+
+ [Q_KEY_CODE_MUHENKAN] = KEY_MUHENKAN,
+ [Q_KEY_CODE_HENKAN] = KEY_HENKAN,
+ [Q_KEY_CODE_KATAKANAHIRAGANA] = KEY_KATAKANAHIRAGANA,
+ [Q_KEY_CODE_COMPOSE] = KEY_COMPOSE,
+ [Q_KEY_CODE_RO] = KEY_RO,
+ [Q_KEY_CODE_YEN] = KEY_YEN,
};
static const unsigned int keymap_button[INPUT_BUTTON__MAX] = {
diff --git a/qapi/ui.json b/qapi/ui.json
index 07b468f625..da4be505ac 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -775,7 +775,7 @@
'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
- 'ro', 'hiragana', 'henkan', 'yen',
+ 'ro', 'hiragana', 'muhenkan', 'henkan', 'katakanahiragana', 'yen',
'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
'volumeup', 'volumedown', 'mediaselect',
diff --git a/ui/keycodemapdb b/ui/keycodemapdb
index 10739aa260..05dad417e9 160000
--- a/ui/keycodemapdb
+++ b/ui/keycodemapdb
@@ -1 +1 @@
-Subproject commit 10739aa26051a5d49d88132604539d3ed085e72e
+Subproject commit 05dad417e9d0b37ee1fba33056d91a6b734b3357
--
2.15.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/3] input: add mouse side buttons to virtio input
2017-12-18 13:24 [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input Miika S
@ 2017-12-18 13:24 ` Miika S
2017-12-18 13:24 ` [Qemu-devel] [PATCH 3/3] input: virtio: don't send mouse wheel event twice Miika S
2017-12-20 22:35 ` [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input Eric Blake
2 siblings, 0 replies; 6+ messages in thread
From: Miika S @ 2017-12-18 13:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Miika S
Signed-off-by: Miika S <miika9764@gmail.com>
---
hw/input/virtio-input-hid.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index 9628d289f9..2cac659469 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -154,6 +154,8 @@ static const unsigned int keymap_button[INPUT_BUTTON__MAX] = {
[INPUT_BUTTON_MIDDLE] = BTN_MIDDLE,
[INPUT_BUTTON_WHEEL_UP] = BTN_GEAR_UP,
[INPUT_BUTTON_WHEEL_DOWN] = BTN_GEAR_DOWN,
+ [INPUT_BUTTON_SIDE] = BTN_SIDE,
+ [INPUT_BUTTON_EXTRA] = BTN_EXTRA,
};
static const unsigned int axismap_rel[INPUT_AXIS__MAX] = {
--
2.15.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 3/3] input: virtio: don't send mouse wheel event twice
2017-12-18 13:24 [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input Miika S
2017-12-18 13:24 ` [Qemu-devel] [PATCH 2/3] input: add mouse side buttons " Miika S
@ 2017-12-18 13:24 ` Miika S
2017-12-20 22:35 ` [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input Eric Blake
2 siblings, 0 replies; 6+ messages in thread
From: Miika S @ 2017-12-18 13:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Miika S
On Linux, a mouse event is generated for both down and up when mouse
wheel is used. This caused virtio_input_send() to be called twice each
time the wheel was used.
This commit adds a check for the button down state and only calls
virtio_input_send() when it is true.
Signed-off-by: Miika S <miika9764@gmail.com>
---
hw/input/virtio-input-hid.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index 2cac659469..587616a932 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -225,8 +225,10 @@ static void virtio_input_handle_event(DeviceState *dev, QemuConsole *src,
break;
case INPUT_EVENT_KIND_BTN:
btn = evt->u.btn.data;
- if (vhid->wheel_axis && (btn->button == INPUT_BUTTON_WHEEL_UP ||
- btn->button == INPUT_BUTTON_WHEEL_DOWN)) {
+ if (vhid->wheel_axis &&
+ (btn->button == INPUT_BUTTON_WHEEL_UP ||
+ btn->button == INPUT_BUTTON_WHEEL_DOWN) &&
+ btn->down) {
event.type = cpu_to_le16(EV_REL);
event.code = cpu_to_le16(REL_WHEEL);
event.value = cpu_to_le32(btn->button == INPUT_BUTTON_WHEEL_UP
--
2.15.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input
2017-12-18 13:24 [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input Miika S
2017-12-18 13:24 ` [Qemu-devel] [PATCH 2/3] input: add mouse side buttons " Miika S
2017-12-18 13:24 ` [Qemu-devel] [PATCH 3/3] input: virtio: don't send mouse wheel event twice Miika S
@ 2017-12-20 22:35 ` Eric Blake
2017-12-23 9:58 ` Miika S
2 siblings, 1 reply; 6+ messages in thread
From: Eric Blake @ 2017-12-20 22:35 UTC (permalink / raw)
To: Miika S, qemu-devel
On 12/18/2017 07:24 AM, Miika S wrote:
> Signed-off-by: Miika S <miika9764@gmail.com>
> ---
> hw/input/virtio-input-hid.c | 7 +++++++
> qapi/ui.json | 2 +-
> ui/keycodemapdb | 2 +-
> 3 files changed, 9 insertions(+), 2 deletions(-)
When sending a multi-patch series, please remember to include the 0/3
cover letter. 'git config format.coverletter auto' can make this task
easier to remember.
>
> static const unsigned int keymap_button[INPUT_BUTTON__MAX] = {
> diff --git a/qapi/ui.json b/qapi/ui.json
> index 07b468f625..da4be505ac 100644
> --- a/qapi/ui.json
> +++ b/qapi/ui.json
> @@ -775,7 +775,7 @@
> 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
> 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
> 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
> - 'ro', 'hiragana', 'henkan', 'yen',
> + 'ro', 'hiragana', 'muhenkan', 'henkan', 'katakanahiragana', 'yen',
> 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
> 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
> 'volumeup', 'volumedown', 'mediaselect',
Missing documentation that calls out which enum values were added in 2.12.
> diff --git a/ui/keycodemapdb b/ui/keycodemapdb
> index 10739aa260..05dad417e9 160000
> --- a/ui/keycodemapdb
> +++ b/ui/keycodemapdb
> @@ -1 +1 @@
> -Subproject commit 10739aa26051a5d49d88132604539d3ed085e72e
> +Subproject commit 05dad417e9d0b37ee1fba33056d91a6b734b3357
Generally, the commit message body should call out that a submodule
change alongside other changes is intentional.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input
2017-12-20 22:35 ` [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input Eric Blake
@ 2017-12-23 9:58 ` Miika S
0 siblings, 0 replies; 6+ messages in thread
From: Miika S @ 2017-12-23 9:58 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel
Thank you for pointing out these errors. I've sent a new set
of patches with the errors addressed, but later noticed that
the new revision should have been titled [PATCH v2]. So to
anybody reading this thread, it has been replaced with a new
one.
On Thu, Dec 21, 2017 at 12:35 AM, Eric Blake <eblake@redhat.com> wrote:
> On 12/18/2017 07:24 AM, Miika S wrote:
>>
>> Signed-off-by: Miika S <miika9764@gmail.com>
>> ---
>> hw/input/virtio-input-hid.c | 7 +++++++
>> qapi/ui.json | 2 +-
>> ui/keycodemapdb | 2 +-
>> 3 files changed, 9 insertions(+), 2 deletions(-)
>
>
> When sending a multi-patch series, please remember to include the 0/3 cover
> letter. 'git config format.coverletter auto' can make this task easier to
> remember.
>
>
>> static const unsigned int keymap_button[INPUT_BUTTON__MAX] = {
>> diff --git a/qapi/ui.json b/qapi/ui.json
>> index 07b468f625..da4be505ac 100644
>> --- a/qapi/ui.json
>> +++ b/qapi/ui.json
>> @@ -775,7 +775,7 @@
>> 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop',
>> 'again',
>> 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find',
>> 'cut',
>> 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
>> - 'ro', 'hiragana', 'henkan', 'yen',
>> + 'ro', 'hiragana', 'muhenkan', 'henkan', 'katakanahiragana',
>> 'yen',
>> 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
>> 'audionext', 'audioprev', 'audiostop', 'audioplay',
>> 'audiomute',
>> 'volumeup', 'volumedown', 'mediaselect',
>
>
> Missing documentation that calls out which enum values were added in 2.12.
>
>> diff --git a/ui/keycodemapdb b/ui/keycodemapdb
>> index 10739aa260..05dad417e9 160000
>> --- a/ui/keycodemapdb
>> +++ b/ui/keycodemapdb
>> @@ -1 +1 @@
>> -Subproject commit 10739aa26051a5d49d88132604539d3ed085e72e
>> +Subproject commit 05dad417e9d0b37ee1fba33056d91a6b734b3357
>
>
> Generally, the commit message body should call out that a submodule change
> alongside other changes is intentional.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 3/3] input: virtio: don't send mouse wheel event twice
2017-12-22 15:25 [Qemu-devel] [PATCH 0/3] input: add keys and mouse buttons " Miika S
@ 2017-12-22 15:25 ` Miika S
0 siblings, 0 replies; 6+ messages in thread
From: Miika S @ 2017-12-22 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: kraxel, berrange, Miika S
On Linux, a mouse event is generated for both down and up when mouse
wheel is used. This caused virtio_input_send() to be called twice each
time the wheel was used.
This commit adds a check for the button down state and only calls
virtio_input_send() when it is true.
Signed-off-by: Miika S <miika9764@gmail.com>
---
hw/input/virtio-input-hid.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index 2cac659469..587616a932 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -225,8 +225,10 @@ static void virtio_input_handle_event(DeviceState *dev, QemuConsole *src,
break;
case INPUT_EVENT_KIND_BTN:
btn = evt->u.btn.data;
- if (vhid->wheel_axis && (btn->button == INPUT_BUTTON_WHEEL_UP ||
- btn->button == INPUT_BUTTON_WHEEL_DOWN)) {
+ if (vhid->wheel_axis &&
+ (btn->button == INPUT_BUTTON_WHEEL_UP ||
+ btn->button == INPUT_BUTTON_WHEEL_DOWN) &&
+ btn->down) {
event.type = cpu_to_le16(EV_REL);
event.code = cpu_to_le16(REL_WHEEL);
event.value = cpu_to_le32(btn->button == INPUT_BUTTON_WHEEL_UP
--
2.15.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-12-23 9:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18 13:24 [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input Miika S
2017-12-18 13:24 ` [Qemu-devel] [PATCH 2/3] input: add mouse side buttons " Miika S
2017-12-18 13:24 ` [Qemu-devel] [PATCH 3/3] input: virtio: don't send mouse wheel event twice Miika S
2017-12-20 22:35 ` [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input Eric Blake
2017-12-23 9:58 ` Miika S
2017-12-22 15:25 [Qemu-devel] [PATCH 0/3] input: add keys and mouse buttons " Miika S
2017-12-22 15:25 ` [Qemu-devel] [PATCH 3/3] input: virtio: don't send mouse wheel event twice Miika S
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.