nikawhite pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=635544104e6f5048c6884c40365e7e922eb7bc77
commit 635544104e6f5048c6884c40365e7e922eb7bc77 Author: Mykyta Biliavskyi <[email protected]> Date: Wed Dec 14 15:40:49 2016 +0200 Fix generate ecore key events on windows. If Ctrl+number combination pressed/unpressed function _ecore_win32_event_keystroke_get return NULL. It happens because ToUnicode WinAPI func fails to prepare unicode string for given scancode and the keyboard state. This commit add exception for the case with digits keys. In case if there no translate string, but the digit key processed - will be created a normal event as usual. --- src/lib/ecore_win32/ecore_win32_event.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_win32/ecore_win32_event.c b/src/lib/ecore_win32/ecore_win32_event.c index b5f0d60..dfd44de 100644 --- a/src/lib/ecore_win32/ecore_win32_event.c +++ b/src/lib/ecore_win32/ecore_win32_event.c @@ -1180,7 +1180,11 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg, else if (res == 0) { INF("No translatable character found, skipping"); - return NULL; + if (msg->window_param >= 0x30 && msg->window_param <= 0x39) + { + buf[0] = msg->window_param; + } + else return NULL; } else if (res >= 2) { @@ -1224,7 +1228,11 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg, else if (res == 0) { INF("No translatable character found, skipping"); - return NULL; + if (msg->window_param >= 0x30 && msg->window_param <= 0x39) + { + buf[0] = msg->window_param; + } + else return NULL; } else if (res >= 2) { @@ -1291,7 +1299,11 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg, else if (res == 0) { INF("No translatable character found, skipping"); - return NULL; + if (msg->window_param >= 0x30 && msg->window_param <= 0x39) + { + buf[0] = msg->window_param; + } + else return NULL; } else if (res >= 2) { --
