If you are like me from Germany, but used to writing on a EN-US or EN-GB keyboard layout, you probably ran into the problem of writing special characters like “ä”, “ü” or “ß”.
This is why I searched for a more simple solution then changing the layout with WIN+SPACE frequently.

For me the best solution was an AutoHotkey script. AutoHotkey is great for several reasons:

  • It can be interpreted or compiled and used as an executable (ok, this has also security implications, but let’s ignore them for this post)
  • It is extremely easy to learn and to write but also has the tools for complex scenarios
  • It has a great community to help out

You can find the download and more information on their official site: AutoHotkey Website

So first I wrote down the characters I frequently use:

  • ä/Ä
  • ü/Ü
  • ö/Ö
  • ß

Then I searched for a shortcut that has the least possible overlap with the programs I use daily like VSCode and the Office suite.
For me this combination was Ctrl + Alt + {letter}. Where the letter is u for ü, o for ö, etc..
It was only intuitive to choose the same combination just with the addition of Shift for uppercase.

This is what the basic AHK script looked like:

umlauts.ahklink
1
SetTimer,UPDATEDSCRIPT,1000
2
UPDATEDSCRIPT:
3
FileGetAttrib,attribs,%A_ScriptFullPath%
4
IfInString,attribs,A
5
{
6
FileSetAttrib,-A,%A_ScriptFullPath%
7
SplashTextOn,,,Script was updated,
8
Sleep,500
9
Reload
10
}
11
Return
12
#SingleInstance, Force
13
14
OSD(text)
15
{
16
#Persistent
17
Progress, hide x1050 Y900 b1 w150 h27 zh0 FM10 cwEEEEEE ct111111,, %text%, AutoHotKeyProgressBar, Verdana BRK
18
WinSet, TransColor, 000000 120, AutoHotKeyProgressBar
19
Progress, show
20
SetTimer, RemoveToolTip, 1000
21
Return
22
RemoveToolTip:
23
SetTimer, RemoveToolTip, Off
24
Progress, Off
25
return
26
}
27
28
RAlt & a::
29
{
30
If GetKeyState("Ctrl","P")
31
		If GetKeyState("Shift","P")
32
			Send Ä
33
		else
34
			Send ä
35
return
36
}
37
38
RAlt & u:: 
39
{
40
If GetKeyState("Ctrl","P")
41
		If GetKeyState("Shift","P") 
42
			Send Ü
43
		else
44
			Send ü
45
return
46
}
47
48
RAlt & o:: 
49
{
50
If GetKeyState("Ctrl","P")
51
	if GetKeyState("Shift","P")
52
		Send Ö
53
	else
54
		Send ö
55
return
56
}
57
58
RAlt & s:: 
59
{
60
If GetKeyState("Ctrl","P")
61
	Send ß
62
return
63
}
64
65
RAlt & e:: 
66
{
67
If GetKeyState("Ctrl","E")
68
	Send €
69
return
70
}
71
72
RAlt & F7::
73
Send {Media_Prev}
74
return
75
76
RAlt & F8::
77
Send {Media_Next}
78
return
79

The first part of the script is mainly for testing and developing of the AHK script. You probably don’t need it, once you are finished.
The OSD(text) part from line 14 onwards is mainly for testing and using media buttons and emulating OSD’s. Just drop it, if you don’t need media interaction.
I also added some AutoHotkey shortcuts for media buttons starting at line 72 (next/previous track).

If you need additional special characters, just use the existing ones as template, save the script and be more productive!

If you need the script at startup, just take the compiled exe and throw it in you “Startup” folder at shell:startup.