cosci

cosci_utils.ahk

Oct 23rd, 2025 (edited)
1,318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 3.33 KB | Source Code | 0 0
  1. #SingleInstance Force
  2. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  3. ; #Warn  ; Enable warnings to assist with detecting common errors.
  4.  
  5. ; author: https://cosci.de
  6.  
  7. ; https://www.autohotkey.com/docs/Tutorial.htm
  8. ; https://www.autohotkey.com/docs/commands/SoundSet.htm
  9.  
  10. ; Windows Terminal
  11.  
  12. ; STRG+ALT
  13. ^!T::
  14.     WinActivate Program Manager ; desktop
  15.     RUN wt.exe
  16. return
  17.  
  18. ; Windows Terminal Elevated/Admin User
  19. ; STRG+ALT+SHIFT
  20. ^!+T::
  21.     WinActivate Program Manager ; desktop
  22.     RUN *RunAs wt.exe
  23. return
  24.  
  25.  
  26.  
  27. ; Mouse Volume Control
  28.  
  29. ; Mouse Forward - Volume Up
  30. XButton2::
  31.     Send {Volume_Up}
  32. ;repeats the hotkey while holding the buttons
  33. ; while(GetKeyState("XButton2","P")){
  34. ;     Send {Volume_Up}
  35. ;     Sleep, 100
  36. ; }
  37. return
  38.  
  39. ; Mouse Back - Volume Down
  40. XButton1::
  41.     Send {Volume_Down}
  42.     ; SoundSet,-5 ;Volume -5
  43. return
  44.    
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. ; Mouse Window Control
  55.  
  56. ; Mouse Thumb Forward - Tab Right
  57. XButton2 & LButton::
  58.     ;repeats the hotkey while holding the buttons
  59.     while(GetKeyState("XButton2","P") && GetKeyState("LButton","P")){
  60.         Send ^+{Tab}
  61.         Sleep, 400
  62.     }
  63. return
  64.  
  65. ; Mouse Thumb Forward - Tab Left
  66. XButton2 & RButton::
  67.     while(GetKeyState("XButton2","P") && GetKeyState("RButton","P")){
  68.         Send ^{Tab}
  69.         Sleep, 400
  70.     }
  71. return
  72.  
  73. ; Mouse Thumb Forward - Reload
  74. XButton2 & MButton::
  75.     Send ^R
  76. return
  77.  
  78.  
  79. ; Mouse Thumb Back - Virtual Desktop Left
  80. XButton1 & LButton::
  81.     Send #^{LEFT}
  82. return
  83.  
  84. ; Mouse Thumb Back - Virtual Desktop Right
  85. XButton1 & RButton::
  86.     Send #^{Right}
  87. return
  88.  
  89. ; Mouse Thumb Back - Close Tab
  90. XButton1 & MButton::
  91.     ;Send ^W
  92.     Send ^{F4}
  93. return
  94.  
  95.  
  96. ; Wheel Up - Move Window Left
  97. XButton2 & WheelUp::
  98.     Send #{LEFT}
  99. return
  100.    
  101. ; Wheel Down - Move Window Right
  102. XButton2 & WheelDown::
  103.     Send #{RIGHT}
  104. return
  105.  
  106. ; Wheel Up - Zoom In
  107. XButton1 & WheelUp::
  108.     Send ^{WheelUp}
  109. return
  110.    
  111. ; Wheel Down - Zoom Out
  112. XButton1 & WheelDown::
  113.     Send ^{WheelDown}
  114. return
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. ; Media Control on Keyboard
  126.  
  127. ; WIN+CTRL+SHIFT
  128. #^+UP::
  129. ; SoundSet,+5 ;Volume +5
  130.     Send {Volume_Up}
  131. return
  132.  
  133. #^+DOWN::
  134.     Send {Volume_Down}
  135. return
  136.  
  137. #^Numpad0::
  138.     SoundSet,0 ; set Volume to 10
  139.     Send {Volume_Mute} ; Volume mute
  140. ; SoundSet,0 ; Volume mute
  141. return
  142.  
  143. #^Numpad1::
  144.     Send {Volume_Up} ; shows the Windows Volume Overlay
  145.     SoundSet,10 ; set Volume to 10
  146. return
  147.  
  148. #^Numpad2::
  149.     Send {Volume_Up} ; shows the Windows Volume Overlay
  150.     SoundSet,20 ; set Volume to 20
  151. return
  152.  
  153. #^Numpad3::
  154.     Send {Volume_Up} ; shows the Windows Volume Overlay
  155.     SoundSet,30 ; set Volume to 30
  156. return
  157.  
  158. #^Numpad4::
  159.     Send {Volume_Up} ; shows the Windows Volume Overlay
  160.     SoundSet,40 ; set Volume to 30
  161. return
  162.  
  163. #^Numpad5::
  164.     Send {Volume_Up} ; shows the Windows Volume Overlay
  165.     SoundSet,50 ; set Volume to 30
  166. return
  167.  
  168. #^Numpad6::
  169.     Send {Volume_Up} ; shows the Windows Volume Overlay
  170.     SoundSet,60 ; set Volume to 30
  171. return
  172.  
  173. #^Numpad7::
  174.     Send {Volume_Up} ; shows the Windows Volume Overlay
  175.     SoundSet,70 ; set Volume to 30
  176. return
  177.  
  178. #^Numpad8::
  179.     Send {Volume_Up} ; shows the Windows Volume Overlay
  180.     SoundSet,80 ; set Volume to 30
  181. return
  182.  
  183. #^Numpad9::
  184.     Send {Volume_Up} ; shows the Windows Volume Overlay
  185.     SoundSet,90 ; set Volume to 30
  186. return
  187.  
Advertisement
Add Comment
Please, Sign In to add comment