qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 4/5] adb.c: prevent NO_KEY value from going to gu


From: Programmingkid
Subject: [Qemu-devel] [PATCH v3 4/5] adb.c: prevent NO_KEY value from going to guest
Date: Thu, 5 May 2016 22:38:22 -0400

The NO_KEY value should not be sent to the guest. This patch drops that value.

Signed-off-by: John Arbuckle <address@hidden>
---
 hw/input/adb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/input/adb.c b/hw/input/adb.c
index 6d4f4dc..37728b3 100644
--- a/hw/input/adb.c
+++ b/hw/input/adb.c
@@ -424,6 +424,9 @@ static void adb_keyboard_event(DeviceState *dev, 
QemuConsole *src,
         return;
     }
     keycode = qcode_to_adb_keycode[qcode];
+    if (keycode == NO_KEY) {  /* We don't want to send this to the guest */
+        return;
+    }
 
     if (evt->u.key.data->down == false) { /* if key release event */
         keycode = keycode | 0x80;   /* create keyboard break code */
-- 
2.7.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]