Greetings.
A forum guru asked me to submit/share something regarding PE keyboard remapping.
This is not the same as remapping an entire keyboard from English to German, for example.
This is remapping individual keys.
Normal disclaimers apply.
Warranties neither made nor implied.
Always make/have backups (including registry) available.
One can manually edit the normal XP registry to remap specific keys,
but that can be "hexing" to say the least.
There are utilities that provide GUIs for the user to specify key remappings
which the utility subsequently enters into the XP registry.
The approach of this posting presumes one has already entered
the desired PE key remappings one way or another into the normal XP registry.
One should export the normal XP registry entry @
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
(NOT Keyboard Layouts)!!! The resulting .reg file will/should have three (3) sections.
Only the "Scancode Map" hex entry will be needed/used for PE key remapping.
The section that this approach uses looks like
CODE
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,53,e0,3b,00,1d,e0,53,e0,\
00,00,00,00
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,53,e0,3b,00,1d,e0,53,e0,\
00,00,00,00
BartPE provides a !custom plugin. UBCD4W does not.
I made a backup of the original BPE custom.inf & renamed it custom.infO.
I then edited out everything in the custom.inf except the desired key remappings.
The plugin code is
CODE
; PE Builder v3 plug-in INF file
; Created by Bart Lagerweij
; modified by AEN
; http://www.nu2.nu/pebuilder/
;
; Use this file to customize some personal settings
[Version]
Signature= "$Windows NT$"
[PEBuilder]
Name="BPE: Customize"
Enable=1
;Help="custom.htm"
[SetupReg.AddReg]
0x0, "ControlSet001\Control\Keyboard Layout"
0x3, "ControlSet001\Control\Keyboard Layout", "Scancode Map", \
00,00,00,00,00,00,00,00,03,00,00,00,53,e0,3b,00,1d,e0,53,e0,00,00,00,00
; Created by Bart Lagerweij
; modified by AEN
; http://www.nu2.nu/pebuilder/
;
; Use this file to customize some personal settings
[Version]
Signature= "$Windows NT$"
[PEBuilder]
Name="BPE: Customize"
Enable=1
;Help="custom.htm"
[SetupReg.AddReg]
0x0, "ControlSet001\Control\Keyboard Layout"
0x3, "ControlSet001\Control\Keyboard Layout", "Scancode Map", \
00,00,00,00,00,00,00,00,03,00,00,00,53,e0,3b,00,1d,e0,53,e0,00,00,00,00
The final line begins with a tab of eight (8) characters.
The final line is the hex code obtained from the normal XP registry export.
The example shown is for remapping a total of two (2) keys;
Notice that the .reg file hex entry has been edited/reformatted
to be all on one line in the custom.inf file. The ",\" at the end of the penultimate line
in the .reg file has been deleted. The hex entry is only the 8 character tab
followed by consecutive two character entries separated by commas & no spaces - all on one line.
I also made a custom.inf to remap a total of ten (10) keys.
(The hex code should all be on one line as the last line ...)
That entry looks like
CODE
[SetupReg.AddReg]
0x0, "ControlSet001\Control\Keyboard Layout"
0x3, "ControlSet001\Control\Keyboard Layout", "Scancode Map", \
00,00,00,00,00,00,00,00,0b,00,00,00,47,e0,6a,e0,4f,e0,69,e0,53,e0,3b,00,51,
e0,28,00,49,e0,2b,00,2b,00,49,e0,28,00,51,e0,3a,00,53,e0,5d,e0,38,e0,
5b,e0,3a,00,00,00,00,00
0x0, "ControlSet001\Control\Keyboard Layout"
0x3, "ControlSet001\Control\Keyboard Layout", "Scancode Map", \
00,00,00,00,00,00,00,00,0b,00,00,00,47,e0,6a,e0,4f,e0,69,e0,53,e0,3b,00,51,
e0,28,00,49,e0,2b,00,2b,00,49,e0,28,00,51,e0,3a,00,53,e0,5d,e0,38,e0,
5b,e0,3a,00,00,00,00,00
I prepared/used the BPE !custom plugin for the key remapping for a BartPE build
and then copied the !custom folder the UBCD4W folder
\...\plugin\!Critical\UserSettings.
So the UBCD4W directory will then look like
\...\plugin\!Critical\UserSettings\!custom.
The !custom plugin (as formatted here) will appear in the BPEBuilder plugin selection screen
under the entry titled "BPE: Customize". One should enable this line item.
The BPEBuilder will then incorporate the key remappings into the registry build.
If one makes a format error in the custom.inf entry,
The BPEBuilder should give an error message during the build.
Unfortunately upon such an error the build output directory
will then have an incomplete, in process registry file still open -
and one will not be able to completely delete/empty
the build directory of all contents until after rebooting
(unless someone know of another solution ...)
I have not (yet) tried remapping the entire keyboard
that already has individual key remappings in effect.
I suppose the already remapped individual keys would be remapped
as if they were actually the keys to which they were already remapped.
Regards,
AEN
Æ