Compose key with æ, ø, å I need quick access to the Danish letters æ, ø, å while using the US keyboard-layout in OS X (I it slow to change keyboard layout all the time, my MBA has a Danish keyboard).

I want to use right-alt (option) as the compose key, so I can get "ø" by typing r-alt-/-o and similar.

I have consulted an earlier question but it is not clear if this gives me access to the Danish letters and I don't have a Linux installation to get configuration files from.

Is there a another/newer/easier way to do it with Karabiner/Seil etc.?
To make this work you have to use a third party tool: Karabiner.

In the example below holding the right option key enables the Danish keyboard layout. To type æ, ø, å just hold the right option key and use the original keys printed on your physical (Danish) keyboard. Releasing the right option key switches the layout back to en_US.

Prerequisites:

The US-English and the Danish keyboard layout have to be enabled. The shortcut cmdspace mustn't be used elsewhere than "Switch to previous input source".


Download, install and open Karabiner
Open in the menulet Karabiner -> Preferences
Open the tab Misc &amp; Uninstall
Hit the button Open private.xml
Open the file private.xml with an appropriate editor
Enter the customized keycode

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
  &lt;item&gt;
    &lt;name&gt;Change input source temporarily&lt;/name&gt;
    &lt;item&gt;
      &lt;name&gt;Change input source to Danish while you are holding down right option key.&lt;/name&gt;
      &lt;identifier&gt;remap.change_input_source_temporary_danish_option_r&lt;/identifier&gt;
      &lt;autogen&gt;
        __KeyToKey__
        KeyCode::OPTION_R,
        KeyCode::VK_NONE,
        Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CHANGE_INPUTSOURCE_DANISH, KeyCode::VK_WAIT_100MS,
        Option::KEYTOKEY_AFTER_KEYUP, KeyCode::SPACE, ModifierFlag::COMMAND_L, KeyCode::VK_WAIT_100MS,
      &lt;/autogen&gt;
    &lt;/item&gt;
  &lt;/item&gt;
&lt;/root&gt;

Save the file
Open in the menulet Karabiner -> Preferences the tab Change Key
Hit the ReloadXML button
Enable the remapping. It should be listed at the beginning.