Add a ton of keyboard shortcuts to Firefox and Chrome with Surfingkeys
Do you use keyboard shortcuts while browsing? F5, Ctrl + T, Ctrl + Enter, Backspace are some of the common ones that most users use.
If you're a power user, and wanted more shortcuts, that's exactly what Surfingkeys adds to Firefox and Chrome.
Install the add-on and use the shift and ? keys to view a help page that lists all available keyboard shortcuts. Press Escape to dismiss the help page. Try some of those shortcuts. For example, you can press e to scroll up half of the page, or d to scroll down. Surfingkeys uses keyboard combinations that require pressing 2 or 3 keys.
Tap on the y key and quickly hit t. This will open a duplicate tab, i.e, a copy of the current tab. There are three-key shortcuts too. For instance, pressing s, q and l displays the last action that was performed. The last thing we did was open a duplicate tab, so the box that pops-up will display "yt".
The extension also makes use of the Alt, Ctrl and Shift keys. Some shortcuts will require you to hold down one of these three keys, followed by other keys. Case matters too. Try the capital E shortcut, by holding Shift down and tapping e once. This switches to the tab on the left, as opposed to the small e which is used to scroll up. Speaking of which, use the j and k keys for smooth scrolling down pages.
Let's try one more special combination, this time trigger the yT hotkey (that's a small y and a capital T). You know what to do, tap y, then hold shift and press T. This shortcut loads a duplicate tab (just like the other yt combo), but as a background tab, in other words, without switching to it.
Experiment with the other shortcuts, there are plenty of options that can perform various actions like switching tabs, page navigation, mouse click, scroll page, search using selected text, clipboard (capture pages, links, text) etc, add a bookmark.
Unsure where the links are on a web page? Tap the f key and Surfingkeys will place visual indicators wherever a link is available. All keyboard shortcuts in Surfingkeys are customizable from the add-on's options page.
Select some text and press sg, this will use the text to search in Google. Similarly, you can hit sd for searching with duckduckgo, sb for baidu, sw for bing, ss for stackoverflow, sh for github, sy for youtube.
Tap yg to take a screenshot of the visible part of the page you're on. The add-on will display a pop-up preview of the captured content. The screenshot is NOT saved to the clipboard. So, you'll need to right-click on the pop-up and select save image as, or copy image (to the clipboard).
Note: If it doesn't seem to work, make sure you haven't selected any text on the page. That's because the extension has a different set of actions for "selected text" and will not respond to other commands until you deselect the content.
Surfingkeys supports scrolling screenshots. You can take a screenshot of an entire web page. To do this use yG. Similarly, yS captures a screenshot till the scrolling target. But it didn't work for me, and kept scrolling to the end of the page.
Surfingkeys displays a pop-up bar when you press some keys. Press t to search and open URLs from the bookmarks or the history. b does the same thing but only displays your bookmarks.
For e.g. I tap t and then type "ghacks" and it displays some results from my history. The search is done in real-time, it takes a couple of seconds the first time it searches, but the speed improves with subsequent searches.
Hit ZZ to save all your tabs and quit the browser. The session is saved as "Last". ZR will restore the saved session. This option does work in both Firefox and Chrome, and with multiple windows.
WARNING: Use this with caution. If your browser already saved the session, and you chose to restore it with Surfingkeys, the extension loads another copy of the saved tabs. So, if you had 100 tabs saved, restoring it will add an extra 100 tabs. I had to use "close tabs to the right" to quit the duplicate tabs.
Tap v to enter visual mode. You'll see a bunch of letters appear on the screen. These are shortcuts to place the cursor at that location of the chosen letters.
For e.g. If I type GR, Surfingkeys will place the cursor at the location where the letters "GR" were.
The cursor will also appear thicker, that's because the extension has entered the Caret mode. A small banner appears on the screen to indicate the status. In Caret mode, the cursor is ready to be moved to a location of your choice.
After placing the cursor where you want it to, tap v again. The banner changes from Caret to Range.
Remember: Caret = move cursor, Range = Select mode.
This is similar to Vim's visual mode. So you can use the hjkl keys to move the cursor (right/left/up/down), and it begins to select the text accordingly. Now that you have some text selected, you can perform some actions. t will translate it, sg will use the text to perform a search in Google, and so on.
Surfingkeys has many more advanced features including vim-like marks, Vim Editor, PDF Viewer. I recommend reading the GitHub page, the list of features is massive and the official page is very informative.