qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/input/hid: Add support for several keys.
@ 2017-12-07  6:56 Tao Wu
  2017-12-14 21:25 ` Tao Wu(吴涛@Eng)
  0 siblings, 1 reply; 4+ messages in thread
From: Tao Wu @ 2017-12-07  6:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, kraxel, mjt, laurent, Tao Wu

Add support for these keys: audiomute volumedown volumeup power.
Tested with "sendkey" command in monitor and verify the behavior
in guest OS.

Signed-off-by: Tao Wu <lepton@google.com>
---
 hw/input/hid.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/input/hid.c b/hw/input/hid.c
index 0d049ff61c..aa4fb826fd 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -57,14 +57,14 @@ static const uint8_t hid_usage_keys[0x100] = {
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x58, 0xe4, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
+    0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00,
+    0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
     0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x4a,
     0x52, 0x4b, 0x00, 0x50, 0x00, 0x4f, 0x00, 0x4d,
     0x51, 0x4e, 0x49, 0x4c, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x66, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 
2.15.1.424.g9478a66081-goog

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/input/hid: Add support for several keys.
  2017-12-07  6:56 [Qemu-devel] [PATCH] hw/input/hid: Add support for several keys Tao Wu
@ 2017-12-14 21:25 ` Tao Wu(吴涛@Eng)
  2018-01-02  9:03   ` Tao Wu(吴涛@Eng)
  0 siblings, 1 reply; 4+ messages in thread
From: Tao Wu(吴涛@Eng) @ 2017-12-14 21:25 UTC (permalink / raw)
  To: QEMU; +Cc: qemu-trivial, kraxel, mjt, Laurent Vivier, Tao Wu

Anybody can merge this?

It's a simple change:  actually it only changed 4 bytes in hid usage
table to enable 4 keys: audiomute volumeup volumedown and power.

It's easy to verify what the patch is doing:

Boot some guest os with argument "-usbdevice keyboard"  and use qemu
monitor console to do "sendkey audiomute", without this patch, nothing
happend inside guest os. with this patch,  all these 4 keys work correctly.

On Wed, Dec 6, 2017 at 10:56 PM, Tao Wu <lepton@google.com> wrote:
> Add support for these keys: audiomute volumedown volumeup power.
> Tested with "sendkey" command in monitor and verify the behavior
> in guest OS.
>
> Signed-off-by: Tao Wu <lepton@google.com>
> ---
>  hw/input/hid.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/input/hid.c b/hw/input/hid.c
> index 0d049ff61c..aa4fb826fd 100644
> --- a/hw/input/hid.c
> +++ b/hw/input/hid.c
> @@ -57,14 +57,14 @@ static const uint8_t hid_usage_keys[0x100] = {
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x58, 0xe4, 0x00, 0x00,
> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
> +    0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00,
> +    0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
>      0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x4a,
>      0x52, 0x4b, 0x00, 0x50, 0x00, 0x4f, 0x00, 0x4d,
>      0x51, 0x4e, 0x49, 0x4c, 0x00, 0x00, 0x00, 0x00,
> -    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x66, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> --
> 2.15.1.424.g9478a66081-goog
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/input/hid: Add support for several keys.
  2017-12-14 21:25 ` Tao Wu(吴涛@Eng)
@ 2018-01-02  9:03   ` Tao Wu(吴涛@Eng)
  2018-01-02 13:35     ` Laurent Vivier
  0 siblings, 1 reply; 4+ messages in thread
From: Tao Wu(吴涛@Eng) @ 2018-01-02  9:03 UTC (permalink / raw)
  To: QEMU; +Cc: qemu-trivial, kraxel, mjt, Laurent Vivier, Tao Wu

Ping?

