Swedish characters using US keyboard

Troy tjk at tksoft.com
Thu Oct 4 06:14:10 PDT 2007


I see a problem with using Alt+ combinations in that many 
window managers and applications use those combinations. 

There are many ways to solve this problem, but let me recommend one
which might be a bit more reliable than the Alt key one. 

Basically, assign adiaeresis, odiaeresis and aring to those letters'
3rd level group (aring to a, adiaeresis to e and odiaeresis to o).

Write your own ~/.Xmodmap file which is processed by xmodmap when 
you log on (you have to make sure your start-up scripts do this).
Enter the following lines there:

keycode 26 = e E adiaeresis Adiaeresis
keycode 38 = a A aring Aring
keycode 32 = o O odiaeresis Odiaeresis

You can test the settings with the following commands:
xmodmap -e "keycode 26 = e E adiaeresis Adiaeresis"
xmodmap -e "keycode 38 = a A aring Aring"
xmodmap -e "keycode 32 = o O odiaeresis Odiaeresis"

(If you are wondering about "keycode," you can find out the 
keycode generated from a key on your keyboard with xev.)

Once you have these set up, you need to access the 3rd level
keys where you assigned the keys. In practice, this depends on your 
system setup. Many systems have a GUI for setting this up. 
A typical key combination would be CTRL+space (not w/o its problems,
but it's fast to use) or the Alt-Gr key. In other words, whenever you 
need to enter a third level letter, switch the level first, and then
enter the key. Depending on whether you have the switch key change
the level permanently, or only while the key is pressed, you might
have to switch back once you are done.

If you are actually used to a Finnish/Swedish keyboard, you probably
prefer to assign the above letters to "[" for aring, ";" for adiaeresis,
and "'" for odiaeresis.

Anyway, good luck.

Troy Korjuslommi
Kotoistus keyboard project (www.kotoistus.fi)
tjk at tksoft.com

More information about the xorg mailing list