Three Ways to Use AutoHotKey to Rock Your Firefox Experience

AutoHotkey Numeric Keypad for Firefox

We are devoted aficionados of AutoHotkey, an open-source scripting language that can be used to religiously automate repetitive tasks on the Microsoft Windows operating system tasks and save time. AutoHotkey primarily works by overriding the default key commands on any software that runs on Windows. The core of AutoHotkey is a custom scripting language that can help define keyboard shortcuts or hotkeys.

If the keyboard on your Windows computer has a numeric keypad, you can use the keys on the numeric keypad to assist you with using the Firefox browser. By installing and running these scripts to scroll and close tabs, you don’t need to move your hands a long way from the mouse. Here are three simple scripts.

Scroll Down a Firefox Page using the ‘Add’ Key on the Numeric Keypad

This simple script substitutes the ‘Page Down’ key with the ‘Add’ key on the numeric keypad, thus helping you scroll down on Firefox pages.

NumpadAdd::
        Send {PgDn}
Return

Scroll Up a Firefox Page using the ‘Subtract’ Key on the Numeric Keypad

This simple script substitutes the ‘Page Up’ key with the ‘Subtract’ key on the numeric keypad, thus helping you scroll up on Firefox pages.

NumpadSub::
        Send {PgUp}
Return

Close a Firefox Tab using the ‘Pause’ Key

This simple script substitutes the ‘Control + F4’ key combination with the ‘Pause’ key on your keypad, thus helping you close the current tab in the Firefox application.

Pause::
        Send ^{F4}
Return

This AutoHotkey Script Needs ‘MozillaWindowClass’

To restrict the customization of these special keys just to the Firefox browser, you will need to an #IfWinActive block with the ahk_class set to MozillaWindowClass. Here is the full script. Actually, MozillaWindowClass refers to any window in any Mozilla application; hence you will notice that these shortcuts work on the Mozilla Thunderbird email application as well.

#IfWinActive ahk_class MozillaWindowClass
        Pause::
                Send ^{F4}
        Return
        NumpadAdd::
                Send {PgDn}
        Return
        NumpadSub::
                Send {PgUp}
        Return
#IfWinActive

For a basic introduction to the utility of AutoHotkey and a tutorial on installing AutoHotkey and compiling AutoHotkey scripts, see this useful YouTube video or this orderly guide from howtogeek.

Leave a Reply

Your email address will not be published. Required fields are marked *