Skip to content

Instantly share code, notes, and snippets.

@RobRuana
Last active November 8, 2018 19:38
Show Gist options
  • Save RobRuana/8ba4d709e2f0a0866061c00fa6f7b01b to your computer and use it in GitHub Desktop.
Save RobRuana/8ba4d709e2f0a0866061c00fa6f7b01b to your computer and use it in GitHub Desktop.
AutoHotkey bindings to make keyboard more like a Mac under Windows
#Warn
#NoEnv
#KeyHistory 0
ListLines Off
;SetKeyDelay, -1, -1
;SetMouseDelay, -1
;SetDefaultMouseSpeed, 0
SendMode Event
SetWorkingDir %A_ScriptDir%
*CapsLock::return
LWin::LCtrl
LCtrl::LWin
RWin::RCtrl
!l::Send ^{l}
^Enter:: Send !{Enter}
!-::Send {Asc 0150} ; endash
+!-::Send {Asc 0151} ; emdash
^Left::Send {Home}
^Right::Send {End}
^Up::Send {LCtrl down}{Home}{LCtrl up}
^Down::Send {LCtrl down}{End}{LCtrl up}
; alt-delete deletes previous word
!BS::Send {LShift down}{LCtrl down}{Left}{LShift Up}{Lctrl up}{Backspace}
^BS::
if WinActive("ahk_exe explorer.exe")
Send {Del} ; Win+Backspace deletes files in Explorer
else
Send {LShift down}{Home}{LShift Up}{Backspace} ; Win+Backspace deletes whole line
return
!Left::Send {LCtrl down}{Left}{LCtrl up}
!Right::Send {LCtrl down}{Right}{LCtrl up}
; Selection (uses a combination of the above with Shift)
!+Left::Send {LCtrl down}{Shift down}{Left}{Shift up}{LCtrl up}
!+Right::Send {LCtrl down}{Shift down}{Right}{Shift up}{LCtrl up}
^+Left::Send {Shift down}{Home}{Shift up}
^+Right::Send {Shift down}{End}{Shift up}
^+Up::Send {LCtrl down}{Shift down}{Home}{Shift up}{LCtrl up}
^+Down::Send {LCtrl down}{Shift down}{End}{Shift up}{LCtrl up}
#$::Run, C:\WINDOWS\system32\SnippingTool.exe
WheelUp::Send {WheelDown}
WheelDown::Send {WheelUp}
WheelRight::Send {WheelLeft}
WheelLeft::Send {WheelRight}
#MaxHotkeysPerInterval 200
^q::Send !{F4}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment