组合键
启动多键组合序列的按键(通常为右Alt或自定义映射),是Linux/Unix功能:Compose + a + e → æ,可通过XCompose配置。
What is a Compose Key?
The Compose key is a special keyboard key (or a regular key designated as Compose in software) that initiates a multi-keystroke sequence for typing special characters. After pressing Compose, the user types a sequence of ordinary keys — and the OS combines them into a single special character. No key needs to be held simultaneously; Compose acts as a latch, waiting for the sequence to complete.
For example: Compose, then e, then ' produces é. Compose, then c, then , produces ç. Compose, then <, then < produces «. The Compose key is particularly popular in Unix/Linux environments but is also available on macOS and Windows with third-party tools.
How Compose Sequences Work
The Compose system uses a compose table — a list of sequences and their resulting characters. On Linux/X11 systems, the default compose table is usually at /usr/share/X11/locale/en_US.UTF-8/Compose and contains thousands of entries. Users can create custom sequences in ~/.XCompose.
| Compose Sequence | Result | Character |
|---|---|---|
Compose + e + ' |
é | U+00E9 |
Compose + a + " |
ä | U+00E4 |
Compose + o + / |
ø | U+00F8 |
Compose + c + , |
ç | U+00E7 |
Compose + n + ~ |
ñ | U+00F1 |
Compose + < + < |
« | U+00AB |
Compose + - + - + . |
– | U+2013 |
Compose + - + - + - |
— | U+2014 |
Compose + 1 + 2 |
½ | U+00BD |
Compose + t + m |
™ | U+2122 |
Compose + c + o |
© | U+00A9 |
Setting Up a Compose Key
Linux (X11/Wayland): In GNOME, go to Settings → Keyboard → Special Character Entry → Compose Key. Common choices for the physical key: Right Alt, Caps Lock, Menu key, Right Ctrl.
Command line (X11):
# Set Compose to Right Alt for current session
setxkbmap -option compose:ralt
# Persistent: add to /etc/default/keyboard
XKBOPTIONS="compose:ralt"
macOS: Not built in. Use the free Ukelele app or install X Compose tools via Homebrew. The dead-key system (Option + key) is more native on macOS.
Windows: The WinCompose application adds a Compose key that uses the same X11 compose table format.
Custom Compose Sequences
On Linux, ~/.XCompose lets you define personal sequences:
# ~/.XCompose
include "%L" # include default system sequences
# Custom entries
<Multi_key> <e> <m> : "📧" # email emoji
<Multi_key> <t> <h> <e> : "the" # abbreviation expansion
<Multi_key> <minus> <gt> : "→" # arrow
Quick Facts
| Property | Value |
|---|---|
| Mechanism | Latch key + sequence → single character |
| Platform support | Linux (native X11), Windows (WinCompose), macOS (third-party) |
| Compose table location | /usr/share/X11/locale/en_US.UTF-8/Compose |
| User overrides | ~/.XCompose |
| Common physical key choices | Right Alt, Caps Lock, Menu key |
| Sequences for dashes | Compose + -- + . → –; Compose + --- → — |
| Copyright symbol | Compose + c + o → © |
| Trademark symbol | Compose + t + m → ™ |
输入法 中的更多内容
Windows输入法,通过Alt+数字键盘数字按代码页编号输入字符(Alt+0169 → ©,Alt+0176 → °),仅限代码页1252中的字符。
A system-level tool for browsing and inserting Unicode characters. macOS Character Viewer …
通过Unicode码位输入字符的任何方法:十六进制输入(Mac)、Ctrl+Shift+U输入U+XXXX(Linux)或Alt+X(Windows应用程序)。
通过输入十六进制值直接输入Unicode码位的方法。Mac:按住Option+十六进制值+松开;Windows:在Word/WordPad中输入十六进制后按Alt+X。
用于浏览和插入Unicode字符的图形工具。Windows:charmap.exe;Mac:字符查看器(Control+Command+Space);Linux:gucharmap。
用于可视化浏览和选择字符的UI组件(原生或网页版),移动端的表情符号选取器是最常见的例子。
按下后不立即输出但会修饰下一次击键的按键,用于输入变音符号:按下`再按e可输入è,常见于欧洲键盘布局。
通过拼音或字形匹配将按键序列转换为字符的软件组件,使用户能够用标准键盘输入复杂字符(如CJK、韩文等)。