[gtk+] Handle emulated keyboard input that arrives as VK_PACKET
- From: Tor Lillqvist <tml src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Handle emulated keyboard input that arrives as VK_PACKET
- Date: Sat, 19 Feb 2011 23:42:14 +0000 (UTC)
commit 8e6932f46ef1e1369dff48ed9cccae2c8de6aa17
Author: Tor Lillqvist <tml iki fi>
Date: Sun Feb 20 01:39:13 2011 +0200
Handle emulated keyboard input that arrives as VK_PACKET
Fixes bug #642772. Thanks to the anonymous bug reporter for providing
a test program.
gdk/win32/gdkevents-win32.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 7a187c6..eaacd01 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1958,12 +1958,16 @@ gdk_event_translate (MSG *msg,
build_key_event_state (event, key_state);
- gdk_keymap_translate_keyboard_state (_gdk_win32_display_get_keymap (_gdk_display),
- event->key.hardware_keycode,
- event->key.state,
- event->key.group,
- &event->key.keyval,
- NULL, NULL, NULL);
+ if (msg->wParam == VK_PACKET &&
+ ToUnicode (VK_PACKET, HIWORD (msg->lParam), key_state, wbuf, 1, 0) == 1)
+ event->key.keyval = gdk_unicode_to_keyval (wbuf[0]);
+ else
+ gdk_keymap_translate_keyboard_state (_gdk_win32_display_get_keymap (_gdk_display),
+ event->key.hardware_keycode,
+ event->key.state,
+ event->key.group,
+ &event->key.keyval,
+ NULL, NULL, NULL);
fill_key_event_string (event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]