Kernel Mode Keyboard Layout
For when you want your keyboard layouts at a lower level
KmKbLayout is a Windows filter driver that modifies keyboard scancodes before they get sent further up the layer. This allows you to implement a keyboard layout before the Windows keyboard layout engine.
I was getting tired of having to install my keyboard layouts on remote computers when using the built in RDP client. My colleagues were also getting sick of having to change the layout when they took over my sessions too. After a bit of tinkering with windows hooks, I realised that mstsc.exe must be sending the scancodes and this project was born.
Also, I wanted to play with a filter driver :)
-
Install Windows Driver Kit 7.1.0
-
Open "x86 Checked Build Environment" or "x64 Checked Build Environment" from the start menu (under Windows Driver Kits). Make certain you are running the version with the correct architecture and Windows version
-
Run make from the root directory
-
If you are building 64 bit you will also need to sign the driver I have been using dseo
-
Open powershell as administrator
-
Browse to the directory with the built KmKbLayout files
-
Run ./install.ps1 You may need to run
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
-
Open regedit.exe
-
Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\kblayout\Layouts
-
Change the "Selected Layout" value to the name of the layout you want to use
or
- Double click on the .reg file for the layout you want to use. They have been set up to change the selected layout on merge.
-
Click File->Load Existing Keyboard
-
Select your current keyboard layout
-
Save the layout somewhere This layout is your out layout and is what the new layout will map to (in my case it is qwerty)
-
Create a new layout in MKLC, and save it This is your input layout, and is what you want the keyboard to input as
-
Run klc2kblayout.ps1
./klc2kblayout -OutputLayout BaseLayout.klc -InputLayout NewLayout.klc -Output new.reg
-
Double click the resulting registry file
MIT