[ros-dev] Strange code into ToUnicodeEx().

James Tabor jimtabor at adsl-64-217-116-74.dsl.hstntx.swbell.net
Sat Jul 21 08:07:44 CEST 2007


carlo.bramix wrote:
> Hello,
> I debugged a bit on ReactOS because I wanted to understand why  my (newer upcoming) version of ReactOS Calc doesn't work when you press some keys on the keyboard.
> The cause of the problem is this piece of code:
> 
> int STDCALL ToUnicodeEx( UINT wVirtKey,
>                          UINT wScanCode,
>                          PBYTE lpKeyState,
>                          LPWSTR pwszBuff,
>                          int cchBuff,
>                          UINT wFlags,
>                          HKL dwhkl )
> {
>    int ToUnicodeResult = 0;
> 
>    if (0 == (lpKeyState[wVirtKey] & KS_DOWN_BIT))
>    {
>       ToUnicodeResult = 0;
>    }
>    else
>    {
> ......
> 
> In other words, a key can be translated only if it's pressed and not during the release stage.
> Is there a reason for this choice?
> 
> Sincerely,
> 
> Carlo Bramini
> 
Oh!!!! Yuck! it's a wine thing'y!

dlls/winex11.drv/keyboard.c:2365: *           ToUnicodeEx (X11DRV.@)
dlls/winex11.drv/keyboard.c:2382:INT X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, LPBYTE lpKeyState,

dlls/user32/input.c:631:INT WINAPI ToUnicodeEx(UINT virtKey, UINT scanCode, LPBYTE lpKeyState


Maybe we need to update our code tree?
James


More information about the Ros-dev mailing list