Skip to content

Source file(s) from MSKLC project file (.klc)

Davide Beatrici edited this page Dec 10, 2021 · 1 revision

Prerequisites

These instructions assume that you have installed MSKLC 1.4, which provides KbdTool 3.40.

The tool is located by default at %ProgramFiles(x86)%\Microsoft Keyboard Layout Creator 1.4\bin\i386\kbdutool.exe.
If you're running an x86 (32 bit) version of Windows, %ProgramFiles(x86)% is probably not available. In that case use %ProgramFiles% instead.

The program is command line only and running it simply prints the available options:

KbdTool v3.40 - convert keyboard text file to C file or a keyboard layout DLL


Usage: KbdUTool [-v] [-n] [-w] [-k] [-n] [-u|a] [-i|x|m|o|s] FILE

        [-?] display this message
        [-n] no logo or normal build information displayed

        [-a] Uses non-Unicode source files (default)
        [-u] Uses Unicode source files

        [-v] Verbose diagnostics (and warnings, with -w)
        [-w] display extended Warnings

        [-x] Builds for x86 (default)
        [-i] Builds for IA64
        [-m] Builds for AMD64
        [-o] Builds for WOW64
        [-s] Generate Source files (no build)

        FILE The source keyboard file (required)

        -u/-a are mutually exclusive; kbdutool will use the last one if you specify more than one.
        -i/-x/-m/-o-s will exhibit the same behavior when than one of them is specified.

Using KbdTool

Assuming your file is called MyLayout.klc and is in a folder called Layouts on your desktop, execute from your Windows shell of choice:

cd %USERPROFILE%\Desktop\Layouts
"%ProgramFiles(x86)%\Microsoft Keyboard Layout Creator 1.4\bin\i386\kbdutool" -u -s "MyLayout.klc"

Successful output:

KbdTool v3.40 - convert keyboard text file to C file or a keyboard layout DLL


Compiling layout information from 'MyLayout.klc' for source files.


All tasks completed successfully.

The directory should now contain the source files for the layout:

MyLayout.C
MyLayout.DEF
MyLayout.H
MyLayout.RC

Please note that their name is determined by the MSKLC project's name.

Clone this wiki locally