hw/input/hid: Add support for several keys.
PATCH 1/1 hw/input/hid: Add support for several keys.
Add support for these keys: audiomute volumedown volumeup power. Tested with "sendkey" command in monitor and verify the behavior in guest OS.
--- hw/input/hid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
hw/input/hid.c +4 -4
@@ -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,
Signature · 1 line
2.15.1.424.g9478a66081-goog
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.
Quoted 35 lines · 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 <[email protected]>--- hw/input/hid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)hw/input/hid.c +4
-5@@ -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
Ping?
Quoted 47 lines · On Thu, Dec 14, 2017 at 1:25 PM, Tao Wu(吴涛@Eng) <[email protected]> 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.
Quoted 35 lines · 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 <[email protected]>--- hw/input/hid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)hw/input/hid.c +4
-5@@ -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
Le 02/01/2018 à 10:03, Tao Wu(吴涛@Eng) a écrit :
Quoted 1 line
Ping?
Your patch has been Merged by michael with his pull request of 17/12/2017.
Thanks,
Laurent
Quoted 48 lines · On Thu, Dec 14, 2017 at 1:25 PM, Tao Wu(吴涛@Eng) <[email protected]> wrote:
Quoted 47 lines
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.
Quoted 35 lines · 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 <[email protected]>--- hw/input/hid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)hw/input/hid.c +4
-5@@ -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