Hi all,
iMX51 + WEC700.
I added to the image the files needed to add the italian keyboard. I cloned into the platform directory the 00000409 public directories/files to generate the 00000410 directories and the kbdit.dll driver. I also added some registry keys.
When i run the image i see the langages indicator ( EN and IT ) in the tray area but i receive the messages:
PID:00400002 TID:04A8004E ERROR: c:\wince700\public\common\oak\drivers\keybd\laymgr\laymgr.cpp line 4341:
PID:00400002 TID:04A8004E Keyboard: 'KPPLayout' did not call KeybdMDDRegisterGUID() in its entry function, all events will be associated with the default keyboard.
PID:00400002 TID:04A8004E IT PS2_AT_00000410
PID:00400002 TID:04A8004E ERROR: c:\wince700\public\common\oak\drivers\keybd\laymgr\laymgr.cpp line 4381:
PID:00400002 TID:04A8004E Keyboard: Error selecting device layout for PDD KPPLayout
PID:00400002 TID:04A8004E KeybdDriverInitializeEx: Layout Manager successfully initialized to 1
If i run my app and retrieve some kbd informations i see:
PID:06C201FE TID:06C301FE Keyboard type=4 subtype=0 Fn=12
PID:06C201FE TID:06C301FE Keyboard name = '00000410'
PID:06C201FE TID:06C301FE Keyboard layout 0x410
PID:06C201FE TID:06C301FE 2 keyboards in list
PID:06C201FE TID:06C301FE 0 - '00000410'
PID:06C201FE TID:06C301FE 1 - '00000409'
When I press a key on the keyboard i see the messages:
PID:00400002 TID:04FC004A ERROR: c:\wince700\public\common\oak\drivers\keybd\laymgr\laymgr.cpp line 1875:
PID:00400002 TID:04FC004A MapVirtualKey: No device layout installed
PID:06C201FE TID:06C301FE WM_KEYDOWN VK=0x0 scancode=0x5B
PID:00400002 TID:04FC004A ERROR: c:\wince700\public\common\oak\drivers\keybd\laymgr\laymgr.cpp line 1875:
PID:00400002 TID:04FC004A MapVirtualKey: No device layout installed
Any idea?
It seems you didn't installed the keybd pdd driver correctly. Would you please refer to the MSDN document about the "Developing a Device Driver"->"Windows CE Drivers"->"Keyboard Drivers".
The driver was good: what I ignored was that the translation table was included in the KPP driver and not in the keybit driver that i modified.
Digging in the source codes i see that the kbdmouse is compiled from the KEYBD/KBUS project that link a number of libs:
$(_PLATCOMMONLIB)\$(_CPUINDPATH)\Keypad_$(_SOCDIR).lib \
$(_PLATCOMMONLIB)\$(_CPUINDPATH)\PddList_$(_COMMONSOCDIR).lib \
$(_PLATLIB)\$(_CPUINDPATH)\BSPKeypad.lib \
$(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\InputLang_0409.lib \
$(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\LayoutManager.lib \
$(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\KeybdIst.lib
It includes BSPKeypad.lib to handle an (optional) 4x4 keypad, standard libs for keyboard AND InputLang_0409.lib!
Is this the cause of the errors and the impossibility to switch to 0410 language?
I also cloned the directory src/drivers/KEYBD/KBDUS to KBDIT and it generates kbdmouseit.dll.
I modified the relative registry items.
The drivers seems to be good, during the boot is handled the 0410 code but when i press key of a usb keyboard i obtain the scancode to vk translation of the US kbd!
PID:00400002 TID:059D004A +BSPKppRegInit:
PID:00400002 TID:059D004A -BSPKppRegInit:
PID:00400002 TID:059D004A KeybdDriverInitializeEx: QQ 0 n=1 [D46A7600]
PID:00400002 TID:059D004A ERROR: c:\wince700\public\common\oak\drivers\keybd\laymgr\laymgr.cpp line 4400:
PID:00400002 TID:059D004A Keyboard: 'KPPLayout' did not call KeybdMDDRegisterGUID() in its entry function, all events will be associated with the default keyboard.
PID:00400002 TID:059D004A KeybdDriverInitializeEx: Initialized PDD curr=0 - 'KPPLayout' (Mask 8)
PID:00400002 TID:059D004A KeybdDriverInitializeEx: Found default input method '00000410'
PID:00400002 TID:059D004A IL_00000410
PID:00400002 TID:059D004A KeybdDriverInitializeEx: Loop 0 su 1
PID:00400002 TID:059D004A SetDeviceLayout: uiPdd=0 hkl=0x410
PID:00400002 TID:059D004A SetDeviceLayout: ProcName=''
PID:00400002 TID:059D004A SelectDeviceLayout: 'KPPLayout' - 'Layout Text' 'KPPLayout' - 'Layout File'
PID:00400002 TID:059D004A DeviceLayoutMatchesPDD: 10 'KPPLayout_00000410'
PID:00400002 TID:059D004A DeviceLayoutMatchesPDD: 2 pszCurrProcName='KPPLayout_00000410'
PID:00400002 TID:059D004A DeviceLayoutMatchesPDD: 2 pszCurrProcName='KPPLayout'
PID:00400002 TID:059D004A KPPLayout: ret=1 dlKPPEngUs=14
PID:00400002 TID:059D004A DeviceLayoutMatchesPDD: 4 fDevLayoutRetVal=1
PID:00400002 TID:059D004A SelectDeviceLayout: match 1
PID:00400002 TID:059D004A SetDeviceLayout: ProcName='KPPLayout'
PID:00400002 TID:059D004A KPPLayout: ret=1 dlKPPEngUs=14
PID:00400002 TID:059D004A KeybdDriverInitializeEx: End Loop 0 su 1
PID:00400002 TID:059D004A KeybdDriverInitializeEx: Layout Manager successfully initialized to 1
..
PID:07E202EE TID:06F90256 Keyboard type=4 subtype=0 Fn=12
PID:07E202EE TID:06F90256 Keyboard name = '00000410'
PID:07E202EE TID:06F90256 Keyboard layout 0x410
PID:07E202EE TID:06F90256 2 keyboards in list
PID:07E202EE TID:06F90256 0 - '00000410'
PID:07E202EE TID:06F90256 1 - '00000409'
..
PID:00400002 TID:052E004A KeybdDriverMapVirtualKey uCode=0x5b mapType=3 - hkl=0x410 pdli=0x410
PID:00400002 TID:052E004A -- scancode=5b cpscvk=2 scvk=0xEEEF9518
PID:00400002 TID:052E004A -- pscvk=eeef94f8
PID:00400002 TID:052E004A -- idxScan=91 -> 0xDD
PID:00400002 TID:052E004A KeybdDriverMapVirtualKey uCode=0x5b mapType=3 - uRet=0xdd
PID:07E202EE TID:06F90256 WM_KEYDOWN VK=0xDD scancode=0x5B
PID:07E202EE TID:06F90256 WM_CHAR charcode=0xEC scancode=0x5B
PID:00400002 TID:052E004A KeybdDriverMapVirtualKey uCode=0x5b mapType=3 - hkl=0x410 pdli=0x410
PID:00400002 TID:052E004A -- scancode=5b cpscvk=2 scvk=0xEEEF9518
PID:00400002 TID:052E004A -- pscvk=eeef94f8
PID:00400002 TID:052E004A KeybdDriverMapVirtualKey uCode=0x5b mapType=3 - uRet=0xdd
OK!
I found that the translation is done by the KPP keypad driver.
So i solved also cloning the KPP driver, giving it the IT translation table.