Commit 67be3530 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

kernel32: Don't ignore extended keys.

parent b8b0b7fa
...@@ -1377,8 +1377,7 @@ BOOL WINAPI ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer, ...@@ -1377,8 +1377,7 @@ BOOL WINAPI ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer,
{ {
if (read_console_input(hConsoleInput, &ir, timeout) != rci_gotone) break; if (read_console_input(hConsoleInput, &ir, timeout) != rci_gotone) break;
if (ir.EventType == KEY_EVENT && ir.Event.KeyEvent.bKeyDown && if (ir.EventType == KEY_EVENT && ir.Event.KeyEvent.bKeyDown &&
ir.Event.KeyEvent.uChar.UnicodeChar && ir.Event.KeyEvent.uChar.UnicodeChar)
!(ir.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY))
{ {
xbuf[charsread++] = ir.Event.KeyEvent.uChar.UnicodeChar; xbuf[charsread++] = ir.Event.KeyEvent.uChar.UnicodeChar;
timeout = 0; timeout = 0;
......
...@@ -818,7 +818,7 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn) ...@@ -818,7 +818,7 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn)
/* EPP WCEL_Dump(&ctx, "before func"); */ /* EPP WCEL_Dump(&ctx, "before func"); */
ofs = ctx.ofs; ofs = ctx.ofs;
/* mask out some bits which don't interest us */ /* 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; func = NULL;
for (km = (use_emacs) ? EmacsKeyMap : Win32KeyMap; km->entries != NULL; km++) for (km = (use_emacs) ? EmacsKeyMap : Win32KeyMap; km->entries != NULL; km++)
...@@ -845,7 +845,7 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn) ...@@ -845,7 +845,7 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn)
if (func) if (func)
(func)(&ctx); (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); WCEL_InsertChar(&ctx, ir.Event.KeyEvent.uChar.UnicodeChar);
else TRACE("Dropped event\n"); else TRACE("Dropped event\n");
......
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