Skip to content

Instantly share code, notes, and snippets.

@crsanti
Created March 2, 2017 14:55
Show Gist options
  • Save crsanti/5aceed50fb34e3371f9db3c1bd3c5727 to your computer and use it in GitHub Desktop.
Save crsanti/5aceed50fb34e3371f9db3c1bd3c5727 to your computer and use it in GitHub Desktop.
Mac keyboard AutoHotKey config for Windows
;-----------------------------------------
; Mac keyboard to Windows Key Mappings
;=========================================
; --------------------------------------------------------------
; NOTES
; --------------------------------------------------------------
; ! = ALT
; ^ = CTRL
; + = SHIFT
; # = WIN
;
; Debug action snippet: MsgBox You pressed Control-A while Notepad is active.
#InstallKeybdHook
#SingleInstance force
SetTitleMatchMode 2
SendMode Input
; --------------------------------------------------------------
; media/function keys all mapped to the right option key
; --------------------------------------------------------------
RAlt & F7::SendInput {Media_Prev}
RAlt & F8::SendInput {Media_Play_Pause}
RAlt & F9::SendInput {Media_Next}
RAlt & F10::SendInput {Volume_Mute}
RAlt & F11::SendInput {Volume_Down}
RAlt & F12::SendInput {Volume_Up}
; swap cap locks with escape
CapsLock::Esc
Esc::CapsLock
; swap right command with alt gr
RWin::RAlt
RAlt::RWin
; swap eft command/windows key with left alt
LWin::LAlt
LAlt::LWin ; add a semicolon in front of this line if you want to disable the windows key
; Eject Key
;F16::SendInput {Insert}
; F13-15, standard windows mapping
F13::SendInput {PrintScreen}
F14::SendInput {ScrollLock}
F15::SendInput {Pause}
;F16-19
;F16::Run http://twitter.com
F17::SendInput {Volume_Mute}
F18::SendInput {Volume_Down}
F19::SendInput {Volume_Up}
; --------------------------------------------------------------
; OS X system shortcuts
; --------------------------------------------------------------
; Make Ctrl + S work with cmd (windows) key
;#s::^s
; Selecting
;#a::^a
; Copying
;#c::^c
; Pasting
;#v::^v
; Cutting
;#x::^x
; Opening
;#o::^o
; Finding
;#f::Send ^f
; Undo
;#z::^z
; Redo
;#y::^y
; New tab
;#t::^t
; close tab
;#w::^w
; Close windows (cmd + q to Alt + F4)
;#q::Send !{F4}
; Remap Windows + Tab to Alt + Tab.
;Lwin & Tab::AltTab
; minimize windows
;#m::WinMinimize,a
; --------------------------------------------------------------
; OS X keyboard mappings for special chars
; --------------------------------------------------------------
; Map Alt + L to @
;!l::SendInput {@}
; Map Alt + N to \
;+!7::SendInput {\}
; Map Alt + N to ©
;!g::SendInput {©}
; Map Alt + o to ø
;!o::SendInput {ø}
; Map Alt + 5 to [
;!5::SendInput {[}
; Map Alt + 6 to ]
;!6::SendInput {]}
; Map Alt + E to €
;!e::SendInput {€}
; Map Alt + - to –
;!-::SendInput {–}
; Map Alt + 8 to {
;!8::SendInput {{}
; Map Alt + 9 to }
;!9::SendInput {}}
; Map Alt + - to ±
;!+::SendInput {±}
; Map Alt + R to ®
;!r::SendInput {®}
; Map Alt + N to |
;!7::SendInput {|}
; Map Alt + W to ∑
;!w::SendInput {∑}
; Map Alt + N to ~
;!n::SendInput {~}
; --------------------------------------------------------------
; Custom mappings for special chars
; --------------------------------------------------------------
;#ö::SendInput {[}
;#ä::SendInput {]}
;^ö::SendInput {{}
;^ä::SendInput {}}
; --------------------------------------------------------------
; Application specific
; --------------------------------------------------------------
; Google Chrome
;#IfWinActive, ahk_class Chrome_WidgetWin_1
; Show Web Developer Tools with cmd + alt + i
;#!i::Send {F12}
; Show source code with cmd + alt + u
;#!u::Send ^u
;#IfWinActive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment