Author: hbelusca
Date: Thu Apr 17 00:46:43 2014
New Revision: 62763
URL:
http://svn.reactos.org/svn/reactos?rev=62763&view=rev
Log:
[CONSRV]
Code "symmetrization" (see the upper helper function).
Modified:
trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c
Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1] Thu Apr 17
00:46:43 2014
@@ -51,6 +51,19 @@
ConsoleInputUnicodeCharToAnsiChar(Console,
&InputEvent->Event.KeyEvent.uChar.AsciiChar,
&UnicodeChar);
+ }
+}
+
+static VOID FASTCALL
+ConioInputEventToUnicode(PCONSOLE Console, PINPUT_RECORD InputEvent)
+{
+ if (InputEvent->EventType == KEY_EVENT)
+ {
+ CHAR AsciiChar = InputEvent->Event.KeyEvent.uChar.AsciiChar;
+ InputEvent->Event.KeyEvent.uChar.AsciiChar = 0;
+ ConsoleInputAnsiCharToUnicodeChar(Console,
+
&InputEvent->Event.KeyEvent.uChar.UnicodeChar,
+ &AsciiChar);
}
}
@@ -465,12 +478,9 @@
for (i = (NumEventsWritten ? *NumEventsWritten : 0); i < NumEventsToWrite
&& NT_SUCCESS(Status); ++i)
{
- if (InputRecord->EventType == KEY_EVENT && !Unicode)
- {
- CHAR AsciiChar = InputRecord->Event.KeyEvent.uChar.AsciiChar;
- ConsoleInputAnsiCharToUnicodeChar(Console,
-
&InputRecord->Event.KeyEvent.uChar.UnicodeChar,
- &AsciiChar);
+ if (!Unicode)
+ {
+ ConioInputEventToUnicode(Console, InputRecord);
}
Status = ConioAddInputEvent(Console, InputRecord++, AppendToEnd);