qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 12/42] input: keyboard: switch qmp_send_key() to new


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 12/42] input: keyboard: switch qmp_send_key() to new core.
Date: Mon, 16 Dec 2013 11:48:48 +0100

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 ui/input-legacy.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/ui/input-legacy.c b/ui/input-legacy.c
index 80f4f5c..a4006cc 100644
--- a/ui/input-legacy.c
+++ b/ui/input-legacy.c
@@ -260,10 +260,8 @@ static void free_keycodes(void)
 static void release_keys(void *opaque)
 {
     while (keycodes_size > 0) {
-        if (keycodes[--keycodes_size] & SCANCODE_GREY) {
-            kbd_put_keycode(SCANCODE_EMUL0);
-        }
-        kbd_put_keycode(keycodes[keycodes_size] | SCANCODE_UP);
+        qemu_input_event_send_key_number(NULL, keycodes[--keycodes_size],
+                                         false);
     }
 
     free_keycodes();
@@ -297,10 +295,7 @@ void qmp_send_key(KeyValueList *keys, bool has_hold_time, 
int64_t hold_time,
             return;
         }
 
-        if (keycode & SCANCODE_GREY) {
-            kbd_put_keycode(SCANCODE_EMUL0);
-        }
-        kbd_put_keycode(keycode & SCANCODE_KEYCODEMASK);
+        qemu_input_event_send_key_number(NULL, keycode, true);
 
         keycodes = g_realloc(keycodes, sizeof(int) * (keycodes_size + 1));
         keycodes[keycodes_size++] = keycode;
-- 
1.8.3.1




reply via email to

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