[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD]
"Keyboard Layout"="00000410"
How can I do to have italian layout as default ?
Thanks
Carlo
Supporting an Italian keyboard is not a simple matter as setting a registry key. You need to build your own keyboard driver with the
Italian layout.
Check "Device Layout" under Driver Development\Driver Categories\Keyboard Driver\Layout Manager\Device Layout and also Input
Languages in the PB Help or on
http://msdn.microsoft.com/library/en-us/wceddk40/html/cxconunifiedkeyboarddriver.asp
Once you have it, the Layout Manager takes care of loading the input language that matches your keyboard; check
http://msdn.microsoft.com/library/en-us/wceddk40/html/cxconidentifyingkeyboards.asp
Ciao
Anna Trompetto
"Carlo" <c.alle...@multimodo.it> wrote in message news:uzZjudqC...@TK2MSFTNGP12.phx.gbl...
I used kbdgen.exe and now I have files
itaDL.cpp
itaIL.cpp
ita.reg
I edited the ita.reg file and now it contains these lines:
; Generated by tool built on Jan 24 2003 15:37:17
; from keyboard DLL C:\WINDOWS\System32\kbdit.dll
; for input locale 00000410
; Please define the Layout File, Layout Text and PS2_AT values
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts\00000410]
"Layout File"="kbdit.dll"
"Layout Text"="Italiano"
"PS2_AT"="kbdit.dll"
; Please choose a preload key number appropriate for the target device.
[HKEY_CURRENT_USER\Keyboard Layout\Preload\1]
@="00000410"
Now the problem is where to put them. From PB help I can't understand how to
use these files.
Thanks again.
Carlo
"A. Trompetto" <spamm...@bigfoot.com> ha scritto nel messaggio
news:eUJWcP2C...@TK2MSFTNGP09.phx.gbl...
The basic assumption here is that you have only one hw keyboard and this keyboard is a PS2. If that is not the case, then things get
a bit more complicated.
In the easy case, start checking how the keyboard driver is built under WINCE420\PUBLIC\COMMON\OAK\DRIVERS\KEYBD.
You'll see that it's made from a number of libs, among which are the device layout lib (.\DEVICELAYOUTS\PS2_AT\) and the Input
Languages (.\INPUTLANGS). The files you got should correspond to their English US counterparts
DEVICELAYOUTS\PS2_AT\00000409\ps2_at_00000409.cpp (vs. itaDL.cpp)
INPUTLANGS\0409\il_0409.cpp (vs. itaIL.cpp)
So basically what you need to do is put them in two different dirs, e.g. ItaDL and ItaIL, build them into two separate libs, making
sources files like these:
___
TARGETNAME=PS2_AT_00000410
TARGETTYPE=LIBRARY
SOURCES= \
itaDL.cpp \
___
for the dl, and
___
TARGETNAME=InputLang_0410
TARGETTYPE=LIBRARY
SOURCES= \
itaIL.cpp \
___
for the IL. Build the libs, then you're ready to build the driver, as done in .\DLL\KBD8042US. You need to copy the files you find
there to your driver's dir in a subfolder (e.g \Dll), and modify the sources file such as:
___
SYNCHRONIZE_DRAIN=1
DEFFILE=(your driver's root)\inc\KbdITA.def
TARGETNAME=Kbd8042ITA
TARGETTYPE=DYNLINK
DLLENTRY=DllMain
TARGETLIBS= \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
$(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib
SOURCELIBS=\
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\PS2_8042_KbdCommon.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\LayoutManager.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\KeybdIst.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\PS2_AT_00000410.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\NumPadRmp.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\InputLang_0410.lib \
WINCETARGETFILES=dummy
SOURCES=\
PDDList.cpp \
___
The KbdITA.def file, which you can put into (your driver's root)\inc folder, should read
___
LIBRARY LAYOUTMANAGER
EXPORTS
KeybdDriverInitializeEx
KeybdDriverPowerHandler
KeybdDriverGetInfo
KeybdDriverSetMode
KeybdDriverInitStates
KeybdDriverVKeyToUnicode
KeybdDriverMapVirtualKey
LayoutMgrGetKeyboardType
LayoutMgrGetKeyboardLayout
LayoutMgrGetKeyboardLayoutName
LayoutMgrGetKeyboardLayoutList
LayoutMgrLoadKeyboardLayout
LayoutMgrActivateKeyboardLayout
IL_00000410
PS2_AT_00000410
___
So you should have under your driver's root:
\inc\KbdITA.def
\ItaDL\ItaDL.cpp
\ItaDL\sources and the standard makefile
\ItaIL\ItaIL.cpp
\ItaIL\sources and the standard makefile
\Dll\pddlist.cpp
\Dll\sources and the standard makefile
After building your Kbd8042ITA.dll, you need to add it and the necessary registry to the image.
To add the file to the image add the following line to your platform.bib (or project.bib)
kbdmouse.dll $(_FLATRELEASEDIR)\Kbd8042ITA.dll NK SH
The registry
___
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts\00000410]
"Layout File"="kbdmouse.dll"
"Layout Text"="Italiano"
"PS2_AT"="kbdmouse.dll"
; Please choose a preload key number appropriate for the target device.
[HKEY_CURRENT_USER\Keyboard Layout\Preload\4]
@="00000410"
___
should go into your platform.reg (or project.reg, depends on your needs).
When you're done, you could make a dirs file in your driver's root, and even a .cec file for IDe integration. The documentation on
those is quite complete.
This turned out pretty much as a step by step guide...
Cheers
Anna
_____________________________________________
Do not reply to me directly; Reply-to address is a spamtrap.
OK, I have a PS2 keyboard.
OK I organized the files and folder.
Now I don't know how to build the libs.
I tried with build.exe but it answer with errors about no variables set.
If you can't help me more please suggest me a good book.
I find PB help is really incomplete !
I have "Building Powerful Platforms with CE" but it doesn't help me much,
there a re no good examples.
Ti ringrazio molto.
Carlo
see inline.
"Carlo" <ca...@nospam.com> wrote in message news:ePCglkED...@TK2MSFTNGP10.phx.gbl...
> OK I organized the files and folder.
> Now I don't know how to build the libs.
> I tried with build.exe but it answer with errors about no variables set.
Build.exe needs to be launched from a build environment (see Build Environment Tool in the PB Help for more info). The easiest way
to have one is to open a command prompt from your PB: after opening your workspace, go to the Build menu and then choose Open Build
Release Directory. A command prompt window pops up, with all the environment variables for your platform and project already set.
(Use the SET command to
see them). Then navigate to your driver's folders, and build -cf each directory (\dll must be left last).
>
> If you can't help me more please suggest me a good book.
> I find PB help is really incomplete !
> I have "Building Powerful Platforms with CE" but it doesn't help me much,
> there a re no good examples.
>
That is still one of the best books on PB at large, but I would suggest you to give a closer look at the online help
http://msdn.microsoft.com/library/en-us/wcelib40/html/pb_start.asp. It's an effort, but if you want to do something more than the
standard builds, you need to take your time and go through it.
Ciao
Yes! The "Open Build Release Directory" command is really useful !
I build all the root C:\WINCE420\PUBLIC\COMMON\OAK\DRIVERS\KEYBD with no
errors by "build.exe -cf".
But I cannot see any Kbd8042ITA.dll
How can I build the dll ?
Anyway I tried to add the registry keys and to rebuild the platform with
platform builder but I have 5 errors, the first one is
Error: Could not find file
'C:\WINCE420\PUBLIC\MMSCEA\RelDir\CEPC_X~1\kbd8042ita.dll' on disk
Se mi rispondi se passi da Bologna ti offro un pranzo! :-)
Carlo
normally you should keep you source code away from the public folder.
If you saved your code under C:\WINCE420\PUBLIC\COMMON\OAK\DRIVERS\KEYBD then to build it automatically you should modify the
default files (e.g. dirs at least) and that is not advisable. It's better to put your own code under a separate folder.
Anyhow, I tested the files I suggested you and it does look like they need adjustment to be successfully built. So it sounds strange
that you build completed with no errors. I think that the new files were never built.
If you need help with those, contact me directly at anna _ tromp at hotmail dot com, just remove the spaces and replace at and dot
with @ and .
Per il pranzo accetto fin d'ora, grazie :-D