Missing special german characters on an english keyboard

Usually I am coding with English (US) keyboard layout, because the special characters are arranged in a better way as with german layout. But if I want to write messages in german, I am missing the special german chars (ä,ö,ü,ß). I don't want to switch languages everytime, because I am used to have the "y" key in the first row. I want to have an easy way to use special german chars like the key longpress on an Android device.
1 answer

Using AutoHotkey to support Key Long press in Windows

With the open source application AutoHotkey you can define hotkeys for the mouse and keyboard, remap keys or buttons and autocorrect-like replacements.

We want to use it to enable Long press on any key. If the key is pressed for a certain period of time, a defined character will be written, otherwise the regular character of the key will be used.

Here is an example of a script that changes the "-" key to the german "ß":

$-:: ;-------------------- Long press (> 0.5 sec) on "-" key
KeyWait, -, T0.5 ;-------- Wait no more than 0.5 sec for release (also suppress auto-repeat)
If ErrorLevel
{ ;----------------------- timeout, so long press
SendInput, {ASC 225} ;---- send special char using ASCII codes
KeyWait, - ;-------------- suppress sending another char at key release
Send {-} ;---------------- send regular char if no long press

You can repeat this for the keys "[", ";" and "'" to map the other german special characters.