From 08774f66cb9ae686d61c221574505043215db90e Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 17 Jan 2018 16:47:17 +0000 Subject: [PATCH] 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 Message-id: 20180117164717.15855-5-berrange@redhat.com Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 188c40eef5..f0ad63e431 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