On Thu, Dec 14, 2017 at 1:25 PM, Tao Wu(吴涛@Eng) <lepton@google.com> wrote:
> Anybody can merge this?
>
> It's a simple change:  actually it only changed 4 bytes in hid usage
> table to enable 4 keys: audiomute volumeup volumedown and power.
>
> It's easy to verify what the patch is doing:
>
> Boot some guest os with argument "-usbdevice keyboard"  and use qemu
> monitor console to do "sendkey audiomute", without this patch, nothing
> happend inside guest os. with this patch,  all these 4 keys work correctly.
>
> On Wed, Dec 6, 2017 at 10:56 PM, Tao Wu <lepton@google.com> wrote:
>> Add support for these keys: audiomute volumedown volumeup power.
>> Tested with "sendkey" command in monitor and verify the behavior
>> in guest OS.
>>
>> Signed-off-by: Tao Wu <lepton@google.com>
>> ---
>>  hw/input/hid.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/input/hid.c b/hw/input/hid.c
>> index 0d049ff61c..aa4fb826fd 100644
>> --- a/hw/input/hid.c
>> +++ b/hw/input/hid.c
>> @@ -57,14 +57,14 @@ static const uint8_t hid_usage_keys[0x100] = {
>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>      0x00, 0x00, 0x00, 0x00, 0x58, 0xe4, 0x00, 0x00,
>> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
>> +    0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00,
>> +    0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
>>      0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x4a,
>>      0x52, 0x4b, 0x00, 0x50, 0x00, 0x4f, 0x00, 0x4d,
>>      0x51, 0x4e, 0x49, 0x4c, 0x00, 0x00, 0x00, 0x00,
>> -    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x00, 0x00,
>> +    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x66, 0x00,
>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> --
>> 2.15.1.424.g9478a66081-goog
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/input/hid: Add support for several keys.
  2018-01-02  9:03   ` Tao Wu(吴涛@Eng)
@ 2018-01-02 13:35     ` Laurent Vivier
  0 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2018-01-02 13:35 UTC (permalink / raw)
  To: Tao Wu(吴涛@Eng), QEMU; +Cc: qemu-trivial, kraxel, mjt

Le 02/01/2018 à 10:03, Tao Wu(吴涛@Eng) a écrit :
> Ping?

Your patch has been Merged by michael with his pull request of 17/12/2017.

Thanks,
Laurent

> On Thu, Dec 14, 2017 at 1:25 PM, Tao Wu(吴涛@Eng) <lepton@google.com> wrote:
>> Anybody can merge this?
>>
>> It's a simple change:  actually it only changed 4 bytes in hid usage
>> table to enable 4 keys: audiomute volumeup volumedown and power.
>>
>> It's easy to verify what the patch is doing:
>>
>> Boot some guest os with argument "-usbdevice keyboard"  and use qemu
>> monitor console to do "sendkey audiomute", without this patch, nothing
>> happend inside guest os. with this patch,  all these 4 keys work correctly.
>>
>> On Wed, Dec 6, 2017 at 10:56 PM, Tao Wu <lepton@google.com> wrote:
>>> Add support for these keys: audiomute volumedown volumeup power.
>>> Tested with "sendkey" command in monitor and verify the behavior
>>> in guest OS.
>>>
>>> Signed-off-by: Tao Wu <lepton@google.com>
>>> ---
>>>  hw/input/hid.c | 8 ++++----
>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/hw/input/hid.c b/hw/input/hid.c
>>> index 0d049ff61c..aa4fb826fd 100644
>>> --- a/hw/input/hid.c
>>> +++ b/hw/input/hid.c
>>> @@ -57,14 +57,14 @@ static const uint8_t hid_usage_keys[0x100] = {
>>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>>      0x00, 0x00, 0x00, 0x00, 0x58, 0xe4, 0x00, 0x00,
>>> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>> -    0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
>>> +    0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00,
>>> +    0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
>>>      0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x4a,
>>>      0x52, 0x4b, 0x00, 0x50, 0x00, 0x4f, 0x00, 0x4d,
>>>      0x51, 0x4e, 0x49, 0x4c, 0x00, 0x00, 0x00, 0x00,
>>> -    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x00, 0x00,
>>> +    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x66, 0x00,
>>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>> --
>>> 2.15.1.424.g9478a66081-goog
>>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-02 13:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07  6:56 [Qemu-devel] [PATCH] hw/input/hid: Add support for several keys Tao Wu
2017-12-14 21:25 ` Tao Wu(吴涛@Eng)
2018-01-02  9:03   ` Tao Wu(吴涛@Eng)
2018-01-02 13:35     ` Laurent Vivier

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).