惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
S
Security Affairs
T
Tor Project blog
T
Threatpost
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
A
Arctic Wolf
K
Kaspersky official blog
O
OpenAI News
Spread Privacy
Spread Privacy
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
Simon Willison's Weblog
Simon Willison's Weblog
雷峰网
雷峰网
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
量子位
博客园_首页
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
S
Schneier on Security
博客园 - 叶小钗
Attack and Defense Labs
Attack and Defense Labs
AI
AI
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 【当耐特】
Jina AI
Jina AI
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
D
Darknet – Hacking Tools, Hacker News & Cyber Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
H
Hacker News: Front Page
The Last Watchdog
The Last Watchdog
V
V2EX
S
SegmentFault 最新的问题
V
Visual Studio Blog
PCI Perspectives
PCI Perspectives
Microsoft Security Blog
Microsoft Security Blog

Comments for Hackaday

AI The Truly Environmentally Friendly Way News Sites Are Blocking Internet Archive Over AI Scraping Fears How The 2020s Chip Crisis Led To A Buggy Saleae Analyzer In 2026 Evidence For Water Vapor Plumes On Europa Vanishes In Re-Analysis Mechanical Stability For Your Coils 3D Printed Hose Sprayer Sets Phasers To Suds The Merits Of Comment-Driven Development As Counterweight To TDD Building A Desktop Catalytic Cracker Process 4 Billion Pixels Per Second From 16 DIY Cameras For The Best V-Tubing Rig Ever An Unlikely Host For An 8080 Emulator Using Brand New NiMH Cells After Sitting 12 Years Unused Investigating The S3 Virge’s Reputation As A 3D Decelerator Card As It Turns Out, There’s More Than One Cassette Mechanism Being Made After All Using Windows 11 On An LGA 775 PC With AGP Videocard An Ethernet WiFi Router on a Pi Pico 2W This Week In Security: Messing With AI, 7Zip And Notepad++ Vulnerabilities, HTTP2 Bomb, And More Using Electrolysis For More Than Just Generating Hydrogen Vintage Turntable Gets Brain Transplant And Home Assistant Integration Connecting Your Car To Home Assistant Microsoft Claims 20 Second Qubits If You Want To Hack Me, Come In Through The Speaker Ways To Embed Magnets In 3D Prints And Not Ruin Printers An RGB Keyboard For Your Hackaday Communicator Badge Ask Hackaday: How Do You Feel About Electronic Shelf Labels? Make Your Ceiling Disappear With ADS-B And Short-Throw Projector Fixing A Nintendo Game Boy Clone That Runs Too Fast Web-Based Control For A CB Radio Distilling Stale Gasoline To Make It Usable Again DIY Ceramic Circuit Boards Surely Count As Solarpunk Texas Instruments Changes The NE5532 And Others Into Incompatible Versions Deltarune’s Tenna Brought To Life Linux Fu: Fake Webcams, GUI Edition Hydraulic Drive For Your Lawn Tractor But Just What Is This ‘Artificial Intelligence’? A Diffraction Grating Makes This Clock Readable Turning An Old 3D Printer Into A Vinyl Cutter For Cheap A High-Vacuum Controller For An Eventual Electron Microscope Does Your Terminal Speak Morse? This One Does From Scrappy Pallet Wood To Fancy Tea Tray The 2026 EMF Badge Arrives, With An Add-On. As Expected, It’s Familiar Linux Fu: Taming Strace STM32 Handheld Has OpenGL And All The Classics Jenny’s Daily Drivers: Microsoft Windows 11 Using A Mirror To 3D Scan Both Sides Of An Object At Once Cookies, Baked The 3D Printer Way Restoring Apple’s Terrible But Awesome IBook Laptop After The Dust Settles: Building Pebble Apps Bilingual E-paper News Feed Helps Brush Up Language Skills On The Wisdom Of Replacing A NiMH Module In A Prius Battery Pack Know Your Food: Cheesemaking Like A Wire Bender, But For Pop Tubes Revisiting Making Your Own Internet Router In 2026 Classically-named Argus Robot Is Terminator Meets Tumbleweed Making a Zippy FDM Printer out of Wood Off-Grid OCR Server Powered By IPhone Hackaday Links: May 31, 2026 Comment on A Special Type of Mower For Rocky Fields by Chris Maple 4-bit Relay Logic Counter Begs To Have Its Buttons Pushed Loading Sega Genesis Games Off A Vinyl Record Ebike Display Uses Reflective LCD Modern Graphics Via DisplayLink For Your ISA-Era PC The Final Steps To A Sub-Minute Benchy Poking Around With JTAG On A Guitar Amp Keychain GameCube Controller Made Functional Breaking Enigma With An FPGA, Just Like At Bletchley Park The Uncooperative Mirror Will Not Help You Testing Various Ways To Waterproof FDM Printed Parts Cheap Yellow Display With Boosted PSRAM Turned Snazzy Emulator Station It’s Another Pi Handheld. But It’s A Really Good One Take The Reins Of This Unique Controller Be Your Own Oil Company With Desktop Fischer-Tropsch Process ESP-Osito Eschews Retrocomputing For Modern Code On Modern, Equivalent Hardware A Modern Web Browser For Classic Mac OS Hackaday Podcast Episode 371: Space Computers, Spy Phones, And So Long CHU This Week In Security: Ubiquiti Fixes, And FreeBSD Joins The Club You Don’t Want To Join When Is An Apple Laptop Not A Macbook? When It’s An Apple II Linux Distributions And Who Is Responsible For The Software Autopsy Of A Failed Vintage Carbon Resistor Hunting Submarines Via Gravity Is A Tough Errand So Long, CHU, And Thanks For All The Time Signals A Bicycle Built On An Italian Renaissance Tech Base Linux Fu: The Bluetooth Regression Remember When Flash Drives Were Going To Make Your PC Faster? Putting Version 7.1 Of The Direct Granules FDM Extruder Through Its Paces Tech In Plain Sight: The Mechanics Of String Trimmers Between-Device Sharing Still Sucks Salvaged VFDs In Nixie-Like Clock Mod This IKEA Lamp Into Smart Lighting For Not A Lot Building And Testing A Turbine Driven Hydro Generator Tearing Down Walmart’s $12 Keychain Camera Biohack Your Way To Lactose Tolerance (Through Suffering) Liberating AirPods With Bluetooth Spoofing It’s Hard To Make A (Good) Oscillator Rudolph’s Sleigh On A North Pole PCB This Typewriter Types Toast Beating Bitlocker In 43 Seconds Using An Old Smartphone In Place Of A Raspberry Pi Working Model Reveals Amazing Engineering Of Webb’s Mirror Actuators Electric Vehicle 1900’s Style: New Leases On Old Tech Forth: The Hacker’s Language
Linux Fu: Compose Yourself!
Nick · 2026-06-15 · via Comments for Hackaday

