Last active
February 9, 2020 14:44
-
-
Save n8jadams/fcd9cab716912a0188c67abe4c1690f4 to your computer and use it in GitHub Desktop.
These Autohotkey keybindings to help make your Windows feel like a Mac.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
; Screenshot (you still have to paste it into paint or whatever) | |
>#+3::Send {PrintScreen};^+3 | |
>#+4::Send {PrintScreen};^+4 | |
<#+3::Send {PrintScreen};^+3 | |
<#+4::Send {PrintScreen};^+4 | |
;;;; DO NOT DO ANYTHING IF STEAM IS OPEN ;;;; | |
SteamOpen=false | |
SetTimer, Steam, 1 ; You can call the sub whatever, and change the time if you want, this one is 1 milisecond | |
Return | |
Steam: | |
Process, Wait, gameoverlayui.exe, 1 | |
SteamOpen:=ErrorLevel | |
Return | |
#If !SteamOpen | |
; Navigate with ⌘+tab | |
<#Tab:: | |
Send, {Alt Down}{Tab} | |
SetTimer AppSwitchRight, -100 | |
Return | |
<#+Tab:: | |
Send, {Alt Down}{Shift Down}{Tab} | |
SetTimer AppSwitchLeft, -100 | |
Return | |
>#Tab:: | |
Send, {Alt Down}{Tab} | |
SetTimer AppSwitchRight, -100 | |
Return | |
>#+Tab:: | |
Send, {Alt Down}{Shift Down}{Tab} | |
SetTimer AppSwitchLeft, -100 | |
Return | |
AppSwitchLeft: | |
KeyWait, LWin | |
KeyWait, Shift | |
Send, {Alt Up}{Shift Up} | |
Return | |
AppSwitchRight: | |
KeyWait, LWin | |
Send, {Alt Up} | |
Return | |
; Select program... ⌘+space | |
LWin & Space:: | |
WinActivate, ahk_class Shell_TrayWnd | |
Send, ^{Esc} | |
Return | |
; Navigate with ⌘+tilde (Depends on program: Easy Window Switcher) | |
LWin & Sc029::CommandTildeNav() | |
RWin & Sc029::CommandTildeNav() | |
CommandTildeNav() { | |
If GetKeyState("Shift","p") | |
Send !+{`` Down}{`` Up} | |
Else | |
Send !{`` Down}{`` Up} | |
Return | |
} | |
; Disable the Windows key | |
#IfWinNotActive ahk_exe MCC-Win64-Shipping | |
LWin:: | |
Return | |
RWin:: | |
Return | |
; Only remap the following if you're not in a Linux Terminal window | |
#IfWinNotActive ahk_exe ubuntu.exe | |
<#A::Send ^a | |
<#B::Send ^b | |
<#C::Send ^c | |
<#D::Send ^d | |
<#E::Send ^e | |
<#F::Send ^f | |
<#G::Send ^g | |
<#H::Send ^h | |
<#I::Send ^i | |
<#J::Send ^j | |
<#K::Send ^k | |
<#L::Send ^l | |
<#M::Send ^m | |
<#N::Send ^n | |
<#O::Send ^o | |
<#P::Send ^p | |
<#Q::Send !{f4} | |
<#R::Send ^r | |
<#S::Send ^s | |
<#T::Send ^t | |
<#U::Send ^u | |
<#V::Send ^v | |
<#W::Send ^w | |
<#X::Send ^x | |
<#Y::Send ^y | |
<#Z::Send ^z | |
<#1::Send ^1 | |
<#2::Send ^2 | |
<#3::Send ^3 | |
<#4::Send ^4 | |
<#5::Send ^5 | |
<#6::Send ^6 | |
<#7::Send ^7 | |
<#8::Send ^8 | |
<#9::Send ^9 | |
<#0::Send ^0 | |
<#/::Send ^/ | |
>#A::Send ^a | |
>#B::Send ^b | |
>#C::Send ^c | |
>#D::Send ^d | |
>#E::Send ^e | |
>#F::Send ^f | |
>#G::Send ^g | |
>#H::Send ^h | |
>#I::Send ^i | |
>#J::Send ^j | |
>#K::Send ^k | |
>#L::Send ^l | |
>#M::Send ^m | |
>#N::Send ^n | |
>#O::Send ^o | |
>#P::Send ^p | |
>#R::Send ^r | |
>#S::Send ^s | |
>#T::Send ^t | |
>#U::Send ^u | |
>#V::Send ^v | |
>#W::Send ^w | |
>#X::Send ^x | |
>#Y::Send ^y | |
>#Z::Send ^z | |
>#1::Send ^1 | |
>#2::Send ^2 | |
>#3::Send ^3 | |
>#4::Send ^4 | |
>#5::Send ^5 | |
>#6::Send ^6 | |
>#7::Send ^7 | |
>#8::Send ^8 | |
>#9::Send ^9 | |
>#0::Send ^0 | |
>#/::Send ^/ | |
<#+A::Send ^+a | |
<#+B::Send ^+b | |
<#+C::Send ^+c | |
<#+D::Send ^+d | |
<#+E::Send ^+e | |
<#+F::Send ^+f | |
<#+G::Send ^+g | |
<#+H::Send ^+h | |
<#+I::Send ^+i | |
<#+J::Send ^+j | |
<#+K::Send ^+k | |
<#+L::Send ^+l | |
<#+M::Send ^+m | |
<#+N::Send ^+n | |
<#+O::Send ^+o | |
<#+P::Send ^+p | |
<#+Q::Send ^+q | |
<#+R::Send ^+r | |
<#+S::Send ^+s | |
<#+T::Send ^+t | |
<#+U::Send ^+u | |
<#+V::Send ^+v | |
<#+W::Send ^+w | |
<#+X::Send ^+x | |
<#+Y::Send ^+y | |
<#+Z::Send ^+z | |
<#+1::Send ^+1 | |
<#+2::Send ^+2 | |
; 3 and 4 are in the Screenshot area | |
<#+5::Send ^+5 | |
<#+6::Send ^+6 | |
<#+7::Send ^+7 | |
<#+8::Send ^+8 | |
<#+9::Send ^+9 | |
<#+0::Send ^+0 | |
<#+/::Send ^+/ | |
>#+A::Send ^+a | |
>#+B::Send ^+b | |
>#+C::Send ^+c | |
>#+D::Send ^+d | |
>#+E::Send ^+e | |
>#+F::Send ^+f | |
>#+G::Send ^+g | |
>#+H::Send ^+h | |
>#+I::Send ^+i | |
>#+J::Send ^+j | |
>#+K::Send ^+k | |
>#+L::Send ^+l | |
>#+M::Send ^+m | |
>#+N::Send ^+n | |
>#+O::Send ^+o | |
>#+P::Send ^+p | |
>#+R::Send ^+r | |
>#+S::Send ^+s | |
>#+T::Send ^+t | |
>#+U::Send ^+u | |
>#+V::Send ^+v | |
>#+W::Send ^+w | |
>#+X::Send ^+x | |
>#+Y::Send ^+y | |
>#+Z::Send ^+z | |
>#+1::Send ^+1 | |
>#+2::Send ^+2 | |
; 3 and 4 are in the Screenshot area | |
>#+5::Send ^+5 | |
>#+6::Send ^+6 | |
>#+7::Send ^+7 | |
>#+8::Send ^+8 | |
>#+9::Send ^+9 | |
>#+0::Send ^+0 | |
>#+/::Send ^+/ | |
; A Chrome thing, show inspector window | |
!<#I::Send ^+i | |
!>#I::Send ^+i | |
LWin & Left::MoveCursorToLeft() | |
RWin & Left::MoveCursorToLeft() | |
MoveCursorToLeft() { | |
If GetKeyState("Shift","p") | |
Send +{Home} | |
Else | |
Send {Home} | |
Return | |
} | |
LWin & Right::MoveCursorToRight() | |
RWin & Right::MoveCursorToRight() | |
MoveCursorToRight() { | |
If GetKeyState("Shift","p") | |
Send +{End} | |
Else | |
Send {End} | |
Return | |
} | |
LAlt & Left::MoveCursorLeftOneWord() | |
RAlt & Left::MoveCursorLeftOneWord() | |
MoveCursorLeftOneWord() { | |
If GetKeyState("Shift","p") | |
Send ^+{Left} | |
Else | |
Send ^{Left} | |
Return | |
} | |
LAlt & Right::MoveCursorRightOneWord() | |
RAlt & Right::MoveCursorRightOneWord() | |
MoveCursorRightOneWord() { | |
If GetKeyState("Shift","p") | |
Send ^+{Right} | |
Else | |
Send ^{Right} | |
Return | |
} | |
; Linux Terminal Specific Commands | |
#IfWinActive ahk_exe ubuntu.exe | |
LAlt & Left::Send ^{Left} | |
LAlt & Right::Send ^{Right} | |
RAlt & Left::Send ^{Left} | |
RAlt & Right::Send ^{Right} | |
LWin & C::Send ^+c | |
RWin & C::Send ^+c | |
LWin & V::Send ^+v | |
RWin & V::Send ^+v | |
LWin & Q::CloseTerminalWindow() | |
RWin & Q::CloseTerminalWindow() | |
LWin & W::CloseTerminalWindow() | |
RWin & W::CloseTerminalWindow() | |
CloseTerminalWindow() { | |
Send, ^cexit{Enter} | |
Return | |
} | |
<#N::OpenNewTerminalWindow() | |
>#N::OpenNewTerminalWindow() | |
<#T::OpenNewTerminalWindow() | |
>#T::OpenNewTerminalWindow() | |
OpenNewTerminalWindow() { | |
Send, ^copen /mnt/c/Users/Nate/Desktop/Ubuntu\ -\ Shortcut.lnk{Enter} | |
Return | |
} | |
#If | |
;;;; DO NOT DO ANYTHING IF STEAM IS OPEN (end) ;;;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment