Commit 5079844b authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Use the X state instead of the VK key state to check for eatable

characters, since the VK key state isn't a fan of AltGr.
parent e3178f9f
......@@ -1535,8 +1535,8 @@ INT X11DRV_ToUnicode(UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
else { /* ret != 0 */
/* We have a special case to handle : Shift + arrow, shift + home, ...
X returns a char for it, but Windows doesn't. Let's eat it. */
if (!(lpKeyState[VK_NUMLOCK] & 0x01) /* NumLock is off */
&& (lpKeyState[VK_SHIFT] & 0x80) /* Shift is pressed */
if (!(e.state & NumLockMask) /* NumLock is off */
&& (e.state & ShiftMask) /* Shift is pressed */
&& (keysym>=XK_KP_0) && (keysym<=XK_KP_9))
{
*(char*)lpChar = 0;
......@@ -1545,7 +1545,7 @@ INT X11DRV_ToUnicode(UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
/* more areas where X returns characters but Windows does not
CTRL + number or CTRL + symbol*/
if (lpKeyState[VK_CONTROL] & 0x80)
if (e.state & ControlMask)
{
if (((keysym>=33) && (keysym < 'A')) ||
((keysym > 'Z') && (keysym < 'a')))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment