How can I type Unicode characters with a keyboard shortcut?

0
7
Asked By MellowCedar47 On

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?

4 Answers

Answered By CopperOrbit6 On

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.

Answered By SilverMango31 On

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.

Answered By VelvetEcho54 On

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.

Answered By QuietPine8 On

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.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.