Last active
August 2, 2023 09:45
-
-
Save Robert-Beier/cbb623a600d7abfc8ceb4c36d2ae9395 to your computer and use it in GitHub Desktop.
(outdated) Script for AutoHotkey to write german umlaute(ä, ö, ü) and eszett (ß) on US Keyboard on Windows like on MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
!u::Return ; umlaut | |
!s::SendInput % "ß" | |
*u::umlaut("u","ü","Ü") | |
*a::umlaut("a","ä","Ä") | |
*o::umlaut("o","ö","Ö") | |
umlaut(regular,umlautOption,umlautShiftOption) { | |
if (A_PriorHotKey = "!u" && A_TimeSincePriorHotkey < 2000) { | |
if (GetKeyState("Shift")) { | |
SendInput % umlautShiftOption | |
} else { | |
SendInput % umlautOption | |
} | |
} else { | |
if (GetKeyState("Shift") or GetKeyState("Capslock","T")) { | |
SendInput % "+" regular | |
} else { | |
SendInput % regular | |
} | |
} | |
} | |
^u::Send ^u | |
^!u::Send ^!u | |
^#u::Send ^#u | |
^+u::Send ^+u | |
!#u::Send !#u | |
!+u::Send !+u | |
#u::Send #u | |
#+u::Send #+u | |
^a::Send ^a | |
^!a::Send ^!a | |
^#a::Send ^#a | |
^+a::Send ^+a | |
!a::Send !a | |
!#a::Send !#a | |
!+a::Send !+a | |
#a::Send #a | |
#+a::Send #+a | |
^o::Send ^o | |
^!o::Send ^!o | |
^#o::Send ^#o | |
^+o::Send ^+o | |
!o::Send !o | |
!#o::Send !#o | |
!+o::Send !+o | |
#o::Send #o | |
#+o::Send #+o |
Awesome, thank you! 🥳
Can you make it like this?
AltGr + a -> ä
AltGr + u -> ü
AltGr + o -> ö
AltGr + Shift + a -> Ä
...
AltGr + s -> ß
Would be wonderful! :)
@JulianWagn3r I'm taking some time off right now and don't have the time to do that currently, sorry.
I just published a cleaner version of the script here: https://gist.github.com/Robert-Beier/7b7b0a152fcb17bfcebc8bb12e142638
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AltGr + u, a -> ä
AltGr + u, u -> ü
AltGr + u, o -> ö
AltGr + u, Shift + a -> Ä
...
AltGr + s -> ß