Our computers can display an astonishing range of symbols. Unicode alone defines more than 150,000 characters, covering everything from mathematical operators and phonetic alphabets to emoji and obscure historical scripts. Our keyboards, on the other hand, remain stubbornly limited to a few dozen keys.

On Windows, the traditional workaround involves memorizing numeric codes or digging through character maps. Linux, being Linux, offers something far more flexible: XCompose. It’s one of those powerful, quietly brilliant features that’s been around forever, works almost everywhere, and somehow still feels like a secret.

XCompose is part of the X11 input system. It lets you define compose sequences: short key sequences that produce a Unicode character. Think of it as a programmable “dead key” system on steroids. This can be as simple as programming an ‘E’ to produce a Euro sign or as complex as converting “flower” into a little flower emoji. Even though the system originated with X11, I’ve been told that it mostly works with Wayland, too. So let’s look deeper.

Starting XCompose

The secret is the Compose or Multi-key. You press it to essentially escape into XCompose mode, so when you type “flower”, it knows you don’t want to insert those literal letters in. You can pick which keyboard key is your compose key in your system settings. The Right Alt or Ctrl key is a common choice. I use my Caps Lock key, since I never really use it for anything else.

You can set the Compose key in other ways, too, including in ~/.XCompose, but it is usually easier to set it in the system settings. However, ~/.XCompose is one place you can set up custom rules.

