aboutsummaryrefslogtreecommitdiff
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2018-01-17 16:47:17 +0000
committerGerd Hoffmann <kraxel@redhat.com>2018-01-25 15:02:00 +0100
commit08774f66cb9ae686d61c221574505043215db90e (patch)
tree28707e6ce2e66f1e53688df17548cfc78916e855 /ui/gtk.c
parent8026a81aa41a7fa1f70ddd9f060b6c683377704f (diff)
downloadqemu-08774f66cb9ae686d61c221574505043215db90e.zip
qemu-08774f66cb9ae686d61c221574505043215db90e.tar.gz
qemu-08774f66cb9ae686d61c221574505043215db90e.tar.bz2
ui: ignore hardware keycode 255 on win32
It is a reserved value and doesn't have a corresponding valid scancode. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20180117164717.15855-5-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 188c40e..f0ad63e 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1206,6 +1206,12 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
return TRUE;
}
+#ifdef WIN32
+ /* on windows, we ought to ignore the reserved key event? */
+ if (key->hardware_keycode == 0xff)
+ return false;
+#endif
+
if (key->keyval == GDK_KEY_Pause
#ifdef G_OS_WIN32
/* for some reason GDK does not fill keyval for VK_PAUSE