sergeir
Wed Feb 09 02:47:06 CST 2005
Hello Steve,
thank you for the code samples you have gladly provided to
us. I hope this should solve the problem nwe are having.
>-----Original Message-----
>Does your problem only occur over RDP and not locally?
No, we cannot even test it locally on CE device, since
there is no Russian locale for CE 4.2. I mean we can't
find where to buy it.
So the tests are done over RDP, that's why I have asked
what's about RDP is specific.
I have made a posting earlier describing in details the
problem in CE 4.2 we are having with Russian locale in RDP
session. The url is
http://www.google.ru/groups?hl=ru&lr=&threadm=70bf01c4cd3a%
24c216ae00%24a601280a%40phx.gbl&rnum=49&prev=/groups%3Fq%
3Dsergei%26hl%3Dru%26lr%3D%26group%
3Dmicrosoft.public.windowsce.platbuilder.*%26start%3D40%
26sa%3DN
Thanks a lot
Sergei
>The keyboard driver was generating different virtual keys
in a different
>order for AltGr than XP. This led to some problems with
AltGr over RDP. It
>was generating a right control after the right alt from
the AltGr key. XP
>generates a left control before the right alt. This was
fixed in CE 5.0.
>
>The fix is to change
>public\common\oak\drivers\keybd\laymgr\laymgr.cpp::SendRem
appedEvent() from
>
> if ( (uiVKey == VK_RMENU) && (g_ili.il.fLocaleFlags &
KLLF_ALTGR) ) {
> // Add in the control key for AltGr
> rgKbdEvent[cEvents].uiVk = VK_RCONTROL;
> rgKbdEvent[cEvents].uiSc = uiScanCode;
> rgKbdEvent[cEvents].KeyStateFlags = KeyStateFlags;
> ++cEvents;
> }
>
>to
>
> if ( (uiVKey == VK_RMENU) && (g_ili.il.fLocaleFlags &
KLLF_ALTGR) ) {
> // Add in the control key for AltGr
> const KEYBD_EVENT c_KbdEventLControl = {
VK_LCONTROL, uiScanCode,
>KeyStateFlags };
>
> rgKbdEvent[cEvents] = rgKbdEvent[0];
> rgKbdEvent[0] = c_KbdEventLControl;
>
> ++cEvents;
> }
>
>
>The USB keyboard driver had the same problem. For it,
change
>public\common\oak\drivers\usb\class\hid\clients\kbdhid.cpp
.
>
>// Modifier key processing.
>static
>void
>ProcessModifier(
> UINT uiVk,
> UINT uiSc,
> DWORD dwFlags,
> HIDP_KEYBOARD_DIRECTION hidpKeyEvent,
> KEY_STATE_FLAGS *pKeyStateFlags
> )
>{
> UpdateKeyState(pKeyStateFlags, (UINT8) uiVk,
hidpKeyEvent);
> KeyboardEvent(uiVk, uiSc, dwFlags);
>
> // Handle AltGr
> if ( (uiVk == VK_RMENU) && (g_dwLocaleFlags &
KLLF_ALTGR) ) {
> // Also send a Right Control
> const USAGE_TO_SCANCODE *pUsageToSc =
>FindUsageToSc(HID_USAGE_KEYBOARD_RCTRL);
> DEBUGCHK(pUsageToSc);
> GenerateKeyInfo(pUsageToSc, &uiVk, &uiSc,
&dwFlags, hidpKeyEvent);
>
> if (uiVk == VK_RCONTROL) {
> UpdateKeyState(pKeyStateFlags, (UINT8) uiVk,
hidpKeyEvent);
> KeyboardEvent(uiVk, uiSc, dwFlags);
> }
> else {
> RETAILMSG(1, (_T("Keyboard: AltGr processing
failed. Returned
>vkey 0x%02X\r\n"),
> uiVk));
> }
> }
>}
>
>
>to
>
>
>// Send an LControl keyboard event
>static
>void
>GenerateLControl(
> HIDP_KEYBOARD_DIRECTION hidpKeyEvent,
> KEY_STATE_FLAGS *pKeyStateFlags
> )
>{
> DEBUGCHK(pKeyStateFlags);
>
> const USAGE_TO_SCANCODE *pUsageToSc =
>FindUsageToSc(HID_USAGE_KEYBOARD_LCTRL);
> DEBUGCHK(pUsageToSc);
> UINT uiVk;
> UINT uiSc;
> DWORD dwFlags;
> GenerateKeyInfo(pUsageToSc, &uiVk, &uiSc, &dwFlags,
hidpKeyEvent);
>
> if (uiVk == VK_LCONTROL) {
> UpdateKeyState(pKeyStateFlags, (UINT8) uiVk,
hidpKeyEvent);
> KeyboardEvent(uiVk, uiSc, dwFlags);
> }
> else {
> RETAILMSG(1, (_T("Keyboard: AltGr processing
failed. Returned vkey
>0x%02X\r\n"),
> uiVk));
> }
>}
>
>
>// Modifier key processing.
>static
>void
>ProcessModifier(
> UINT uiVk,
> UINT uiSc,
> DWORD dwFlags,
> HIDP_KEYBOARD_DIRECTION hidpKeyEvent,
> KEY_STATE_FLAGS *pKeyStateFlags
> )
>{
> // Handle AltGr
> if ( (uiVk == VK_RMENU) && (g_dwLocaleFlags &
KLLF_ALTGR) ) {
> // Also send a Left Control
> GenerateLControl(hidpKeyEvent, pKeyStateFlags);
> }
>
> UpdateKeyState(pKeyStateFlags, (UINT8) uiVk,
hidpKeyEvent);
> KeyboardEvent(uiVk, uiSc, dwFlags);
>}
>
>--
>Steve Schrock
>Windows CE Device Drivers
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
><anonymous@discussions.microsoft.com> wrote in message
>news:1aea01c50dd5$245f55f0$a501280a@phx.gbl...
>> Sorry for stepping into,
>>
>> we have a smilar problem with Russian language. What is
so
>> special about RDP in this case ?
>>
>> Sincerely
>> Sergei
>>
>>
>>>-----Original Message-----
>>>What WM_KEYDOWN/UP and WM_CHAR messages are generated by
>> this key sequence?
>>>For < CE 5.1 you could modify the
>> public\COMMON\oak\demos\kbdmsg program to
>>>do this pretty easily. For newer releases, you can use
>>>public\COMMON\oak\drivers\keybd\test.
>>>
>>>Are you trying to use RDP?
>>>
>>>--
>>>Steve Schrock
>>>Windows CE Device Drivers
>>>
>>>This posting is provided "AS IS" with no warranties, and
>> confers no rights.
>>>
>>>"James Lee" <JamesLee@discussions.microsoft.com> wrote
in
>> message
>>>news:59874F70-1D77-4AF7-A87B-
5A2078FAA948@microsoft.com...
>>>> Use
>>>> Hungarian, Romanian, Slovenia, Czech and Polish input
>> language.
>>>>
>>>> Press AltGr+'L'. Not have the character 'L'( or 'l).
>>>> I check source codes for keyboard layout.
>>>> The unicode for 'L'( or 'l) is correct in source
codes.
>>>>
>>>> Could anyone tell me any solutions? Thanks!!
>>>>
>>>
>>>
>>>.
>>>
>
>
>.
>