Skip to content

Instantly share code, notes, and snippets.

@xqm32
Last active July 17, 2023 13:26
Show Gist options
  • Select an option

  • Save xqm32/479c94895b380e0ebc23f6d85eac6d95 to your computer and use it in GitHub Desktop.

Select an option

Save xqm32/479c94895b380e0ebc23f6d85eac6d95 to your computer and use it in GitHub Desktop.
Use macOS-style Keymap on Windows
#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.
; Reference https://medium.com/@chrisdhanaraj/mapping-your-macos-keybinds-to-windows-b6009c50065b
; Option Key Shortcuts
<!BS::Send {LCtrl Down}{BackSpace}{LCtrl Up}
<!Left::Send {LCtrl Down}{Left}{LCtrl Up}
<!Right::Send {LCtrl Down}{Right}{LCtrl Up}
>!BS::Send {Delete}
; Command Key Shortcuts
<^Left::Send {Home}
<^Right::Send {End}
<^BS::Send {LShift Down}{Home}{LShift Up}{BackSpace}
<^q::Send {LAlt Down}{F4}{LAlt Up}
<^<+z::Send {LCtrl Down}{y}{LCtrl Up}
<^<+4::Send {LWin Down}{LShift Down}{s}{LShift Up}{LWin Up}
; CapsLock Key
CapsLock::Send {LWin Down}{Space}{LWin Up}
; Wheel
WheelDown::WheelUp
WheelUp::WheelDown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment