mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 09:24:11 +00:00
Implement ToAscii() and ToAsciiEx()
svn path=/trunk/; revision=12375
This commit is contained in:
parent
430c468657
commit
27679de8f1
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: input.c,v 1.26 2004/12/11 18:43:06 sedwards Exp $
|
||||
/* $Id: input.c,v 1.27 2004/12/28 08:58:35 gvg Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/input.c
|
||||
|
@ -392,7 +392,7 @@ SwapMouseButton(
|
|||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
int STDCALL
|
||||
ToAscii(UINT uVirtKey,
|
||||
|
@ -401,13 +401,12 @@ ToAscii(UINT uVirtKey,
|
|||
LPWORD lpChar,
|
||||
UINT uFlags)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return 0;
|
||||
return ToAsciiEx(uVirtKey, uScanCode, lpKeyState, lpChar, uFlags, 0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
int STDCALL
|
||||
ToAsciiEx(UINT uVirtKey,
|
||||
|
@ -417,8 +416,14 @@ ToAsciiEx(UINT uVirtKey,
|
|||
UINT uFlags,
|
||||
HKL dwhkl)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return 0;
|
||||
WCHAR UniChars[2];
|
||||
int Ret, CharCount;
|
||||
|
||||
Ret = ToUnicodeEx(uVirtKey, uScanCode, lpKeyState, UniChars, 2, uFlags, dwhkl);
|
||||
CharCount = (Ret < 0 ? 1 : Ret);
|
||||
WideCharToMultiByte(CP_ACP, 0, UniChars, CharCount, (LPSTR) lpChar, 2, NULL, NULL);
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue