While mobile keyboards are essential for communication, desktop keyboards are crucial for content creation, education, and professional work. Fortunately, creating a custom keyboard layout for desktop operating systems is often easier and more accessible than developing a mobile app. This guide will walk you through the process for each major platform.
Prerequisites: Like mobile keyboards, you must have your language's characters in Unicode and have a font that can display them. Refer to our Unicode and Font Development guides if needed.
Creating a Keyboard for Windows
Microsoft provides a free and powerful utility specifically for this purpose: the Microsoft Keyboard Layout Creator (MSKLC). It allows you to create, modify, and package keyboard layouts for easy installation.
Download and Install MSKLC
Get the official tool from the Microsoft Download Center. It's a small and straightforward installation.
Load a Base Layout
Open MSKLC. Go to File > Load Existing Keyboard... and choose a layout that is similar to what you want to create (e.g., "US"). This is much easier than starting from a blank slate.
Assign Your Characters
A visual keyboard will appear. Click on a key, and a small dialog will pop up. You can then type or paste your desired character into the fields for the normal state, Shift, Ctrl+Alt (AltGr), and Shift+Ctrl+Alt.
Set Project Properties
Go to Project > Properties. Here, you'll give your keyboard a name (e.g., "Cherokee") and a description. This is how it will appear in the Windows language settings.
Build and Install
Go to Project > Build DLL and Setup Package. MSKLC will create a folder containing an installer (`setup.exe`). Run this installer. Afterwards, you can add your new keyboard via the Windows Settings > Time & Language > Language & Region menu.
Creating a Keyboard for macOS
For macOS, the community standard tool is Ukelele, a free and user-friendly keyboard layout editor. It works similarly to MSKLC but is tailored for the Mac environment.
Create a New Layout from a Template
In Ukelele, go to File > New From Current Input Source. This will load your currently active keyboard layout as a starting point.
Edit the Key Mappings
The interface shows a virtual keyboard. You can drag and drop characters onto keys or double-click a key to manually enter the Unicode character for each modifier state (Normal, Shift, Option, Option+Shift).
Save and Install the Layout
Save your work. Ukelele will create a .keylayout file. To install it, you must move this file to one of two folders:
~/Library/Keyboard Layouts
(for the current user only)/Library/Keyboard Layouts
(for all users on the Mac)
Activate the Keyboard
After a restart (or logging out and back in), go to System Settings > Keyboard > Input Sources. Click "Edit...", then "+" to find and add your new keyboard layout to the list.
Creating a Keyboard for Linux
Creating keyboards for Linux can be more technical as it often involves editing text files. However, the result integrates directly into the system. The standard way is using XKB (X Keyboard Extension).
Advanced Users: Modifying system XKB files is a technical process. Always back up files before editing them. An incorrect edit can cause keyboard issues. For a much simpler, user-friendly approach, see the Keyman section below.
The Technical Method: Editing XKB Files
- Copy a Base Layout File: Navigate to
/usr/share/X11/xkb/symbols/
. Find a base layout file (e.g.,us
) and copy it to a new file with your language code (e.g.,my_lang
). - Edit the Symbol File: Open your new file in a text editor. You will see blocks of text defining keys. You can change the character assignments using Unicode codepoints (e.g.,
U0101
for 'ā'). - Register the Layout: You need to tell the system about your new layout. Edit the
.../xkb/rules/evdev.xml
file. Find the
section and add an entry for your new layout, pointing to your symbol file. - Activate: After saving, you should be able to find and add your new keyboard layout in your desktop environment's system settings (e.g., GNOME Settings, KDE System Settings).
A Simpler, Cross-Platform Solution: Keyman
If you need to support multiple platforms or find the manual XKB process too daunting, Keyman is an excellent solution. It's a free and open-source platform from SIL International for creating and distributing keyboards for Windows, macOS, Linux, iOS, and Android—all from a single project.
Why Use Keyman?
- One Project, All Platforms: Design your keyboard once in the Keyman Developer tool (runs on Windows), and compile it for every major OS.
- User-Friendly: Keyman Developer provides a graphical interface and a powerful scripting language for complex input rules.
- Easy Distribution: It packages your keyboard and font into a single file (.kmp) that users can easily install with the Keyman app on their device.
Your Tools are Ready. What's Next?
Once your keyboards are built, the next challenge is creating digital text. Let's explore how to type out documents, build wordlists, and create foundational data for your language.
Learn About Creating Digital Text