‹ back home

Typing non-English characters

2024-07-12 #input-method #keyboard #notes

These are different ways of typing non-English characters on computers.

Alternative Graph

The AltGr (Alternative Graph) key is typically located on the right of the space bar. Some keyboard don’t have an AltGr key but have a second Alt key instead. In this case, the right Alt key can be configured to work as AltGr.

The AltGr key provide quick access a few symbols common in Western European languages. These are some examples that work on my current configuration:

It is not possible to type the ° symbol nor ǔ with AltGr on an English keyboard.

Dead letters

Dead letters are those that don’t immediately insert a character when pressed. The naming comes from the days of typewriters.

Any keyboard (typically a “US English” one) can be configured to be used with the “US English International” variant, which enables some dead keys.

Dead keys are used in sequences: they change the result of the following key. The , notation in the examples below means “one key after another”:

This approach makes it easy to write Latin characters, but requires an extra keystroke to type quotes and double quotes. For a Spanish speaker this can be a reasonable compromise, especially if when replacing the keyboard is not feasible.

AltGr is also available in this layout. This provides access to some extra characters (like ß), but also provides redundant access to others:

Dead keys are usually easier to reach than AltGr, which make them easier to use when touch-typing.

Compose

The (Compose) key is extremely rare in modern keyboards. Windows does not support the Compose key1, so most keyboard manufacturers don’t include it.

Those who use the Compose key usually configure some other key to function as Compose, typical candidates being:

Pressing the compose key signals to the computer that the following keystrokes are to insert alternate characters. The keys are pressed one after the other, and not all at once.

On most Unix-like systems, these mappings are defined in /usr/share/X11/locale/en_US.UTF-8/Compose.

The compose key requires learning some sequences and mnemonics, but sequences are consistent. The example given above should be enough to infer how to type ǐ or É.

The compose key allows provides access to all letters from European languages, Chinese tonal marks (for pinyin) and many scientific and mathematical symbols.

Eastern Asian languages (CJK)

Typing Chinese, Japanese or Korean requires using an Input Method. An input method is a program that assists in converting keystrokes into the desired characters. Usually, this includes a pop-up window to select the right characters.

For example, to type 雨果 on an Keyboard, I need to know the pinyin representation of these characters. The pinyin for 雨果 is yǔ gǔo. With a Chinese input method active, I type yuguo and a little pop-up window shows me suggestions that match this:

雨果
雨过
与国
于国
[...]

I can cycle through these with Tab and confirm my selection with Space.

I can switch back to English input by pressing Ctrl + Space.

The general idea is similar to code completion in code editors.

Unicode character points

The above approaches all require reconfiguring the keyboard layout (or running an input method program).

It is also possible to type any character using Unicode code points. On Unix-like operating systems, this is typically done with Ctrl + Shift + u, followed by the hexadecimal Unicode code point. For example:

Clearly this is far less convenient and requires memorising or looking up Unicode character points.

German, Norwegian and other European keyboards

Some country-specific keyboards include extra keys with the extra letters commonly used in the local language. The are convenient for bilingual usage (e.g.: English and German), but are limited when needing to type multiple languages (e.g.: English, German and Spanish).

Arabic, Cyrillic

Any keyboard can be configured to have an Arabic or Cyrillic layout. Each key will insert a single letter. Typing English requires switching to an English layout, so a global key combination is usually used to switch back and forth.

Emoji

I intend to write an emoji-picker input method in future. The intended usage is:


  1. WinCompose implements the Compose key for Windows. ↩︎

  2. ScrollLock changes the behaviour of the arrow keys. Usually the arrow keys move the cursor around, but when Scroll Lock is enabled, the arrow keys move on-screen content instead (e.g.: a document, spreadsheet, etc) without moving the cursor. With the popularisation of mice, usage of this key has become extremely niche. ↩︎

Have comments or want to discuss this topic?
Send an email to ~whynothugo/public-inbox@lists.sr.ht (mailing list etiquette)

— § —