Creating a Keyboard in KeyMagic 3

KeyMagic 3 can build keyboards by itself. You don’t need a separate editor or converter.

Overview

KeyMagic keyboards come in two formats:

  • KMS files (.kms): text scripts that define the typing rules. This is what you write and edit.
  • KM2 files (.km2): compiled keyboards that KeyMagic loads. This is what you share and install.

KeyMagic’s Create Keyboard page turns a KMS script into a keyboard, lets you try it, and adds it to your keyboards.

Steps

Step 1: Open KeyMagic

Open the KeyMagic app:

  • Windows: from the Start menu or the tray icon
  • macOS: from the Applications folder or Launchpad
  • Linux: from the application menu

Step 2: Go to Create Keyboard

Click Create Keyboard in the sidebar.

Step 3: Open a script

Do one of these:

  • Drop a .kms file anywhere on the page.
  • Click Choose File… and pick a .kms file.
  • Click New from Template… to start a new script from a template.

KeyMagic compiles the script straight away and shows whether it worked. If it didn’t, it shows the error and the line it’s on.

Step 4: Try it

Type in the Try it field to see what your keyboard produces. You don’t need to install it or switch input sources first.

Step 5: Edit and save

Edit the script in any text editor. Each time you save, KeyMagic compiles it again and updates Try it, so you can see each change as you make it.

Step 6: Install or save the keyboard

  • Install and Try adds the keyboard to your Keyboards list, ready to use. If it’s already there, the button reads Update and Try and replaces it.
  • Save .km2… saves the compiled keyboard as a file, for sharing or keeping.

Scripts you’ve opened are listed under Recent Scripts, so you can come back to them.

When something goes wrong

If a script doesn’t compile, KeyMagic shows:

  • what went wrong
  • the line where it happened

Common problems:

  • Syntax errors: a typo, a missing + between parts of a rule, or an unclosed quote
  • Missing icon: the file named in @ICON isn’t next to the script
  • Invalid Unicode: a character code that isn’t valid

Platform note

Create Keyboard works the same on Windows, macOS and Linux. A KM2 file made on one works on all of them, and with KeyMagic 2.

Learning to write KMS files