Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Index

On this page

< Previous article  


HOWTO: Migrate from KMFL to Keyman for Linux

KMFL hasn't been maintained for many years so we recommend users perform the following steps to migrate .kmn files to .kmp files and use Keyman for Linux.

With a little more work this can be entirely done on Linux with Keyman 17+:

Prerequisites

  • You'll need node.js, version 18.0 or later. On Ubuntu 24.04 this can be installed with:

    sudo apt install npm

    For older Ubuntu versions consult the nodejs.org website.

  • Then install the Keyman keyboard compiler:

    sudo npm install -g @keymanapp/kmc
  • You'll also need install Keyman for Linux for installing the .kmp keyboard package later:

Convert the .kmn source file into a .kmp keyboard package

(replace mykeyboard with the name of your .kmn file)

  • Create a file mykeyboard.kpj:

    <KeymanDeveloperProject>
    <Options>
      <Version>2.0</Version>
    </Options>
    </KeymanDeveloperProject>
  • Create a file source/mykeyboard.kps:

    <Package>
    <Info>
      <Name>MyKeyboard</Name>
    </Info>
    <Files>
      <File>
        <Name>../build/mykeyboard.kmx</Name>
      </File>
    </Files>
    <Keyboards>
      <Keyboard>
        <Name>MyKeyboard</Name>
        <ID>mykeyboard</ID>
      </Keyboard>
    </Keyboards>
    </Package>
  • Move your .kmn file to source/mykeyboard.kmn.

  • Build with:

    kmc build mykeyboard.kpj

Disregard the error: "TypeError: Cannot read properties of undefined (reading 'description')", as the compiler will already have created the .kmp file in the build subdirectory.

To properly do this without an error, you'll have to add some additional fields to the .kps file. It's easiest to let the kmconvert tool generate a template which will contain all necessary the fields:

kmconvert template -id mykeyboard

Unfortunately this tools isn't available for Linux yet. You should be able to use it in wine though.

Use Keyman for Linux to install the .kmp keyboard package

You can install the .kmp file with:

km-package-install -f build/mykeyboard.kmp

or with the Keyman Configuration tool.