AHK (AutoHotKey) Scripts to emulate Mac Keybindings on Windows

Prerequisites (Legacy)

Environment Setup (new Workflow as of 2023-08-17)

  • Get VSCode Extention: mark-wiemer.vscode-autohotkey-plus-plus
  • Download AHK V1 and V2 Zips from https://www.autohotkey.com/download/
  • Download https://github.com/AutoHotkey/Ahk2Exe/releases/latest
  • I use the base path: C:\Users\xcg5545.cmder\opt.autohotkey-manual
  • Extract all three things to this base folder
  • Copy the vscode config below and update the paths according to your base path:
    "ahk++.file.interpreterPathV1": "C:\\Users\\xcg5545\\.cmder\\opt\\.autohotkey-manual\\AutoHotkey_1.1.37.01\\AutoHotkeyU64.exe",
    "ahk++.file.interpreterPathV2": "C:\\Users\\xcg5545\\.cmder\\opt\\.autohotkey-manual\\AutoHotkey_2.0.5\\AutoHotkey64.exe",
    "ahk++.file.helpPathV2": "C:\\Users\\xcg5545\\.cmder\\opt\\.autohotkey-manual\\AutoHotkey_2.0.5\\AutoHotkey.chm",
    "ahk++.file.helpPathV1": "C:\\Users\\xcg5545\\.cmder\\opt\\.autohotkey-manual\\AutoHotkey_1.1.37.01\\AutoHotkey.chm",
    "ahk++.file.compilerPath": "C:\\Users\\xcg5545\\.cmder\\opt\\.autohotkey-manual\\Ahk2Exe1.1.37.00a\\Ahk2Exe.exe"
    

How to make new versions of this key mapper

  1. Open the mac-hotkeys.ahk file
  2. Use the VSCode Command menu to compile it (either non-Gui or GUI Variant)
    Important: use AHK v1.1 NOT 2!
  3. Register the resulting exe in autostart via Win R + regedit
    Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run => Create new Key: "mac-hotkeys" as REG_RZ with the path of the compiled AHK Script:
    => "C:\Users\xcg5545.cmder\dev\ahk-mac-hotkeys-on-win\mac-hotkeys.exe"

References

To Try


Changelog

v1.3 - 2021-04-12

First version published on github