1

If in OSX text input field pressing Option+[ will render , Option+' will render æ andOption+; will render .

Can I remap these to render å, ä and ö instead?

1

To make this work you have to use a third party tool: Karabiner.

I have a slightly different proposal for the å though:

In the example below holding the right option key enables the German keyboard layout. Just hold the right option key and type ' to get ä and ; to get ö. Releasing the right option key switches the layout back to en_US.

To get å simply use alt_lefta. Since both keyboard layouts use alta to get å you can even print å while alt_right is pressed -> alt_leftalt_righta prints å.

Prerequisites:

The en-US and the de-DE keyboard layout have to be enabled. The shortcut cmdspace mustn't be used elsewhere than "Switch to previous input source" but one may change this easily.

  1. Download, install and open Karabiner
  2. Open in the menulet Karabiner -> Preferences
  3. Open the tab Misc & Uninstall
  4. Hit the button Open private.xml
  5. Open the file private.xml with an appropriate editor
  6. Enter the customized keycode

    <?xml version="1.0"?>
    <root>
      <item>
        <name>Change input source temporarily</name>
        <item>
          <name>Change input source to German while you are holding down the right option key.</name>
          <identifier>remap.change_input_source_temporary_german_option_r</identifier>
          <autogen>
            __KeyToKey__
            KeyCode::OPTION_R,
            KeyCode::VK_NONE,
            Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CHANGE_INPUTSOURCE_GERMAN, KeyCode::VK_WAIT_100MS,
            Option::KEYTOKEY_AFTER_KEYUP, KeyCode::SPACE, ModifierFlag::COMMAND_L, KeyCode::VK_WAIT_100MS,
          </autogen>
        </item>
      </item>
    </root>
    
  7. Save the file

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

This may interfere with other uses of alt_rightkey!

2

Stumbled upon this post when trying to achieve the same mapping with Karabiner-Elements. The old "Karabiner" does not work with Sierra and above and have been replaced with Karabiner-Elements.

I managed to achieve the behaviour desired by original poster in Karabinier-Elements by adding the configuration below to karabinier.conf so I posted this as reference for others that stumble in here for same reason.

It is based on the "standard" way to enter umlaut characters with a US keyboard, e.g.
option+u, a => ä
option+u, o => ö
and
option+a => å

(in section "complex_modification" -> "rules")
"rules": [
       {"description": "left_option ['; to åäö",
        "manipulators": [
            {"type": "basic",
            "from": {
                "key_code": "open_bracket",
                "modifiers": { "mandatory": [ "left_option" ] }
            },
            "to": [
                {"key_code": "a",
                 "modifiers" : [ "left_option" ]
                }]
            },
            {
            "type": "basic",
            "from": {
                "key_code": "open_bracket",
                "modifiers": {
                "mandatory": [
                    "left_option",
                    "left_shift"
                ]
                }
            },
            "to": [
                {"key_code": "a",
                 "modifiers" : [
                 "left_option",
                 "left_shift"
                 ]

                }
            ]
            },

            {
            "type": "basic",
            "from": {
                "key_code": "quote",
                "modifiers": {
                "mandatory": [
                    "left_option"
                ]
                }
            },
            "to": [
                {"key_code": "u",
                 "modifiers" : [
                 "left_option"
                 ]
                },
                {"key_code": "a"}
            ]
            },
            {
            "type": "basic",
            "from": {
                "key_code": "quote",
                "modifiers": {
                "mandatory": [
                    "left_option",
                    "left_shift"
                ]
                }
            },
            "to": [
                {"key_code": "u",
                 "modifiers" : [
                 "left_option"
                 ]
                },
                {"key_code": "a",
                 "modifiers" : [ "left_shift" ]}
            ]
            },

            {
            "type": "basic",
            "from": {
                "key_code": "semicolon",
                "modifiers": {
                "mandatory": [
                    "left_option"
                ]
                }
            },
            "to": [
                {"key_code": "u",
                 "modifiers" : [
                 "left_option"
                 ]
                },
                {"key_code": "o"}
            ]
            },

            {
            "type": "basic",
            "from": {
                "key_code": "semicolon",
                "modifiers": {
                "mandatory": [
                    "left_option",
                    "left_shift"
                ]
                }
            },
            "to": [
                {"key_code": "u",
                 "modifiers" : [
                 "left_option"
                 ]
                },
                {"key_code": "o",
                 "modifiers" : [ "left_shift" ]}
            ]
            }
        ]
        }] // end "rules"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .