kernel32: Don't ignore extended keys.

This commit is contained in:
Dmitry Timoshkov 2008-10-27 19:14:28 +08:00 committed by Alexandre Julliard
parent b8b0b7fa41
commit 67be353040
2 changed files with 3 additions and 4 deletions

View File

@ -1377,8 +1377,7 @@ BOOL WINAPI ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer,
{
if (read_console_input(hConsoleInput, &ir, timeout) != rci_gotone) break;
if (ir.EventType == KEY_EVENT && ir.Event.KeyEvent.bKeyDown &&
ir.Event.KeyEvent.uChar.UnicodeChar &&
!(ir.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY))
ir.Event.KeyEvent.uChar.UnicodeChar)
{
xbuf[charsread++] = ir.Event.KeyEvent.uChar.UnicodeChar;
timeout = 0;

View File

@ -818,7 +818,7 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn)
/* EPP WCEL_Dump(&ctx, "before func"); */
ofs = ctx.ofs;
/* mask out some bits which don't interest us */
ks = ir.Event.KeyEvent.dwControlKeyState & ~(NUMLOCK_ON|SCROLLLOCK_ON|CAPSLOCK_ON);
ks = ir.Event.KeyEvent.dwControlKeyState & ~(NUMLOCK_ON|SCROLLLOCK_ON|CAPSLOCK_ON|ENHANCED_KEY);
func = NULL;
for (km = (use_emacs) ? EmacsKeyMap : Win32KeyMap; km->entries != NULL; km++)
@ -845,7 +845,7 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn)
if (func)
(func)(&ctx);
else if (!(ir.Event.KeyEvent.dwControlKeyState & (ENHANCED_KEY|LEFT_ALT_PRESSED)))
else if (!(ir.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED))
WCEL_InsertChar(&ctx, ir.Event.KeyEvent.uChar.UnicodeChar);
else TRACE("Dropped event\n");