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>
This commit is contained in:
Martin Decky 2014-09-16 16:04:40 +02:00 committed by Gerd Hoffmann
parent 84961407a5
commit 5c960521b8
1 changed files with 6 additions and 0 deletions

View File

@ -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);