Don't return characters is key is up

svn path=/trunk/; revision=12853
This commit is contained in:
Gé van Geldorp 2005-01-06 15:57:38 +00:00
parent e228aadfe5
commit 528b35b1df
2 changed files with 20 additions and 15 deletions

View file

@ -1,5 +1,4 @@
/* $Id$ /*
*
* reactos/subsys/csrss/win32csr/conio.c * reactos/subsys/csrss/win32csr/conio.c
* *
* Console I/O functions * Console I/O functions
@ -1127,7 +1126,7 @@ ConioProcessChar(PCSRSS_CONSOLE Console,
if (0 == (Console->Mode & ENABLE_LINE_INPUT) if (0 == (Console->Mode & ENABLE_LINE_INPUT)
|| Console->EarlyReturn || Console->EarlyReturn
|| ('\n' == KeyEventRecord->InputEvent.Event.KeyEvent.uChar.AsciiChar || ('\n' == KeyEventRecord->InputEvent.Event.KeyEvent.uChar.AsciiChar
&& ! KeyEventRecord->InputEvent.Event.KeyEvent.bKeyDown)) && KeyEventRecord->InputEvent.Event.KeyEvent.bKeyDown))
{ {
if ('\n' == KeyEventRecord->InputEvent.Event.KeyEvent.uChar.AsciiChar) if ('\n' == KeyEventRecord->InputEvent.Event.KeyEvent.uChar.AsciiChar)
{ {

View file

@ -16,8 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id$ /*
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* PURPOSE: Messages * PURPOSE: Messages
@ -342,6 +341,12 @@ int STDCALL ToUnicodeEx( UINT wVirtKey,
HKL dwhkl ) { HKL dwhkl ) {
int ToUnicodeResult = 0; int ToUnicodeResult = 0;
if (0 == (lpKeyState[wVirtKey] & KS_DOWN_BIT))
{
ToUnicodeResult = 0;
}
else
{
IntLockQueueState; IntLockQueueState;
ToUnicodeResult = ToUnicodeInner( wVirtKey, ToUnicodeResult = ToUnicodeInner( wVirtKey,
wScanCode, wScanCode,
@ -352,6 +357,7 @@ int STDCALL ToUnicodeEx( UINT wVirtKey,
PsGetWin32Thread() ? PsGetWin32Thread() ?
PsGetWin32Thread()->KeyboardLayout : 0 ); PsGetWin32Thread()->KeyboardLayout : 0 );
IntUnLockQueueState; IntUnLockQueueState;
}
return ToUnicodeResult; return ToUnicodeResult;
} }