summaryrefslogtreecommitdiff
path: root/src/lib/ecore_win32
diff options
context:
space:
mode:
authorMykyta Biliavskyi <m.biliavskyi@samsung.com>2016-12-14 15:40:49 +0200
committerMykyta Biliavskyi <m.biliavskyi@samsung.com>2016-12-14 15:50:55 +0200
commit635544104e6f5048c6884c40365e7e922eb7bc77 (patch)
tree0688e67603ee389e5b20822d385d1a872cb8a187 /src/lib/ecore_win32
parent15687ad75d5fc8835533a807b814c5a172f5c2be (diff)
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.
Diffstat (limited to 'src/lib/ecore_win32')
-rw-r--r--src/lib/ecore_win32/ecore_win32_event.c18
1 files 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 b5f0d604ed..dfd44de6f9 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,
1180 else if (res == 0) 1180 else if (res == 0)
1181 { 1181 {
1182 INF("No translatable character found, skipping"); 1182 INF("No translatable character found, skipping");
1183 return NULL; 1183 if (msg->window_param >= 0x30 && msg->window_param <= 0x39)
1184 {
1185 buf[0] = msg->window_param;
1186 }
1187 else return NULL;
1184 } 1188 }
1185 else if (res >= 2) 1189 else if (res >= 2)
1186 { 1190 {
@@ -1224,7 +1228,11 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
1224 else if (res == 0) 1228 else if (res == 0)
1225 { 1229 {
1226 INF("No translatable character found, skipping"); 1230 INF("No translatable character found, skipping");
1227 return NULL; 1231 if (msg->window_param >= 0x30 && msg->window_param <= 0x39)
1232 {
1233 buf[0] = msg->window_param;
1234 }
1235 else return NULL;
1228 } 1236 }
1229 else if (res >= 2) 1237 else if (res >= 2)
1230 { 1238 {
@@ -1291,7 +1299,11 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
1291 else if (res == 0) 1299 else if (res == 0)
1292 { 1300 {
1293 INF("No translatable character found, skipping"); 1301 INF("No translatable character found, skipping");
1294 return NULL; 1302 if (msg->window_param >= 0x30 && msg->window_param <= 0x39)
1303 {
1304 buf[0] = msg->window_param;
1305 }
1306 else return NULL;
1295 } 1307 }
1296 else if (res >= 2) 1308 else if (res >= 2)
1297 { 1309 {