From 125ef3539ce692e015fd9666f3ebb48b8dda9472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Wed, 27 Jul 2016 18:05:10 +0000 Subject: [PATCH] GDK W32: Special handling for VK_PAUSE Similar to VK_DIVIDE, this key can't be mapped to a scancode by MapVirtualKeyEx(). Googling suggests that this is a known bug. https://bugzilla.gnome.org/show_bug.cgi?id=769214 --- gdk/win32/gdkkeys-win32.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdk/win32/gdkkeys-win32.c b/gdk/win32/gdkkeys-win32.c index e151a8e64e..7217403c5b 100644 --- a/gdk/win32/gdkkeys-win32.c +++ b/gdk/win32/gdkkeys-win32.c @@ -699,8 +699,13 @@ update_keymap (GdkKeymap *gdk_keymap) scancode = MapVirtualKeyEx (vk, 0, hkls[group]); keygroup = &keymap->keysym_tab[(vk * hkls_len + group) * GDK_WIN32_LEVEL_COUNT]; + /* MapVirtualKeyEx() fails to produce a scancode for VK_DIVIDE and VK_PAUSE. + * Ignore that, handle_special() will figure out a Gdk keyval for these + * without needing a scancode. + */ if (scancode == 0 && - vk != VK_DIVIDE) + vk != VK_DIVIDE && + vk != VK_PAUSE) { for (level = GDK_WIN32_LEVEL_NONE; level < GDK_WIN32_LEVEL_COUNT; level++) keygroup[level] = GDK_KEY_VoidSymbol;