mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
Use AsciiChar to get the input from windows console window
This commit is contained in:
parent
a7ae0e8677
commit
2d8794a8b5
1 changed files with 2 additions and 16 deletions
|
@ -567,14 +567,12 @@ static void Impl_HandleKeyboardConsoleEvent(KEY_EVENT_RECORD evt, HANDLE co)
|
||||||
case VK_TAB:
|
case VK_TAB:
|
||||||
event.data1 = KEY_NULL;
|
event.data1 = KEY_NULL;
|
||||||
break;
|
break;
|
||||||
case VK_SHIFT:
|
|
||||||
event.data1 = KEY_LSHIFT;
|
|
||||||
break;
|
|
||||||
case VK_RETURN:
|
case VK_RETURN:
|
||||||
entering_con_command = false;
|
entering_con_command = false;
|
||||||
// Fall through.
|
// Fall through.
|
||||||
default:
|
default:
|
||||||
event.data1 = MapVirtualKey(evt.wVirtualKeyCode,2); // convert in to char
|
//event.data1 = MapVirtualKey(evt.wVirtualKeyCode,2); // convert in to char
|
||||||
|
event.data1 = evt.uChar.AsciiChar;
|
||||||
}
|
}
|
||||||
if (co != INVALID_HANDLE_VALUE && GetFileType(co) == FILE_TYPE_CHAR && GetConsoleMode(co, &t))
|
if (co != INVALID_HANDLE_VALUE && GetFileType(co) == FILE_TYPE_CHAR && GetConsoleMode(co, &t))
|
||||||
{
|
{
|
||||||
|
@ -593,18 +591,6 @@ static void Impl_HandleKeyboardConsoleEvent(KEY_EVENT_RECORD evt, HANDLE co)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
event.type = ev_keyup;
|
|
||||||
switch (evt.wVirtualKeyCode)
|
|
||||||
{
|
|
||||||
case VK_SHIFT:
|
|
||||||
event.data1 = KEY_LSHIFT;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (event.data1) D_PostEvent(&event);
|
if (event.data1) D_PostEvent(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue