From: Daniel Glassey (danglassey@ntlworld.com)
Date: Thu May 22 2003 - 08:52:41 EDT
commit ev_Win32Keyboard.cpp:
revert unnecessary change to _scanCodeToChars
Thanks for catching that Andrew, that bit really shouldn't have gone in.
Andrew Dunbar wrote:
> Hi there. Just some notes on the Windows keyboard work
> you've been doing.
>
> I noticed this code in ev_Win32Keyboard.cpp # 325:
>
> 325 return
> (*m_pToUnicodeEx)(nVirtKey,wScanCode,lpKeyState,pwszBuff,cchBuff,0,m_hKeyboardLayout);
> 326 return
> ToUnicodeEx(nVirtKey,wScanCode,lpKeyState,pwszBuff,cchBuff,0,m_hKeyboardLayout);
> 327 /*if (m_bIsUnicodeInput)
> 328 {
> 329 UT_ASSERT(m_pToUnicodeEx);
> 330 return
> (*m_pToUnicodeEx)(nVirtKey,wScanCode,lpKeyState,pwszBuff,cchBuff,0,m_hKeyboardLayout);
> 331 }
> 332 else
> 333 return
> ToAsciiEx(nVirtKey,wScanCode,lpKeyState,(WORD*)pwszBuff,0,m_hKeyboardLayout);
> 334 */
>
> Notice you have two return statements immediately
> following one-antother. The second one will never be
> called! I'm not sure if you should have an "if" in
> there or if you should only have one of the calls.
> I would've thought if your unicows stuff is working
> that you could get rid of my entire "m_pToUnicodeEx"
> code and just call ToUnicodeEx directly.
>
> If the unicows code is not working in this area then
> you should've committed it at all. Experimental code
> belongs in your home tree.
> The same goes with the commented-out code below it.
> If you know you've fixed it, don't comment out the old
> code, delete it. Dead code in CVS is very messy and
> hard to find once it's been there a while.
> Again if you think it doesn't work then don't commit
> it. Mailing a patch to the list is a better idea in
> this case.
>
> Please take this as constructive criticism! All i18n
> code is close to my heart (: Keep up the good work.
np, I just want to get it right too :)
Regards,
Daniel
This archive was generated by hypermail 2.1.4 : Thu May 22 2003 - 09:08:58 EDT