[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/44] input: keyboard: switch gtk ui to new core
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 13/44] input: keyboard: switch gtk ui to new core |
Date: |
Mon, 24 Feb 2014 12:52:20 +0100 |
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/gtk.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index a633d89..74c0936 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -59,6 +59,7 @@
#include "trace.h"
#include "ui/console.h"
+#include "ui/input.h"
#include "sysemu/sysemu.h"
#include "qmp-commands.h"
#include "x_keymap.h"
@@ -280,10 +281,7 @@ static void gtk_release_modifiers(GtkDisplayState *s)
if (!s->modifier_pressed[i]) {
continue;
}
- if (keycode & SCANCODE_GREY) {
- kbd_put_keycode(SCANCODE_EMUL0);
- }
- kbd_put_keycode(keycode | SCANCODE_UP);
+ qemu_input_event_send_key_number(s->dcl.con, keycode, false);
s->modifier_pressed[i] = false;
}
}
@@ -745,17 +743,8 @@ static gboolean gd_key_event(GtkWidget *widget,
GdkEventKey *key, void *opaque)
}
}
- if (qemu_keycode & SCANCODE_GREY) {
- kbd_put_keycode(SCANCODE_EMUL0);
- }
-
- if (key->type == GDK_KEY_PRESS) {
- kbd_put_keycode(qemu_keycode & SCANCODE_KEYCODEMASK);
- } else if (key->type == GDK_KEY_RELEASE) {
- kbd_put_keycode(qemu_keycode | SCANCODE_UP);
- } else {
- g_assert_not_reached();
- }
+ qemu_input_event_send_key_number(s->dcl.con, qemu_keycode,
+ key->type == GDK_KEY_PRESS);
return TRUE;
}
--
1.8.3.1
- [Qemu-devel] [PATCH 15/44] sdl2: switch keyboard handling to new core, (continued)
- [Qemu-devel] [PATCH 15/44] sdl2: switch keyboard handling to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 19/44] input: mouse: add helpers functions to core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 17/44] input: keyboard: switch spice ui to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 31/44] input: trace events, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 16/44] input: keyboard: switch vnc ui to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 36/44] input: move mouse mode notifier to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 28/44] input: mouse: switch monitor to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 41/44] input: move do_mouse_set to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 43/44] console: add head to index to qemu consoles., Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 03/44] sdl2: remove text console logic, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 13/44] input: keyboard: switch gtk ui to new core,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 12/44] input: keyboard: switch qmp_send_key() to new core., Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 23/44] input: mouse: switch gtk ui to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 37/44] input: add input_mouse_mode tracepoint, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 22/44] input: mouse: switch legacy handlers to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 20/44] input: mouse: add graphic_rotate support, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 44/44] console: add QemuUIInfo, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 38/44] sdl2: simplify keymap handling, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 39/44] sdl2: codestyle fixups, Gerd Hoffmann, 2014/02/24
- Re: [Qemu-devel] [PULL v2 00/44] rework input handling, sdl2 support, Peter Maydell, 2014/02/26