Skip to content

Instantly share code, notes, and snippets.

@naezith
Last active November 23, 2019 07:58
Show Gist options
  • Save naezith/8c164b1e11c1e56c246ef5932d362b10 to your computer and use it in GitHub Desktop.
Save naezith/8c164b1e11c1e56c246ef5932d362b10 to your computer and use it in GitHub Desktop.
Swap Mac keyboard with Windows
; Swaps buttons for Mac keyboards
; Disable with Ctrl+F6 when you use a Windows keyboard.
; Option<->Command (Alt<->Win)
; RCommand<->RAlt (RWin<->RAlt)
; ROption<->RCtrl (RAlt<->RCtrl)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
#InstallKeybdHook
#SingleInstance force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
*LWin::
Send, {LAlt Down}
Keywait LWin
Send, {LAlt Up}
Return
*LAlt::
Send, {LWin Down}
Keywait LAlt
Send, {LWin Up}
Return
*RAlt::
Send, {RCtrl Down}
Keywait RAlt
Send, {RCtrl Up}
Return
*RWin::
Send, {RAlt Down}
Keywait RWin
Send, {RAlt Up}
Return
^F6::Suspend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment