summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMartin Decky <martin@decky.cz>2014-09-16 16:04:40 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-10-15 11:08:32 +0200
commit5c960521b8101230bd0d0f5b879e5fd1efdb878b (patch)
treebb2bcc76b9462418a9e7d276e08b7eba00015f98 /ui
parent84961407a50bb02d34ab9cca7a21cdb4ff7c25fe (diff)
gtk: add support for the Pause key
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>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index cdd2567fa0..8e055da0dc 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);