User Tools

Site Tools


compose

This is an old revision of the document!


Compose foreign characters on Linux

If you need to add an umlaut (á) or eñe (ñ) to a character you can do so easily. First you need to make a change to your keyboard map. The following script will do that.

cat >~/.Xmodmap <<EOF
clear Lock
keycode 0x42 =  Multi_key       Mode_switch
EOF
xmodmap .Xmodmap

Once you've executed this script you may put the following in your .bashrc if you are running bash or whatever startup script you use for your shell. Note that this changes the function of the caps lock key, which may be considered a good thing.

xmodmap .Xmodmap

Once you have executed xmodmap you can create all sort of things by pressing and releasing the caps lock key, pressing a symbol followed by a letter. Here's a list of some of the characters that can be created: <CL> = cap lock

<CL>,CÇ
<CL>~nñ
<CL>UÜ
<CL>/oø
<CL>/oØ
compose.1644487633.txt.gz · Last modified: 2022/02/10 11:07 by admin