Danish and other special characters with Ubuntu Linux on MacBook Pro

For a while I’ve been using Ubuntu Linux on my MacBook Pro. As a developer, or just someone who likes to be able to use standard keyboard commands in many applications, I find it convenient to use the English keyboard layout, even though the keyboard is fact Danish.

So, until nowm I had to switch between Danish and English keyboard when ever I wanted to use Danish special characters, Æ, Ø and Å. While it is indeed very easy to switch keyboards in Ubuntu, it kept confusing me because I would often forget which layout I was currently using, so I wanted to find a way to map some special typing to those Danish characters.

And today I found an article that describes a way, right here: https://en.wikipedia.org/wiki/Compose_key#Common_compose_combinations

There are few things to add to this, and again, this guide is specifically for MacBook (Pro) running Ubuntu Linux using English keyboard layout, although it may also work for others.

  1. Open the keyboard configuration (cmd, then ‘keyboard’, then enter)
  2. Choose ‘Typing’ in the left pane
  3. Select a compose key (I chose ‘Right Win’ which is the cmd key to the right of the space bar)

You are now ready to type Danish characters according like this:

æ: Press and hold the compose key, then type ‘a’ (you can release the compose key now or keep it down) followed by ‘e’

ø: Same as above, just using the keys ‘/’ and ‘o’

å: Same as above, just using ‘a’ and then ‘a’ again

Æ: Press and hold Shift in addition to the compose key, then type ‘a’ followed by ‘e’ (keep Shift pressed. Compose key may be released after typing ‘a’)

Ø: Press and hold the compose key, then type ‘/’. You may now release the compose key, but you can also keep it pressed. Then type ‘O’ (capital because of pressed Shift key)

Å: Press and hold Shift in addition to the compose key, then type ‘a’. followed by ‘a’ again (keep Shift pressed. Compose key may be released after typing ‘a’).