wiki:ScandinavianOnAmericanKeyboard

Scandinavian characters on American keyboard

I love my American keyboard. But how can I use it and still spell names such as Häkkinen and Jönsson correctly. Even more I would love to spell Swedish words such as "höra" correctly. Just skipping the dots looks so ugly.

There are probably many solutions to this problem. Here follows one, in which Scandinavian letters such as å, ä, ö, æ, ø (as well as é, è, and ë) are mapped on the number pad. If you simply want to switch between American and Swedish mapping see Simpler version below.

We toggle the keyboard between two modes: normal and Scandinavian. There is a file in the repository called xmodmaptoggle. Copy the file to your home directory

cp /path/to/zanzibar/misc/xmodmaptoggle ~/.xmodmaptoggle

and then you can simply toggle the keyboard mode by

xmodmap -pke | awk -f ~/.xmodmaptoggle | xmodmap -

or create an alias, e.g., in file '.alias'

echo "alias keytoggle=\"xmodmap -pke | awk -f ~/.xmodmaptoggle | xmodmap - \"" >> .alias

and you can simply issue 'keytoggle'.

Simpler version

If you want a Swedish keyboard issue

setxkbmap se

in a terminal. If you instead fancy an American version you issue

setxkbmap us

It's as simple as that.

Last modified 10 years ago Last modified on Dec 19, 2007, 10:06:48 PM