Home

Awesome

Keyboard Shortcut API

This repo contains a prototype API implemented as a WebExtension Experiment for Firefox that aims to address Bug 1215061 - Better keyboard shortcut support as mentioned in comment 44. This API triggers Firefox's native shortcuts programmatically.

While extensions such as Vimium-FF and Saka Key make do only with what's provided to regular WebExtensions, prior art in Vimium demonstrates limitations. These include loss of functionality on protected pages requiring non-Vimium motions to navigate away from and Vimium needing to implement its own location and findbar. In tandem with Colin Caine's Keyboard API, this API landing means a user can define their own motions for Firefox's shortcuts and be usable anywhere they normally are. It is our hope this use will go a long way in Vimperator or Pentadactyl successors.

Usage

  1. Get the latest Firefox Nightly.
  2. Ensure extensions.legacy.enabled is set to "true" in about:config (an Experiment is really a legacy extension).
  3. Enter about:debugging and load keyboard-shortcut-api/schema.json to load the API.
  4. Load /test-extension/manifest.json to load our test extension that adds a browser action (i.e., a button on your toolbar) which opens a sample page that calls the functions our API returns.

Considerations for reviewers