From fc4070fc9d9d79c60b9f33278047e2d8081c8b18 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 27 Nov 2011 19:50:53 +0000 Subject: [PATCH] Add support for VK_OEM_102 key under wxMSW. This is the "<>|" key on German keyboard and is also used in many other layouts so failing to handle it resulted in not receiving EVT_KEY_XXX events for these keys in wxWidgets programs. Closes #13558. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/missing.h | 1 + src/msw/window.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/wx/msw/missing.h b/include/wx/msw/missing.h index cfbeea2be6..ded2d2b101 100644 --- a/include/wx/msw/missing.h +++ b/include/wx/msw/missing.h @@ -94,6 +94,7 @@ #define VK_OEM_5 0xDC #define VK_OEM_6 0xDD #define VK_OEM_7 0xDE + #define VK_OEM_102 0xE2 #endif #ifndef VK_OEM_COMMA diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 9773f02c84..f3b78bc62e 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3153,6 +3153,7 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, case VK_OEM_5: case VK_OEM_6: case VK_OEM_7: + case VK_OEM_102: case VK_OEM_PLUS: case VK_OEM_COMMA: case VK_OEM_MINUS: @@ -6238,6 +6239,7 @@ int VKToWX(WXWORD vk, WXLPARAM lParam, wchar_t *uc) case VK_OEM_5: case VK_OEM_6: case VK_OEM_7: + case VK_OEM_102: // MapVirtualKey() returns 0 if it fails to convert the virtual // key which nicely corresponds to our WXK_NONE. wxk = ::MapVirtualKey(vk, MAPVK_VK_TO_CHAR); -- 2.45.2