How-to: Type IPA symbols on a GNU/Linux system

In the process of doing research for my IPA keypad, I learnt there were more ways of inserting Unicode characters on a GNU/Linux system than I’d realized. As I would have appreciated a quick list of these when learning about the topic, I decided to share the fruits of my labours to save the rest of you some time.

Use an on-screen keyboard

Most distributions come with an on-screen keyboard baked in. Generally, this is a program called Onboard. With a bit of fiddling, you can set this up as a dedicated IPA keyboard.

First, make sure your system has an on-screen keyboard. Open a terminal and type onboard. After hitting Enter you should see something like the following.

If you’re missing the program, install it by running:

sudo apt-get update

sudo apt-get install onboard

By default, Onboard does not have an option for IPA symbols. For this you’ll need to download a new layout and theme. Go to https://github.com/XachaB/IPAKeyboard and download the zip archive. Extract it and move the contents of /themes and /layouts to their respective Onboard directories

cp /path/to/IPAKeyboard-master/themes/* ~/.local/share/onboard/themes/

cp /path/to/IPAKeyboard-master/layouts/* ~/.local/share/onboard/layouts/

Now you’ll be able to select the IPA keyboard in Onboard’s settings. Launch onboard-settings and choose the IPA option in Layout and Themes.

If you’re likely to use this regularly, add an entry to your list of Startup Applications. I’d recommended selecting the “Start Onboard hidden” option in Onboard’s settings if you go down this route.

Shortcut + Unicode hex

If you know the Unicode hex of the character you want, you can simply type Ctrl Shift U followed by the hex and Enter.

Install a new layout using KMFL

Keyboard Mapping for Linux (KMFL) is an input system designed to give GNU/Linux users all the functionality Keyman provides Windows/macOS users, i.e. the ability to easily download and use non-standard keyboard layouts. A comprehensive guide to installing KMFL and then the corresponding IPA keyboard on Ubuntu-based systems can be found here. I’ve tried it out in Ubuntu 16.04 and 18.04, and it worked great in both. The guide is very GUI-focused, so I’ve made a simple list of terminal commands below:

## Get SIL's GPG key
wget http://packages.sil.org/sil.gpg
## Add SIL's GPG key to your trusted keys
sudo apt-key add sil.gpg
## Add the SIL repository to your sources list
sudo apt-add-repository "deb http://packages.sil.org/ubuntu/ $(lsb_release -sc) main"
## Update your sources list
sudo apt-get update
## Install kmfl and the IPA keyboard
sudo apt-get install ibus-kmfl kmfl-keyboard-ipa

Now that you have the keyboard, you need to enable it. Begin by going to Language Support and checking that the “Keyboard input method system” is set to IBus.

Go your Region & Language settings. Under Input Sources click Add and search for “Other”. Select the IPA keyboard and you’re good to go!

To switch between layouts press Super1Space. This shortcut can be changed in IBus Preferences.

Note: Although the above method should in theory work for Debian users – provided you change the repository url to point to the Debian package lists – it doesn’t. The lists are different. From what I can tell, it is still possible to get KMFL on Debian, but installing the IPA keyboard itself is a pain.

Application specific shortcuts

Emacs

Type Ctrl X 8 Enter, followed by the Unicode hex and Enter again.

LibreOffice

Enter the Unicode hex (e.g. 0278, the code for ɸ) followed by Alt X.

Time to cut it short

Although hardly exhaustive, the above list hopefully provides a good starting point for anyone wanting to type IPA symbols on a GNU/Linux system. Hell, anything beats finding an IPA chart online and copying and pasting as you go!


  1. Normally the “Windows” key. ↩︎