forked from enlightenment/efl
Ecore_Win32 : Fix the key release values for non keystroke keys (Windows XP)
SVN revision: 65695
This commit is contained in:
parent
f57db57c25
commit
42f0263f49
|
@ -355,3 +355,4 @@
|
||||||
|
|
||||||
* Discard left Ctrl when AltGr is pressed (Windows XP)
|
* Discard left Ctrl when AltGr is pressed (Windows XP)
|
||||||
* Fix the string value for the Delete key (Windows XP)
|
* Fix the string value for the Delete key (Windows XP)
|
||||||
|
* Fix the key release values for non keystroke keys (Windows XP)
|
||||||
|
|
|
@ -132,7 +132,7 @@ _ecore_win32_window_procedure(HWND window,
|
||||||
* we check if the next message
|
* we check if the next message
|
||||||
* - is a WM_KEYUP or WM_SYSKEYUP
|
* - is a WM_KEYUP or WM_SYSKEYUP
|
||||||
* - has the same timestamp than the Ctrl one
|
* - has the same timestamp than the Ctrl one
|
||||||
* - is the key press of the right Alt key
|
* - is the key release of the right Alt key
|
||||||
*/
|
*/
|
||||||
res = PeekMessage(&next_msg, data->window,
|
res = PeekMessage(&next_msg, data->window,
|
||||||
WM_KEYUP, WM_SYSKEYUP,
|
WM_KEYUP, WM_SYSKEYUP,
|
||||||
|
|
|
@ -650,6 +650,7 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
|
||||||
char **keycompose,
|
char **keycompose,
|
||||||
unsigned int *modifiers)
|
unsigned int *modifiers)
|
||||||
{
|
{
|
||||||
|
WCHAR buf[3];
|
||||||
char delete_string[2] = { 0x7f, 0 };
|
char delete_string[2] = { 0x7f, 0 };
|
||||||
char *kn = NULL;
|
char *kn = NULL;
|
||||||
char *ks = NULL;
|
char *ks = NULL;
|
||||||
|
@ -1115,8 +1116,32 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
|
||||||
kc = "";
|
kc = "";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* other non keystroke characters */
|
{
|
||||||
return 0;
|
/* other non keystroke characters */
|
||||||
|
BYTE kbd_state[256];
|
||||||
|
int res;
|
||||||
|
|
||||||
|
if (is_down)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!GetKeyboardState(kbd_state))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
res = ToUnicode(msg->window_param,
|
||||||
|
MapVirtualKey(msg->window_param, 2),
|
||||||
|
kbd_state, buf, 3, 0);
|
||||||
|
if (res == 1)
|
||||||
|
{
|
||||||
|
/* FIXME: might be troublesome for non european languages */
|
||||||
|
/* in that case, UNICODE should be used, I guess */
|
||||||
|
buf[1] = '\0';
|
||||||
|
kn = (char *)buf;
|
||||||
|
ks = (char *)buf;
|
||||||
|
kc = (char *)buf;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*keyname = strdup(kn);
|
*keyname = strdup(kn);
|
||||||
|
|
Loading…
Reference in New Issue