Skip to content

Instantly share code, notes, and snippets.

@brettstack
Last active October 28, 2025 07:56
Show Gist options
  • Select an option

  • Save brettstack/23ff727d16f9fe648e8ca0176e807105 to your computer and use it in GitHub Desktop.

Select an option

Save brettstack/23ff727d16f9fe648e8ca0176e807105 to your computer and use it in GitHub Desktop.
; Place in this directory to autorun at startup: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode "Input" ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory.
; ALT + Left/Right to Start/End of line
!Left::Send "{Home}"
!Right::Send "{End}"
!+Left::Send "{ShiftDown}{Home}{ShiftUp}"
!+Right::Send "{ShiftDown}{End}{ShiftUp}"
; ALT + Up/Down to Start/End of file
!Up::Send "{LCtrl Down}{Home}{LCtrl Up}"
!Down::Send "{LCtrl Down}{End}{LCtrl Up}"
!+Up::Send "{ShiftDown}{LCtrl Down}{Home}{LCtrl Up}{ShiftUp}"
!+Down::Send "{ShiftDown}{LCtrl Down}{End}{LCtrl Up}{ShiftUp}"
; ALT + Up/Down to Start/End of file
#Left::Send "{LCtrl Down}{left}{LCtrl Up}"
#Right::Send "{LCtrl Down}{right}{LCtrl Up}"
#+Left::Send "{ShiftDown}{LCtrl Down}{left}{LCtrl Up}{ShiftUp}"
#+Right::Send "{ShiftDown}{LCtrl Down}{right}{LCtrl Up}{ShiftUp}"
; Change workspaces
LCtrl & left::Send "{LCtrl Down}{LWinDown}{left}{LWinUp}{LCtrl Up}"
LCtrl & right::Send "{LCtrl Down}{LWinDown}{right}{LWinUp}{LCtrl Up}"
LCtrl & down::Send "{LWinDown}{d}{LWinUp}"
LCtrl & up::Send "{LWinDown}{Tab}{LWinUp}"
; ALT + Backspace to delete line
!BS::Send "{LShift down}{Home}{LShift Up}{Del}"
#BS::Send "{LCtrl Down}{BS}{LCtrl Up}"
; Common CTRL shortcuts mapped to ALT shortuts
!c::Send "{LCtrl Down}{c}{LCtrl Up}"
!x::Send "{LCtrl Down}{x}{LCtrl Up}"
!v::Send "{LCtrl Down}{v}{LCtrl Up}"
; WSL paste
!+v::Send "{LCtrl Down}{Lshift down}{v}{Lshift up}{LCtrl Up}"
!z::Send "{LCtrl Down}{z}{LCtrl Up}"
!+z::Send "{LCtrl Down}{Lshift down}{z}{Lshift up}{LCtrl Up}"
!y::Send "{LCtrl Down}{y}{LCtrl Up}"
!s::Send "{LCtrl Down}{s}{LCtrl Up}"
!a::Send "{LCtrl Down}{a}{LCtrl Up}"
!d::Send "{LCtrl Down}{d}{LCtrl Up}"
!f::Send "{LCtrl Down}{f}{LCtrl Up}"
!+f::Send "{LCtrl Down}{Lshift down}{f}{Lshift up}{LCtrl Up}"
!t::Send "{LCtrl Down}{t}{LCtrl Up}"
!+t::Send "{LCtrl Down}{Lshift down}{t}{Lshift up}{LCtrl Up}"
!n::Send "{LCtrl Down}{n}{LCtrl Up}"
!+n::Send "{LCtrl Down}{Lshift down}{n}{Lshift up}{LCtrl Up}"
!r::Send "{LCtrl Down}{r}{LCtrl Up}"
!b::Send "{LCtrl Down}{b}{LCtrl Up}"
!/::Send "{LCtrl Down}{/}{LCtrl Up}"
!,::Send "{LCtrl Down}{,}{LCtrl Up}"
!Enter::Send "{LCtrl Down}{Enter}{LCtrl Up}"
!LButton::Send "{LCtrl Down}{LButton}{LCtrl Up}"
; VSCode shortcuts
!+p::Send "{LCtrl Down}{Lshift down}{p}{Lshift up}{LCtrl Up}"
!p::Send "{LCtrl Down}{p}{LCtrl Up}"
; Alt+Space to Windows+S for search/spotlight
!Space::Send "{LWin down}{s}{LWin up}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment