Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Robert-Beier/7b7b0a152fcb17bfcebc8bb12e142638 to your computer and use it in GitHub Desktop.
Save Robert-Beier/7b7b0a152fcb17bfcebc8bb12e142638 to your computer and use it in GitHub Desktop.
AutoHotkey script allowing the English International keyboard shortcuts for umlaute (ä, ö, ü) and eszett (ß) on windows
; Alt+S -> ß
!s:: Send ß
return
; Alt+U followed by A -> ä
; Alt+U followed by Shift+A -> Ä
; Alt+U followed by O -> ö
; Alt+U followed by Shift+O -> Ö
; Alt+U followed by U -> ü
; Alt+U followed by Shift+U -> Ü
!u::
Input, key, L1
if (key = "a")
{
if (GetKeyState("Shift", "P"))
{
Send Ä
}
else
{
Send ä
}
}
else if (key = "o")
{
if (GetKeyState("Shift", "P"))
{
Send Ö
}
else
{
Send ö
}
}
else if (key = "u")
{
if (GetKeyState("Shift", "P"))
{
Send Ü
}
else
{
Send ü
}
}
return
@Robert-Beier
Copy link
Author

Robert-Beier commented Aug 2, 2023

Disclaimer: This script doesn't include the whole implementation of the English International Mac keyboard layout for windows. Only the parts I need.

I was annoyed by having to switch between the German and US keyboard layout on Windows. I didn't find any solution on Windows that is as elegant as the solution on Mac.

I personally also include the following part at the end of the script to make the < (>) key between my left shift key and my Y key become a ` (~) key like on the English International Mac keyboard.

; SC056 (key between left shift and y, doesn't exist on every keyboard) key prints ` and Shift+SC056 prints ~
SC056::Send ``
+SC056::Send ~
return

Now I can finally type in peace ☺

@mbinna
Copy link

mbinna commented Aug 4, 2023

Should the return on line 3 be removed?

image

@Robert-Beier
Copy link
Author

@mbinna Your screenshot with the error message is referring to another script.
AFAIK the return statement in line 3 should stay. In the examples from the documentation they also add a return statement after every Hotkey -> Send block.

@mbinna
Copy link

mbinna commented Aug 9, 2023

Your screenshot with the error message is referring to another script.

I had some additional settings at the top of my script. I removed them and don't get the warning anymore. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment