Skip to content

Instantly share code, notes, and snippets.

@Menchen
Menchen / mac-alt-key.ahk
Last active September 5, 2024 16:18
AutoHotKey v2 script that simulate macOS's alt keys, only left alt are mapped, replace `<!` to `!` for both alt or `>!` for right alt
; this is a modification of the following Gist by Craig Patik: https://gist.github.com/patik/672d81b94195c418d855360529fe8008
; changes:
; - set tilde diacritic shortcut to "n" instead of "t"
; - update script to work with newer versions of AutoHotKey by replacing all instances of "VKC0SC029" by "sc029"
#UseHook
#Requires AutoHotkey v2.0
#SingleInstance Force
<!sc029::ActivateContext() ; grave -> the grave ` accent gave some probs, used the virtualkey + scancode instead