Swedish letters on ANSI keyboards

As somewhat of a "keyboard enthusiast", I am occasionally forced to use a keyboard with an ANSI layout, which is clearly inferior to the ISO layout:

  1. It is missing a whole key:
  2. One key is located all the way to the right, further away than any other key, making it very hard to press:

Furthermore, the ANSI (US) layout is missing the Swedish letters å, ä and ö. On this page, I collect various ways of solving these problems:

  1. Adding å, ä and ö to the US layout
  2. Modifying the Swedish layout
  3. Other methods

As an extra note, if you're not familiar with the Swedish/Finnish layout, here is a picture. Note the extra key next to the left Shift key, as well as the key placement around the Return key:

Keyboard with Swedish/Finnish layout.

Adding å, ä and ö to the US layout

The most obvious approach is to start with the US layout and add the necessary Swedish letters to it.

Approach 1

One approach is to put these letters on the [{, ]} and \| keys, relegating the original characters to a layer accessed by holding Right Alt. This can be done using the following AutoHotkey code:

>!SC01A::SendInput, [
>!SC01B::SendInput, ]
>!SC02B::SendInput, \
>!+SC01A::SendInput, {{}
>!+SC01B::SendInput, {}}
>!+SC02B::SendInput, |

This method has two drawbacks:

On the other hand, å, ä and ö have not always been located at those positions. On typewriters, it is common to see them in a straight line to the right of the m key, where the comma, period and hyphen are located on the modern Swedish layout.

Furthermore, there are several great benefits of the above approach:

To me, the correspondence between the key cap legend and the typed character is very important, even though I touch type.

Approach 2

Added on 16 Dec 2021.

The problem with approach 1 is that the Swedish letters are very far away, especially the ö key. An alternative, more ergonomic approach is to use combinations of aa, ae and oe to type the corresponding Swedish letters.

One might use AutoHotkey's built-in "hotstrings" feature for this, but there are a number of issues with it. It is much better to implement the functionality yourself:

o::Combine("o", {})
+o::Combine("o", {})
e::Combine("e", {a: "ä", o: "ö"})
+e::Combine("e", {a: "ä", o: "ö"})
a::Combine("a", {a: "å"})
+a::Combine("a", {a: "å"})
`::Combine("``", {a: "à"})
'::Combine("'", {e: "é"})
Combine(original, keys){
global shiftPrev
shift := GetKeyState("CapsLock", "T") ? !GetKeyState("Shift")
: GetKeyState("Shift") or GetKeyState("CapsLock", "T")
for prior, replacement in keys
if(A_PriorKey == prior){
StringUpper, replacement, replacement
SendInput, {Shift Down}{Left}{Shift Up}%replacement%
goto done
StringUpper, original, original
SendInput, % original
shiftPrev := shift ; May be used by next call.

Modifying the Swedish layout

Another approach is to use the Swedish/Finnish layout in the operating system, with a couple of modifications. The following AutoHotkey code represents a couple of such modifications:

*<^>1::SendInput, §
*<^>!::SendInput, ½

Here is a summary of the changes:

  1. The §½ key, which I very rarely use, is remapped in order to replace the lost <>| key. The original characters are available via AltGr on the adjacent 1! key. Unfortunately, the §½ key is not very close to the <>| key, but at least it is still on the same side of the keyboard.
  2. The ¨^~ and '* keys are swapped. I use the '* key very often, and it is extremely annoying to have it all the way to the right.

This approach has a couple of advantages:

However, it also has a significant disadvantage:

Other methods

Last updated on 16 Dec 2021; before that on 21 Dec 2020.

© 2020–2021 John Ankarström. Up