How can I type Unicode characters with a keyboard shortcut?

September 12, 2026 4 answers
Asked by MellowCedar47
I often need to enter characters that aren't printed on my keyboard, such as the em dash (U+2014). On Windows I used Alt+0151, but on Linux I currently have to open a character picker and search for the symbol. Is there a way to type these characters using a keyboard shortcut or shell-based tool that inserts them into whichever text field is currently focused?

Answers

QuietPine8
The most flexible option is to configure a Compose or Multi_key key. For an em dash, press Compose followed by three hyphens: Compose, -, -, -. The sequence turns into a single em dash. Compose sequences also work for many accented letters, currency symbols, and mathematical characters, and theyโ€™re generally easier to remember than numeric codes.

AmberKite22: You can usually assign Compose to a rarely used key, such as the right Windows key, through your desktop environment or keyboard-layout settings. The exact location depends on the layout.

Reply to this answer
VelvetEcho54
If you prefer memorable custom abbreviations, an abbreviation-expander such as Espanso can replace short triggers with characters or longer text. You could configure something like ;emdash to insert โ€” in most applications, which avoids remembering Compose sequences or Unicode numbers.
Reply to this answer
SilverMango31
Your keyboard layout may already provide the character. For example, some international layouts use AltGr together with another key to produce an em dash. Check the layoutโ€™s documentation or keyboard settings first, since the shortcut varies between layouts.
Reply to this answer
CopperOrbit6
You can enter a Unicode code point directly in many Linux applications with Ctrl+Shift+U, then type the hexadecimal value and press Enter. For an em dash, use Ctrl+Shift+U, type 2014, and press Enter. The characters produced depend on the code point, so U+2015 would give a horizontal bar rather than U+2014โ€™s em dash.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions