Tuesday, January 12, 2010

Compose Key


I often need to type characters that aren’t on the keyboard, like € ½ ÷ © ¥ or ¢.

compose key to the rescue.

pick a key on your keyboard you don’t use much, like [Insert], [CapsLock], or [menu], and make it the “compose key”.

Then to make any character, you just hit the compose key, then type the two obvious keys that, when combined, make up the character.

For example:

* To get €, just type e then =

* To get ©, just type o then c

* To get ® just type o then r

* To get £, just type L then -

* To get ¥, just type Y then =

* ¢ is c then |

* ÷ is - then :

* ½ is 1 then 2

* ¼ is 1 then 4

* ñ is n then ~

By default this function is not assigned to any key. You can tell the X server what key to use for this function with the following command
setxkbmap -option compose:keyname

for example

setxkbmap -option compose:caps

to assign it to the caps-lock key.

or setxkbmap -option compose:rwin

to assign your right "Windows" key
to make it persisistent after a reboot simply insert the command in your
/etc/rc.local file