A Firefox extension to map mouse button events or a sequence of events to common browser actions.
Important: This extension requires installation of a client application for listening of mouse events and messaging them to the extension using the Native Messaging Firefox Extension API.
Trigger a browser action on a mouse button event and wheter other mouse buttons are hold down, or with a sequence of mouse button events.
For example, it's possible to switch between tabs with mouse wheel:
- Wheel up + Secondary down -> Change to next tab
- wheel down + Secondary down -> Change to previous tab
Examples of mouse button events in sequence to trigger browser actions:
- Double secondary click -> Open new tab
- Secondary click + Secondary long press -> Duplicate tab
- Button Down
- Button Up
- Button Long Press
- Wheel Up
- Wheel Down
- Primary mouse button
- Secondary mouse button
- Middle mouse button
- Switch to next tab
- Switch to previous tab
- Restore last active tab
- Close tab
- Close other tabs
- Close tabs on left
- Close tabs on right
- Toggle tab pinning
- Duplicate tab
- Reload page
- Back in history
- Forward in history
- Move tab to new window
- Restore closed tab
- Create new tab
- Increase page zoom
- Decrease page zoom
- Reset page zoom
- Scroll top
- Scroll bottom
- Highlight selected text
- Toggle page bookmark
- Toggle reader mode
Requirements: Python 3.6, pipenv, npm
Clone the repository and install python 3.6, npm and pipenv.
Create development environment running:
npm install && pipenv install
Build client application (fbs freeze):
npm run build
Setup Native messaging manifest depending on your OS and set the path property to point to the client application in target folder.
E.g. for linux manifest file:
"path": "<path_to_cloned_repository>/app/target/mousecommander/mousecommander"
Start extension and client application in Firefox:
npm start
For Windows:
- Install NSIS and NsJSON plugin (extract plugin to
%programs%\NSIS\Plugins
) - Install Windows 10 SDK (Windows 10 only)
For Linux:
- Install fpm
For Mac:
- ???
After above setup, create installer by running:
pipenv shell cd app fbs freeze fbs installer
Extension is licensed under the MPL-2.0. Application is licensed under the GPLv3.