Share your AutoHotKeys for Firefox!

Discussion of features in Mozilla Firefox
Locked
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Share your AutoHotKeys for Firefox!

Post by semigeek »

I've discovered AutoHotKey and am finding it very useful. I almost put this post in the "Extensions" forum because AHK can set up hotkeys specific to a particular program/window, allowing it to do things in Firefox that one would otherwise need an add-on for, and functioning similarly to the long lamented keyconfig add-on. (Not entirely, as AHK has no access to internal functions.) Here are a few examples I put together yesterday:

Code: Select all

^`::°

#IfWinActive ahk_exe firefox.exe
+^o::
Send !t
Sleep 30
Send o
Return

>+>^c::
Send ^t
Sleep 30
Send about:config{Enter}
Return

+^r::
Send +^j
Sleep 200
Send !^r
Sleep 3000
Send ^w
Return
The first is a simple remapping that enters the hard-to-type degree symbol (°) with Ctrl-`, in any program, including Thunderbird. The rest work only in Firefox thanks to #IfWinActive.

Ctrl-Shft-O opens the Options tab by sending keys AltT, O.

RightCtrl-Shft-C opens about:config in a new tab. (LeftCtrl-Shft-C remains available to open Inspector.)

Ctrl-Shft-R restarts Firefox with the same tabs, via the Console, which it then closes again. Very useful for debugging user css.

AHK can also set up volume keys for keyboards that lack them, and virtually anything else I can think of. Please share your favorite hotkeys for Firefox! (A search here didn't turn up many.)
Locked