By default, though, you should have some useful combos. For example, <Compose> ' e it should give you é and <Compose> " o should give you ö. The default rules are in /usr/share/X11/locale/*/Compose, where the * is your locale of choice.

Customize

The defaults usually cover a lot of ground. But you may want to define your own. You can do that by creating or editing ~/.XCompose. This file can contain rules or include other rule files. I have heard, however, that Wayland doesn’t do includes, so if you use that, it is something to keep in mind.

The file format is simple enough, with each line being a definition:


<Multi_key><a><e> : "æ"

Don’t make the mistake of trying to write something like <@>. All the special characters need the names from X11’s keysymdef.h file like <at> or <asterisk>.

When you make a custom file, you’ll usually start with:

include "%L"

This tells the system to load the defaults for your locale. You can also use %H for your home directory or %S for the system directory. When using some systems, you may have to include “/%L” instead.

Formally, the configuration line looks like this:

<EVENT>... : <RESULT>  # comment

The <EVENT> allows you to not only specify keys but also modifiers that must be or must not be present. The <RESULT> can be a string or a character, and you can even insert an octal or hex number to be sure you get the key you want. For more, read the man page.

It is worth noting that any definition you provide will override the system ones, so if you don’t like something, it is easy to redefine it to something else. One nice thing is that the result doesn’t have to be a single character. You can use an entire string system. So:

<Multi_key> <c> <q> : "CQ de WD5GNR K"

As far as I know, there’s no way to embed a newline in the result that always works. You can try using something like \xa, for example, but \n doesn’t work. Also, no substitutions work on password/PIN entry, and that’s by design.

Why Build Your Own?

You can build up strings that make sense to you. But you know someone’s already done it. The repo has a core file of interesting definitions and some extra ones, too. My suggestion: don’t use their install function, which only gives you the core. Just create your own file like this, adjusting for wherever you put the files:

include "%L"

include "/home/xxx/xcompose/dotXCompose"
include "/home/xxx/xcompose/frakturcompose"
include "/home/xxx/xcompose/emoji.compose"
include "/home/xxx/xcompose/modletters.compose"
include "/home/xxx/xcompose/parens.compose"

Keep in mind that when you change this file, it will only apply to GUI apps you started after the change. Try <Compose> : ) to get ☺among others.

And if you don’t like that collection, there are others.

Some Common Use Cases

Music? Try ♭ (#b) or ♯ (##). You can even make notes like ♪ (#e). Prefer math? How about ≠ (/=) or a square root symbol √ (v/). If your math runs more to accounting, you can write about Euros (€ – =E) or Yen (¥ – =Y). Hams will appreciate /O which produces Ø (note, that is an upper case O on the input).

There are plenty of other ones, too. The best way to know is to look in the files you are using and experiment.

<Multi_key> <3> <3> : "¯\_(ツ)_/¯" # Shrug

It is easy to code up things like your name, your e-mail address, and more. Since you can use names instead of cryptic keystrokes, it is much easier to use. For example, I forget that my name is on Macro+F5, but <Compose>@name is easy to remember. I find it makes it easy to remember if I prefix all (or most of ) my personal commands with some character like “@.” So I might have @name, @add, @tel, and @email, for example. Just don’t forget, the actual rules have to use the key names:


<Multi_key><at><n><a><m><e>:"Al Williams"

Some applications, notably GTK apps, won’t work with XCompose without some tweaking. In particular, you may need to override the default input method. If this problem bites you, a quick search for “XCompose and GTK” should give you some advice. There’s always a chance your app, or even some input fields in your app, won’t work with XCompose. That’s life.

What It Isn’t

Keep in mind that XCompose only works in the GUI. It isn’t context-aware. It doesn’t allow you to insert multiple lines. If you need scripting and other advanced features, this isn’t the right place to be. Want to just map keys sometimes? You can do it, but not with this tool.

But for nearly universal keyboard remappings, it works quite well, once you get used to the syntax. Have a favorite line in your .XCompose? Share it in the comments!