Keyboard Support

Contact and Search Homepage

Header bottom

Other versions
Version 17.0 (current version)Version 16.0Version 15.0Version 14.0Version 13.0Version 12.0Version 11.0Version 10.0Version 9.0

On this page

KMComp Command Line Compiler

KMComp is the command line compiler included in Keyman Developer. It is located in %ProgramFiles(x86)%\Keyman\Keyman Developer.

The following parameters are available:

Compiler mode

Usage: kmcomp [-s[s]] [-nologo] [-c] [-d] [-w] [-v[s|d]] [-source-path path] [-schema-path path]
              [-m] infile [-m infile] [-t target] [outfile.kmx|outfile.js [error.log]]
              [-add-help-link path] [-color|-no-color]
              [-extract-keyboard-info field[,field...]]

General compiler parameters

A .kmn file (Keyboard Source), .kps file (Package Source), or .kpj (project). Required in compiler mode. If a .kpj is specified, the .kpj will determine output paths and all files referenced in the project will be built (see -t). For validation mode, can be a .keyboard_info file.
Generate an output file for Windows/macOS; can only be specified for a .kmn infile. Optional; if omitted, generates an output file with the same base name as the input file.
Generate an output file for KeymanWeb/touch devices; can only be specified for a .kmn infile. Optional; if omitted for a .kmn input, no JavaScript keyboard will be built.
Write output to a text file specified by error.log instead of stdout.
Mostly silent; don't print information-level messages
Fully silent; don't print anything except fatal internal errors
Don't print the compiler description
Clean target(s) instead of building (only for .kpj)
Include debug information
Treat warnings as errors
-t target
Build only the target file from the project (only for .kpj)
-addhelplink path
path to help file on
If specified, forces color log mesages on.
If specified, forces color log messages off. If neither specified, uses console mode to determine whether color should be used

JSON .keyboard_info compile targets

Validate infile against source schema
Validate infile against distribution schema
Merge information from infile (can be .kmp and .js) into .keyboard_info output file
Validate the id against the .js, .kmx and .kmp filenames when merging
Print json data .keyboard_info for build script integration.
Specify path to add to the sourcePath field in the .keyboard_info output file
Specify path to the keyboard_info json schema definitions. If not specified, then defaults to same folder as kmcomp.exe