• Typography
  • Libertinus

To:
M.P. van de Weerd
From:
Date:
Re:
How to Write Keyboard Keys with Libertinus
Cc:
Public
Letterhead

How to Write Keyboard Keys
with Libertinus

Recently, while implementing the use of the Libertinus font family on this website, I stumbled upon the incredibly elegant way in which the special keyboard-keys have been enabled for the Libertinus Keyboard font. I have not been able to find proper documentation on this, and I like it so much that I want to highlight it, so I will dedicate a short memo on it.

Ligature Magic

Libertinus Keyboard defines its special key characters using ligatures. Usually, ligatures are used by fonts to create fancy glyphs for instances where two or more characters are placed next to each other. An often seen example is the combination of “f” and “i”, where the top of the prior is merged with the dot on the latter: “fi”. In Libertinus Keyboard, this mechanism is used to detect when a letter combination appears that is associated with a key on the keyboard, e.g. “Shift”, and replaces it with a glyph representing that key: Shift. This is different from the method used in Linux Biolinum Keyboard, of which Libertinus Keyboard was forked in the past. There, the keys where encoded using unused parts of Unicode, making them less accessible.

Available Glyphs

I think an extensive list of the available keys is nice to have. Maybe there are some unexpected keys there, or some expected keys are missing. I’ve scraped the font’s SFD-file, as found on the Libertinus GitHub-repo. Without getting too much into the specifics of SFD-files, each ligature is defined with a Ligature2 property, specifying the combination of characters that combine into a single symbol. Alphabetic characters are defined as is, numbers and other special characters are spelled out, e.g. “F three” is “F3” is F3 and “P a d plus” is “Pad+” is Pad+. Below an overview of the available glyphs. As it turns out, although defined in the SFD-file, “Pad/” and “Pad*” don’t seem to work as intended or expected, as they are displayed as separate glyphs. This might be a bug.

SFD Code Letters Glyph
S t r g “Strg” Strg
A l t “Alt” Alt
A l t G r “AltGr” AltGr
F one “F1” F1
F two “F2” F2
F three “F3” F3
F four “F4” F4
F five “F5” F5
F six “F6” F6
F seven “F7” F7
F eight “F8” F8
F nine “F9” F9
F one zero “F10” F10
F one one “F11” F11
F one two “F12” F12
F one three “F13” F13
F one four “F14” F14
F one five “F15” F15
F one six “F16” F16
C t r l “Ctrl” Ctrl
S h i f t “Shift” Shift
T a b “Tab” Tab
E n t e r “Enter” Enter
G N U “GNU” GNU
P o s one “Pos1” Pos1
E n t f “Entf” Entf
E i n f “Einf” Einf
L e e r “Leer” Leer
E s c “Esc” Esc
E n d e “Ende” Ende
C a p s l o c k “Capslock” Capslock
B a c k “Back” Back
H o m e “Home” Home
D e l “Del” Del
I n s “Ins” Ins
E n d “End” End
S p a c e “Space” Space
P a d zero “Pad0” Pad0
P a d one “Pad1” Pad1
P a d two “Pad2” Pad2
P a d three “Pad3” Pad3
P a d four “Pad4” Pad4
P a d five “Pad5” Pad5
P a d six “Pad6” Pad6
P a d seven “Pad7” Pad7
P a d eight “Pad8” Pad8
P a d nine “Pad9” Pad9
P a d divide “Pad/” Pad/
P a d plus “Pad+” Pad+
P a d hyphen “Pad-“ Pad-
P a d multiply “Pad*” Pad*
F n “Fn” Fn
P a d e n t e r “Padenter” Padenter
B i l d u p “Bildup” Bildup
B i l d d o w n “Bilddown” Bilddown
P a g e u p “Pageup” Pageup
P a g e d o w n “Pagedown” Pagedown
W i n d o w s “Windows” Windows

This website collects statistical data in order to improve your user experience.

Privacy Statement