Skip to content

Instantly share code, notes, and snippets.

@ajimix
Created September 5, 2012 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajimix/3631557 to your computer and use it in GitHub Desktop.
Save ajimix/3631557 to your computer and use it in GitHub Desktop.
AutoHotkey script to remap some Mac shortcuts on Windows to make Windows more usable
#SingleInstance force
; Install autohotkey for windows and put the contents of this file in your
; documents folder AutoHotkey.ahk existing file.
#InstallKeybdHook
; Remap for Mac Like
!c::Send ^c
!+c::Send ^+c
!v::Send ^v
!z::Send ^z
!+z::Send ^+z
!s::Send ^s
!t::Send ^t
!x::Send ^x
!r::Send ^r
!b::Send ^b
!p::Send ^p
!w::Send ^w
!f::Send ^f
!+f::Send ^+f
!a::Send ^a
!g::Send ^g
!u::Send ^u
!d::Send ^d
!h::Send ^h
!+i::Send ^+i
; Remap ALT/ALTGR + Ñ to ~ (for Mac like)
!SC027::Send {~}
<^>!SC027::Send {~}
; Remap scroll wheel, natural scrolling FTW!
WheelUp::
Send {WheelDown}
Return
WheelDown::
Send {WheelUp}
Return
SetTitleMatchMode 2
; "CTRL + F11" for previous Spotify track
^F11::
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Left}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
; "CTRL + F12" for next Spotify track
^F12::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Right}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
; "CTRL + F9" for pause/resume Spotify music
^F9::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, {space}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
; Remap mouse extra left button to horizontal scroll while pressed
XButton1::Shift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment