Custom keyboard shortcuts for WebExtension (Chrome, Firefox)
***YOU HAVE TO REFRESH YOUR TABS AFTER ADDING SHORTCUTS***
Shortkeys makes it easy to add custom shortcuts to your browser for the following actions:
- Run custom JS
- Do nothing (for disabling a Chrome shortcut you don't like)
- Open a bookmark or bookmarklet
- Scroll up/down/left/right by a little or a lot
- Scroll to the top or bottom of the page
- Go back or forward in history
- Jump to existing tab by URL
- Open new tab with URL
- Switch to the previous/next/first/last tab
- Create a new tab or close the current tab
- Clone the current tab
- Close the current window
- Close all (unpinned) tabs except for current tab
- Reopen the last closed tab
- Reload the page
- Copy the current URL
- Pin/Unpin the current tab
- Move the current tab left or right
- Zoom in/out/reset
- Blacklist or whitelist specific shortcuts on specific sites
- Clear downloads (page and bar)
- Click button and switch to next tab (for Tribal Wars players)
It's has options for enabling or disabling key combos while you're currently focused on a form field, so you can have keyboard shortcuts like "r" or "shift+h" and still be able to type those values into a form without triggering the shortcut if you want.
You can also blacklist or whitelist sites per-shortcut, to pick and choose which shortcuts you don't want active on which sites.
Shortkeys lets you use pretty much any key combo you want. Key combos are zero or more modifier keys (including ⇑, shift, option, ⌥, alt, ctrl, control, command, and ⌘), and one action key (letter, number, punctuation, or special key shown below), combined with + signs.
Examples: "shift+r", "k", "ctrl+alt+f7", "command+pageup", etc.
You can also string multiple key combos together to make key sequences (like how Gmail has "g i" to go to inbox). Examples: "g g" or "ctrl+t shift+f7".
Special action keys that can be used include backspace, tab, clear, enter, return, esc, escape, space, up, down, left, right, home, end, pageup, pagedown, del, delete and f1 through f19.
Follow me on Twitter for updates. http://twitter.com/mcrittenden
Shortkeys also requires read/write clipboard permissions so that import and export from clipboard can function.
If you're still nervous, you're more than welcome to look at the source code: https://github.com/mikecrittenden/chrome-shortkeys/ or you can even view the source of the extension you have installed on your computer (if you're afraid the published source code is different than what actually gets installed) by using this method: http://orenyomtov.com/how-to-view-a-google-chrome-extensions-full-source-code.html