Issue / Question
How to remap keys on MC32xx (Windows-based mobile devices only)?
MC32xx devices (Windows based only; Win CE7 and WEH 6.5)
Resolution / Answer
The instructions below provide the basic guidelines to remapping keys using the "kbtools" Visual Studio project (respective to model device).
To generate the files necessary to remap keys on an MC32xx device....
Prerequisite: you must have the "kbtools" Visual Studio solution project for your respective mobile device. Contact support to obtain these files.
- Open respective “makebins.sln” within your ”kbtools” folder (may also be named “makebins_2008.vcproj” or something similar)
- This will open up a project within Visual Studio (must have VS to compile this project to generate keymap files)
- Within project, open “scancode.h”
- Scancode.h contains all the mappings at the lowest level
- For example if you wanted to remap the “Red Key” to “Escape”
- Look for “SC_REDKEY”
- Most of the mappings are intuitively named
- Substitute the hex value next to “SC_REDKEY” (which is 0x5e by default) with the hex value next to “SC_ESCAPEKEY” (which is 0x01)
- Run the project
- This will generate key-mapping files in the “Bin” directory (there will be many files; they have file extensions such as ".rmt", ".sct" and ".mmt")
- Place these files in the root of the “Application” folder of device
- Create a “.cpy” file that will copy these files from “Application” folder to the “Windows” folder
- See attached text file for example syntax
- Place all of these files and CPY file in the root of “Application” folder
- If you have a CE OS-based device, skip to step #8. If on a WM6.5/WEH6.5 OS device, you must also place “skipcopy.reg” (contact support for reg file; contents of reg file below for reference) in the “Application” folder of device, and then browse to it on the device and manually merge it
- This will change a registry setting for one time that will make the aforementioned “.cpy” file from after a cold boot
- Which in turn will make copies of all the key-mapping files and overwrite the ones already residing in “Windows”
- This CPY and REG file method is used because if you manually try to copy the key-map files directly to “Windows”, you will get a permissions error and it will not be allowed
- Cold boot the device;
- To cold boot, simultaneously press 1+9+POWER
- Keys should be remapped accordingly post-reboot