Skip to contentSkip to conversation

adb.c: prevent NO_KEY value from going to guest

PATCH Superseded Programmingkid 1 participant 1 message May 6, 2016

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 4/5 adb.c: prevent NO_KEY value from going to guest

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

---
 hw/input/adb.c | 3 +++
 1 file changed, 3 insertions(+)
hw/input/adb.c +3 -0
index 6d4f4dc..37728b3 100644
@@ -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 */
Signature · 1 line
2.7.2