summaryrefslogtreecommitdiff
path: root/gdk/win32
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2016-07-27 18:05:10 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2017-12-02 10:38:19 +0000
commit33442d953da28ebad653966d9f12a96700488e9e (patch)
tree75924904ce896c1dcd6bf85861ae860846298440 /gdk/win32
parente1240b42edb89da49a89b58f05bfd443ef5e1505 (diff)
downloadgtk+-33442d953da28ebad653966d9f12a96700488e9e.tar.gz
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
Diffstat (limited to 'gdk/win32')
-rw-r--r--gdk/win32/gdkkeys-win32.c7
1 files changed, 6 insertions, 1 deletions
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;