Skip to content

Instantly share code, notes, and snippets.

@cheater
Created September 1, 2020 23:48
Show Gist options
  • Save cheater/23a2710ffc6bc2895aa2d82f5b7ca6a8 to your computer and use it in GitHub Desktop.
Save cheater/23a2710ffc6bc2895aa2d82f5b7ca6a8 to your computer and use it in GitHub Desktop.
Firefox quick tab switching and search - AutoHotKey script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
; Only allow one instance of this script to run. If this script is run again,
; replace the old instance with the new one.
#SingleInstance Force
; Only use those hotkeys if Firefox is the current window
#IfWinActive ahk_class MozillaWindowClass
; go to previous tab on F1 or if you hold the right mouse button and scroll up
~RButton & WheelUp::
F1::
Send, ^{PgUp}
return
; go to next tab on F2 or if you hold the right mouse button and scroll down
~RButton & WheelDown::
F2::
Send, ^{PgDn}
return
; move tab left
+F1::
Send, +^{PgUp}
return
; move tab right
+F2::
Send, +^{PgDn}
return
; search backwards
F3::
Send, +^g
return
; search forward
F4::
Send, ^g
return
; click mouse button
Pause::
MouseClick
return
#IfWinActive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment