Skip to content

Instantly share code, notes, and snippets.

Created November 13, 2021 17:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Main fulltime autohotkey script
#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.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
PrintScreen::Send {Media_Play_Pause}
#IfWinActive ahk_exe Explorer.EXE
WinMove, Telegram,, 62, 0, 1249,720
#IfWinActive ahk_exe Discord.exe
^w::Send !{Space}c
#IfWinActive ahk_exe Rider.exe
F1::Send {Esc}{F1}^s ;f4 must be in brackets
#IfWinActive ahk_exe HueSync.exe
^w::Send !{F4} ;f4 must be in brackets
#IfWinActive ahk_exe Teams.exe
^w::Send !{F4} ;f4 must be in brackets
#IfWinActive ahk_exe Spotify.exe
^w::Send !{F4} ;f4 must be in brackets
#IfWinActive Commit Changes
SetTitleMatchMode, 2
#IfWinActive Push Commits
#IfWinActive ahk_class Chrome_WidgetWin_1
;<^t::F13 ;block
F1::Send {F5}
;type what's on the clipboard rather than pasting it:
>^v::SendRaw %clipboard%
;media controls
^Home::Send {Media_Play_Pause}
^Insert::Send {Media_Prev}
^PgUp::Send {Media_Next}
;long press esc to send an AltF4
Send {Blind}{Esc}
KeyWait, Esc, T0.99
If ErrorLevel {
Send !{F4} ;f4 must be in brackets
KeyWait, Esc
;custom shorts
:*:@lorem::Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
;Italian stuff
:*?C:e'::è ; Send è
:*?C:i'::ì ; Send ì
:*?C:a'::à ; Send à
:*?C:o'::ò ; Send ò
:*?C:u'::ù ; Send ù
:*?C:E'::È ; Send È
;backspace stuff, capslock is letter, backspace deletes a word
;Makes Shift+Caps go into Capslock mode
global IsCapsOn :=GetKeyState("CapsLock", "T")
IsCapsOn := !IsCapsOn
If IsCapsOn = 1
SetCapsLockState , off
;KeyboardLED(7, "on")
SetCapsLockState , on
;KeyboardLED(7, "off")
;*LWin Up:: Tooltip The last key was: %A_PriorKey%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment