Home Flight manual By tags Ramblings Colophon RSS

Enter Unicode characters with fcitx5

Series introduction

Maybe a new fcitx

IBus, standing (vaguely) for "Intelligent Input Bus", is an input framework that allows users to, for example, switch between different keyboard layouts, which any non-English native speakers reading this blog would certainly be familiar with.

It is notably used by default by GNOME-based desktop environments, making it the de facto standard for many Linux users; however, it has been somewhat finicky for me (and others) when working with Wayland1—which is where fcitx52 comes in.

But fcitx5 is a lot other than "Wayland's IBus": just as vaguely, it stands for "Flexible Context-aware Input Tool with eXtension support", and in this series, I mean to delve deeply into the most practical and ubiquitous of its built-in modules.

Table of contents

The fcitx5 functionality I reach for the most, its Unicode module lets you access an astronomical number of characters, symbols and glyphs with the expected convenience. But beyond the obvious, it also bundles a pearl of ingenuity that lets you identify these invisible, combining or other peculiarly artful characters like a jeweller would delight in examining a rare gem.

Familiar code points entry

fcitx5 has a built-in Unicode input method that allows users to enter any Unicode character by its code point. Just start the daemon, verify that your journalctl --user --unit fcitx5 shows Loaded addon unicode, and you're all set.

To use it, simply switch to the Unicode input method—by default, Ctrl-Shift-U, and type the hexadecimal code point of the character you want to enter, followed by Enter or Space, cancelling out with Esc.

I am hugely fond of hyphens, en dashes and em dashes (and I do sorely resent the dreadful notion that writers that employ them may be of the artificial complexion, and you will not catch me present a range with anything other than the adequate punctuation mark.

But while I find all of these notable examples to be surprisingly easy to remember, you do not have to index all of Unicode in your head—that valuable space is well known to be most suitable to π's digits after all.

What about the characters you won't reach for regularly enough to commit to (muscle?) memory their code point? With Ctrl-Shift-Alt-U (I like to call this "digital mouthful" a "handful"), you will be able to search by description.

Lastly, here's the neat trick that originally sold me on better adopting that tool: the "digital mouthful" Ctrl-Shift-Alt-U pops up already displaying some elements before you even start searching: they're your current selection and the contents of your clipboard, for convenient reverse-lookups.

Will you need that often? It does have some dubious value in being only able to pop up where you can type, but I reckon that shouldn't be a problem for any serious CLI dwellers.

And if once in a while you tend to some finesse writing, you might very well save yourself some xxd invocations—unless you can distinguish a soft-hyphen from a non-breaking space, from a regular space...

  1. Although "applications being finicky" under Wayland will come at no surprise to anyone, I will note that it mostly has to do with running a lot of X11 applications actually through a compatibility layer, and NVIDIA notoriously having been an execrable collaborator in helping the Linux kernel developers integrate their hardware into the ecosystem.

  2. fcitx5 is a fairly recent project (started around 2019) led by the same original author, a complete rewrite of its predecessor, infusing new life into fcitx notably in including first-class Wayland support, a vastly more modern codebase, greater performance (reportedly), and some unified theming and configuration tools.

Referenced tools