Skip to content
Snippets Groups Projects
Commit 824a7f12 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard
Browse files

Fix some bad behavior when some lock states (capslock, numlock...)

were turned on.
parent dce7e5cf
No related branches found
No related tags found
No related merge requests found
......@@ -632,6 +632,7 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn, int use_emacs)
KeyEntry* ke;
unsigned ofs;
void (*func)(struct WCEL_Context* ctx);
DWORD ks;
memset(&ctx, 0, sizeof(ctx));
ctx.hConIn = hConsoleIn;
......@@ -659,11 +660,13 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn, int use_emacs)
/* 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);
func = NULL;
for (km = (use_emacs) ? EmacsKeyMap : Win32KeyMap; km->entries != NULL; km++)
{
if (km->keyState != ir.Event.KeyEvent.dwControlKeyState)
if (km->keyState != ks)
continue;
if (km->chkChar)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment