| .gitignore | ||
| CC-1.0-Universal.txt | ||
| CHANGELOG.txt | ||
| dot-XCompose | ||
| keyboard | ||
| README.md | ||
Keyboard
Debian GNU/Linux US keyboard setup to do accents, etc.
Files
Add these files to the system.
/etc/default/keyboard
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="compose:menu"
BACKSPACE="guess"
That will use the menu key as the compose key.
If you don't have that key, then you can use something else,
such as the right Alt key, by changing the above to:
XKBOPTIONS="compose:ralt"
Other options include:
compose:rctrl,
compose:sclk,
compose:caps.
After changing that file, run:
sudo udevadm trigger --subsystem-match=input --action=change
~/.XCompose
The q̃ letter requires another file to be set up,
since it isn't a Unicode character, but uses a
combining tilde.
include "%L"
<Multi_key> <asciitilde> <q> : "q̃"
Restart X after adding this file.
Characters
Examples of various characters.
Letters
Other have marks following the pattern of a,
including upper case.
- á --
<menu>+'+a - à --
<menu>+`+a - å --
<menu>+o+a - â --
<menu>+^+a - ã --
<menu>+~+a - ä --
<menu>+"+a - ç --
<menu>+,+c - ñ --
<menu>+~+n - ö --
<menu>+"+o - ø --
<menu>+o+/
Needs ~/.Xcompose set up:
- q̃ --
<menu>+~+q
Archaic forms
- ſ --
<menu>+f+s - Þ --
<menu>+T+H - þ --
<menu>+t+h - Ȝ --
CTRL-SHIFTwithu+021c+<ENTER> - ȝ --
CTRL-SHIFTwithu+021d+<ENTER>
Symbols
- © --
<menu>+o+c - ® --
<menu>+o+r - ™ --
<menu>+t+m - · --
<menu>+.+- - • --
<menu>+.+= - ¶ --
<menu>+p+! - § --
<menu>+s+o - ± --
<menu>+++- - ° --
<menu>+o+o - € --
<menu>+c+= - ¢ --
<menu>+c+/ - £ --
<menu>+l+- - ¥ --
<menu>+y+= - ÷ --
<menu>+-+: - ← --
<menu>+<+- - → --
<menu>+-+> - ≠ --
<menu>+/+= - ∅ (empty set) --
<menu>+{+}
Punctuation
- … --
<menu>+.+. - ¡ --
<menu>+!+! - ¿ --
<menu>+?+? - « --
<menu>+<+< - » --
<menu>+>+> - ‘ --
<menu>+<+' - ’ --
<menu>+>+' - “ --
<menu>+<+" - ” --
<menu>+>+" - – (en dash) --
<menu>+-+-+. - — (em dash) --
<menu>+-+-+-
Ligatures
- æ --
<menu>+a+e - œ --
<menu>+o+e - ff --
<menu>+f+f - fi --
<menu>+f+i - fl --
<menu>+f+l
Reference
Unicode input
To input any arbitrary Unicode character:
CTRL-SHIFTwithu+<Unicode Hex value>+<ENTER>
To do it with a combining tilde, such as for q̃:
-
CTRL-SHIFTwithu+0303+<ENTER>+q -
✝ --
CTRL-SHIFTwithu+271d+<ENTER> -
† --
CTRL-SHIFTwithu+2020+<ENTER>-- you probably want this one.
Chinese
There are different implementations of Chinese, depending on what you want. One is Chinese characters, the other is pinyin. Either one or the other or both can be added.
Chinese Characters
There are a lot of implementations for this. Here is an easy way.
Note: I'm using Openbox with an auto-login that runs startx, so this may
not be the most common way to set this up...
Install dependencies:
sudo apt install --no-install-recommends fcitx5 fcitx5-chinese-addons \
fcitx5-config-qt fcitx5-frontend-gtk3 fcitx5-frontend-gtk4 \
fcitx5-frontend-qt5 fonts-noto-cjk fonts-noto-color-emoji \
fonts-symbola fcitx5-table-emoji
Edit: ~/.xsessionrc, adding:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
export GLFW_IM_MODULE=ibus
Edit: ~/.config/openbox/autostart, adding:
fcitx5 -d &
Reboot (or restart Openbox) and then run this:
fcitx5-configtool.
In the right hand side of the window, select Pinyin.
Then hit Apply and Close.
To use it hit CTRL-SPACE to toggle between English and Chinese
characters. Start typing in pinyin and it will display a Chinese
character to add.
Pinyin
Edit ~/.XCompose, adding:
# ---- Pinyin tone marks: Multi_key <tone-number> <vowel> ----
# Tone 1: macron (ˉ)
<Multi_key> <1> <a> : "ā"
<Multi_key> <1> <e> : "ē"
<Multi_key> <1> <i> : "ī"
<Multi_key> <1> <o> : "ō"
<Multi_key> <1> <u> : "ū"
<Multi_key> <1> <v> : "ǖ"
<Multi_key> <1> <udiaeresis> : "ǖ"
# Tone 2: acute (ˊ)
<Multi_key> <2> <a> : "á"
<Multi_key> <2> <e> : "é"
<Multi_key> <2> <i> : "í"
<Multi_key> <2> <o> : "ó"
<Multi_key> <2> <u> : "ú"
<Multi_key> <2> <v> : "ǘ"
<Multi_key> <2> <udiaeresis> : "ǘ"
# Tone 3: caron (ˇ)
<Multi_key> <3> <a> : "ǎ"
<Multi_key> <3> <e> : "ě"
<Multi_key> <3> <i> : "ǐ"
<Multi_key> <3> <o> : "ǒ"
<Multi_key> <3> <u> : "ǔ"
<Multi_key> <3> <v> : "ǚ"
<Multi_key> <3> <udiaeresis> : "ǚ"
# Tone 4: grave (ˋ)
<Multi_key> <4> <a> : "à"
<Multi_key> <4> <e> : "è"
<Multi_key> <4> <i> : "ì"
<Multi_key> <4> <o> : "ò"
<Multi_key> <4> <u> : "ù"
<Multi_key> <4> <v> : "ǜ"
<Multi_key> <4> <udiaeresis> : "ǜ"
# Toneless ü (neutral tone): Multi_key v u -> ü
<Multi_key> <v> <u> : "ü"
<Multi_key> <u> <udiaeresis> : "ü"
/etc/default/keyboard must be set up as shown above.
Then reboot, or restart Openbox.
To type pinyin characters, do, for example:
- ē --
<menu>+1+e - é --
<menu>+2+e - ě --
<menu>+3+e - è --
<menu>+4+e
Where <menu> is your compose key (could be right Alt,
not Menu, for example, depending how you set up
/etc/default/keyboard).
License
This is placed in the public domain.
CC0 1.0 Universal
2025, 2026 Jeff Moe