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.
This commit is contained in:
Ove Kaaven 2000-12-27 03:45:51 +00:00 committed by Alexandre Julliard
parent e3178f9fbc
commit 5079844bc6
1 changed files with 3 additions and 3 deletions

View File

@ -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')))