Skip to contentSkip to conversation

gtk: add support for the Pause key

PATCH In review Martin Decky 2 participants 3 messages Sep 16, 2014 – Sep 29, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gtk: add support for the Pause key

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

---
 ui/gtk.c | 6 ++++++
 1 file changed, 6 insertions(+)
ui/gtk.c +6 -0
index 2345d7e..e52cab1 100644
@@ -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);
 
Signature · 1 line
1.8.3.1
#1 lore raw

[Qemu-devel] Ping [PATCH] gtk: add support for the Pause key

http://patchwork.ozlabs.org/patch/390074/

It is a rather simple patch adding support for the Pause key in the GTK UI. It should not cause any regressions. Please apply. Thanks.

M.D.

Quoted 25 lines · Martin Decky

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

---
  ui/gtk.c | 6 ++++++
  1 file changed, 6 insertions(+)
ui/gtk.c +6 -0
index 2345d7e..e52cab1 100644
@@ -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);
 
#2 lore raw

Re: [Qemu-devel] Ping [PATCH] gtk: add support for the Pause key

Quoted 4 lines · Martin Decky

http://patchwork.ozlabs.org/patch/390074/

It is a rather simple patch adding support for the Pause key in the GTK UI. It should not cause any regressions. Please apply. Thanks.

Patch looks good but doesn't apply any more. Can you please rebase & resend?

thanks,
Gerd