Skip to content

Instantly share code, notes, and snippets.

@tomekstefaniak
Last active May 22, 2025 18:47
Show Gist options
  • Save tomekstefaniak/bc2369e20c300f77b98d17abcca431a0 to your computer and use it in GitHub Desktop.
Save tomekstefaniak/bc2369e20c300f77b98d17abcca431a0 to your computer and use it in GitHub Desktop.
Fancy binds for keyboards without arrow and function keys, and more, script for Auto Hot Key 2, Windows 11
; Me: https://gist.github.com/tomekstefaniak
; Put the script in directory C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⣤⣀⡀⠀⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⠄⠀⡀⢀⣠⠴⠒⠚⠛⠒⠛⠛⠻⠥⢤⣦⣄⡈⠓⢤⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡞⣡⠤⢤⡤⠎⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢃⠙⠀⠈⣇⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣧⢸⠉⣴⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠲⡿⢀⡄⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣇⠃⣰⠗⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣡⠜⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢲⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣯⠀⠀⢀⣀⡤⠠⠒⠂⠒⢰⣷⠄⠀⠀⠀⠀⠀⠀⠀⣾⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡀⠀⢻⠏⠰⢶⠆⠀⠀⠀⢹⡄⠀⠀⠀⠀⠀⠀⢠⠃⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢇⠀⠘⣆⠀⠈⣄⠀⠀⠀⡼⠃⠀⠀⠀⠀⠀⣴⠃⠀⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⢦⣬⣷⣶⣷⣤⡤⠮⠤⠔⣶⣤⣤⠶⢻⡁⠀⠀⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣩⣵⢟⡿⢛⢲⠒⠒⠏⠉⠀⠀⠀⢳⠀⠀⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡾⣵⠏⠈⢨⠞⡼⠁⠸⡄⢇⠀⠀⠀⠀⠀⠀⠀⢧⠀⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡼⠋⣼⠃⠀⢀⣎⢠⠃⠀⠀⢣⠘⣆⠀⠀⠀⠀⠀⠀⠈⡄⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠾⠉⠀⣸⠉⠀⠀⠈⣹⠋⠀⠀⠀⠈⠉⠉⢲⠀⠀⠀⠀⠀⠀⠘⡆⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⡴⠋⠀⢀⡜⠁⠀⠀⠀⡐⠁⠀⠀⠀⠀⠀⠀⠀⠸⣄⠀⠀⠀⠀⠀⠀⠙⡄⠀
;⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⠀⠸⠀⠀⠀⠀⢸⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⢧⠀⠀⠀⠀⠀⠀⠀⢸⠀
;⠀⠀⠀⠀⠀⠀⠀⠘⣦⣤⠔⢻⡀⠀⠀⠀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡆⠀⠀⠀⠀⠀⠀⢸⡇
;⠀⢀⡤⠤⠤⠔⠒⠋⠁⠀⠀⠀⠑⣆⠀⠀⡇⠀⠀⠀⣀⣄⠐⠒⠒⢢⢤⡠⢻⡄⠀⠀⠀⠀⠀⡜⠀
;⢀⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣤⣁⡤⠖⠉⠀⠀⠀⠀⠀⠀⠀⠁⠀⢙⡦⠤⠴⠒⠋⠁⠀
;⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⡤⠜⠚⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠁⠀⠀⠀⠀⠀⠀
;⠀⠹⡀⠀⠀⠀⠀⠀⠀⣰⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠞⠀⠀⠀⠀⠀⠀⠀⠀⠀
;⠀⠀⠣⠤⣤⣀⣠⠤⠴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡔⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢳⣀⠀⠀⠀⠀⣠⠤⠖⠈⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
;⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⠒⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
; In case any ahk2 script has been already run
#SingleInstance Force
; Left Alt + I - Up Arrow
!i::Send("{Up}")
; Left Alt + J - Left Arrow
!j::Send("{Left}")
; Left Alt + K - Down Arrow
!k::Send("{Down}")
; Left Alt + L - Right Arrow
!l::Send("{Right}")
; Left Alt + > - Go To Right Desktop
!>::Send "^#{Right}"
; Left Alt + < - Go To Left Desktop
!<::Send "^#{Left}"
; Left Alt + 4 - Close window (Alt + F4)
!4::Send "!{F4}"
; Left Alt + U - Delete
!u::Send("{Delete}")
; Left Alt + O - Open system settings
!o:: {
Run("ms-settings:")
}
; Left Alt + T - Open Powershell in ~ Directory
!t:: {
Run('pwsh.exe -NoExit -Command "cd ~"')
}
; Left Alt + H - Open File Explorer
!h:: {
Run("explorer.exe", , "Hide")
}
; Left Alt + V - Open Visual Studio Code
!v:: {
Run("code", , "Hide")
}
; Left Alt + B - Open Firefox
!b:: {
Run("C:\Program Files\Mozilla Firefox\firefox.exe")
}
; Ctrl + Left Alt + R - Reboot
^<!r:: {
Run("shutdown.exe /r /t 0", , "Hide")
}
; Ctrl + Left Alt + S - Shutdown
^<!s:: {
Run("shutdown.exe /s /t 0", , "Hide")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment