Linux how-to: ‘Shifting’ to a secondary keyboard layout.

The Danish language makes use of two letters [åÅ] and [øØ] which are not on the Icelandic keyboard.
I’ve tried to learn the Danish layout but I kept making errors and had a hard time remembering where symbols like ‘+<>;:!”#$%&/()=@ are located.
Having to switch permanently between keyboard layouts all the time with key combinations (Windows way of doing things) such as alt+shift is tiresome!
I was making too many typos and to many errors, I guess my muscle memory is just too strong!
It turns out that there’s a very easy way to make use of the Danish layout on Linux.
I never use the CAPS-LOCK key so I configured it to act a SHIFT-to-Danish-layout-while-pressed key!
Here is how:

ð is located on the Icelandic layout where å is to be found on the Danish layout.
‘ is located where ø is to be found.
CAPS+ð makes å
CAPS+shift+ð makes Å
CAPS+’ makes ø
CAPS+Shift+’ makes Ø
Beeing able to type on my native keyboard layout, using the Danish letters when needed means no learning curve, no confusion and no evil typos!
I believe this is something Microsoft Windows does not have.

6 Replies to “Linux how-to: ‘Shifting’ to a secondary keyboard layout.”

  1. Wow! just wow!,
    I never bothered to check on the keyboard preferences because I thought it was similar to the windows one where the only settings you can find are keypres speed related settings.
    In my case I set the thing up to alt+shift as in Windows because I’m used to that.
    Many thanks for your post! So useful!

  2. Why not define a Compose key? That lets you type a whole range of Unicode characters with just a few keystrokes. For instance, compose-o-a = å, compose-o-A = Å, compose-o-slash = ø, compose-O-slash = Ø. Plus lots of typographic niceties like compose-lessthan-doublequote = “, compose-greaterthan-doublequote = ”, compose-minus-minus-minus = — etc.
    I use caps lock as my Compose key, since I don’t need it for anything else.

  3. Thanks for the tip. As an Icelander living in Denmark, it feels great to be able to type my name correctly on my work computer.

Leave a Reply