]> git.proxmox.com Git - mirror_qemu.git/commitdiff
gtk: add support for the Pause key
authorMartin Decky <martin@decky.cz>
Tue, 16 Sep 2014 14:04:40 +0000 (16:04 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 15 Oct 2014 09:08:32 +0000 (11:08 +0200)
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

index cdd2567fa04d984d03cc762264e89d8fa86cc392..8e055da0dcee6fdc0205a4f16d3fccc5c5161f26 100644 (file)
--- 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);