Guest User

Untitled

a guest
Mar 1st, 2023
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Requires AutoHotkey v2.0
  2.  
  3. ;XButton1 : Back Button
  4. ;XButton2 : Forward Button
  5. ;WheelLeft/Right: HorizontalWheel
  6. ;WheelUp/Down: Mouse Wheel
  7. ;LButton, RButton, MButton: Standard Mouse Buttons
  8. ;^ : Control
  9. ;+ : Shift
  10. ;! : Alt
  11. ;# : Win
  12.  
  13. ;Keyhistory ; Display the history info in a window
  14.  
  15. ; #######################################################################
  16. ; BACK BUTTON
  17. ; #######################################################################
  18.  
  19. ; Back down = Control down
  20. XButton1::
  21. {
  22.     Send "{Control Down}"
  23. }
  24.  
  25. ; Back Up = Control Up & Send Back as long as no other hotkey was pressed (if last key was Back)
  26. XButton1 Up::
  27. {
  28.     Send "{Control Up}"
  29.     ; Send Back only when the last button pressed was Back as well
  30.     if (A_PriorKey = "XButton1")
  31.     {
  32.         Send "{XButton1}"
  33.     }
  34. }
  35.  
  36. ; Back + RMouse = Control + F1
  37. ; "~" Prevents this chord from interfering with XButton1:: event
  38. ~XButton1 & RButton::
  39. {
  40.     Send "{Control Up}"
  41.     Send "+{F1}"
  42. }
  43.  
  44. ; Back + MMmouse = (Navigate previous tab)
  45. ; "~" Prevents this chord from interfering with XButton1:: event
  46. ~XButton1 & MButton::
  47. {
  48.     Send "{Control Up}"
  49.     Send "^{Tab}"
  50. }
  51.  
  52. ; #######################################################################
  53. ; FORWARD BUTTON
  54. ; #######################################################################
  55.  
  56. ; Forward Down = Shift Down
  57. XButton2::
  58. {
  59.     Send "{Shift Down}"
  60. }
  61.  
  62. ; Foward Up = Shift Up & Send Foward as long as no other hotkey was pressed (if last key was Foward)
  63. XButton2 Up::
  64. {
  65.     Send "{Shift Up}"
  66.     if (A_PriorKey = "XButton2")
  67.     {
  68.         Send "{XButton2}"
  69.     }
  70. }
  71.  
  72. ; Forward + RMouse = F8
  73. ; "~" Prevents this chord from interfering with XButton2:: event
  74. ~XButton2 & RButton::
  75. {
  76.     Send "{Shift Up}"
  77.     Send "{F8}"
  78. }
  79.  
  80. ; Forward + MMmouse = (Navigate previous tab)
  81. ; "~" Prevents this chord from interfering with XButton2:: event
  82. ~XButton2 & MButton::
  83. {
  84.     Send "{Shift Up}"
  85.     Send "^+{Tab}"
  86. }
  87.  
  88. return
Advertisement
Add Comment
Please, Sign In to add comment