diff mbox

[PULL,2/2] gtk: add support for the Pause key

Message ID 1413369615-18600-3-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Oct. 15, 2014, 10:40 a.m. UTC
From: Martin Decky <martin@decky.cz>

Special handing of the Pause key. Implemented in a similar way as in
ui/sdl.c.

Signed-off-by: Martin Decky <martin@decky.cz>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/ui/gtk.c b/ui/gtk.c
index cdd2567..8e055da 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -931,6 +931,12 @@  static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
     int qemu_keycode;
     int i;
 
+    if (key->keyval == GDK_KEY_Pause) {
+        qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KEY_CODE_PAUSE,
+                                        key->type == GDK_KEY_PRESS);
+        return TRUE;
+    }
+
     qemu_keycode = gd_map_keycode(s, gtk_widget_get_display(widget),
                                   gdk_keycode);