[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 08/15] input: keyboard: switch gtk ui to new cor
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [RFC PATCH 08/15] input: keyboard: switch gtk ui to new core |
Date: |
Thu, 28 Nov 2013 15:30:03 +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 b5f4f0b..3a97b36 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -54,6 +54,7 @@
#include <math.h>
#include "ui/console.h"
+#include "ui/input.h"
#include "sysemu/sysemu.h"
#include "qmp-commands.h"
#include "x_keymap.h"
@@ -283,10 +284,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(s->dcl.con, keycode, false);
s->modifier_pressed[i] = false;
}
}
@@ -742,17 +740,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(s->dcl.con, qemu_keycode,
+ key->type == GDK_KEY_PRESS);
return TRUE;
}
--
1.8.3.1
- [Qemu-devel] [RFC PATCH 02/15] input: rename file to legacy, (continued)
- [Qemu-devel] [RFC PATCH 02/15] input: rename file to legacy, Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 01/15] console: export QemuConsole index, width, height, Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 05/15] input: keyboard: add helper functions to core, Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 06/15] input: keyboard: switch legacy handlers to new core, Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 07/15] input: keyboard: switch qmp_send_key() to new core., Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 15/15] input: mouse: switch sdl ui to new core, Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 10/15] input: mouse: add helpers functions to core, Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 09/15] input: keyboard: switch sdl ui to new core [wip], Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 12/15] input: mouse: add qemu_input_is_absolute(), Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 14/15] input: mouse: switch gtk ui to new core, Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 08/15] input: keyboard: switch gtk ui to new core,
Gerd Hoffmann <=
- [Qemu-devel] [RFC PATCH 04/15] input: add core bits of the new input layer, Gerd Hoffmann, 2013/11/28
- [Qemu-devel] [RFC PATCH 11/15] input: mouse: add graphic_rotate support, Gerd Hoffmann, 2013/11/28