Skip to content

Instantly share code, notes, and snippets.

@ArtS
Created May 4, 2012 00:35
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArtS/2590710 to your computer and use it in GitHub Desktop.
Save ArtS/2590710 to your computer and use it in GitHub Desktop.
Windows to OS X AutoHotkey mappings
; # - winkey
; + - shift
; ^ - ctrl
; ! - alt
#SingleInstance
#MaxHotkeysPerInterval 200
;
; Reverse scrolling
;
WheelUp::
Send {WheelDown}
Return
WheelDown::
Send {WheelUp}
Return
;
; following section mimics command-q and command-w
; behaviour to close windows
; note these had to be disabled below for the
; command to ctrl key remaps
;
#w::^F4
#q::!F4
;
; following section remaps alt-arrow and command-arrow
; keys to mimic OSX behaviour
;
#Up::Send {Lctrl down}{Home}{Lctrl up}
#Down::Send {Lctrl down}{End}{Lctrl up}
#Left::Send {Home}
#Right::Send {End}
!Up::Send {Home}
!Down::Send {End}
!Left::^Left
!Right::^Right
;
; following section remaps command key to control key
; affects all number and letter keys
; note that some keys, like winkey-l and winkey-d
; need to be remapped a differeny way
; otherwise autohotkey will not take over
;
#a::^a
#c::^c
#v::^v
#b::^b
#d::^d
#e::^e
;following won't remap using the normal method
#f::Send {LCtrl down}{f}{LCtrl up}
#g::^g
#h::^h
#i::^i
#j::^j
#k::^k
#l::Send {LCtrl down}{l}{LCtrl up}
#m::^m
#n::^n
#o::^o
#p::^p
;#q::^q ;disabled --remapped to alt-F4 instead
#r::^r
#s::^s
#t::^t
#u::^u
;#w::^w ;disabled --remapped to ctrl-F4 instead
#x::^x
#y::^y
#z::^z
#1::^1
#2::^2
#3::^3
#4::^4
#5::^5
#6::^6
#7::^7
#8::^8
#9::^9
#0::^0
LWin & Tab::AltTab ; the motherlode, alt-tab!
;
; Language switching
;
CapsLock:: Send {LCtrl down}{LShift down}{LShift up}{LCtrl up}
;
; Win-Left click to Ctrl-left click
;
#LButton::Send {Lctrl down}{LButton down}{LButton up}{Lctrl up}
;
; Cursor keys for text selection
;
!Left::Send {LCtrl down}{Left}{LCtrl up}
!Right::Send {LCtrl down}{Right}{LCtrl up}
#+Left::Send {Lshift down}{Home}{Lshift up}
#+Right::Send {Lshift down}{End}{Lshift up}
#+Up::Send {Lshift down}{PgUp}{Lshift up}
#+Down::Send {Lshift down}{PgDn}{Lshift up}
;
; Chrome
;
#IfWinActive ahk_class Chrome_WidgetWin_0
#Left::Send {LAlt down}{Left}{LAlt up}
#Right::Send {LAlt down}{Right}{LAlt up}
#!Right::Send {LCtrl down}{Tab}{LCtrl up}
#!Left::Send {LCtrl down}{LShift down}{Tab}{LShift up}{LCtrl up}
#IfWinActive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment