If, like me, you also have the dream of one day driving your entire PC with just your keyboard, or if you’re a Vim enthusiast, you definitely need to try this cute browser called Qutebrowser.
What is Qutebrowser, and why you should use it
It’s way faster to use and easier on your wrists
Qutebrowser is a free and open-source project which uses a special version of the Chromium engine (called QtWebEngine). The browser respects your privacy and doesn’t embed any trackers or telemetry. It does everything a normal browser can do, except you can do so entirely with a keyboard.
But why bother learning to browse the web with a keyboard? I can give you two reasons.
- It’s faster. Normally, browsing the web means switching between keyboard and mouse one after another. If your hands never left the keyboard, you’re saving the time you would have spent switching back and forth hundreds of times. Also, keyboard shortcuts are arguably faster than moving the cursor around and clicking stuff.
- Browsing the internet with a standard keyboard and mouse means you’re making repetitive and precise hand movements to reach the mouse and aim, click, or scroll with it. Naturally, after a while, your dominant hand gets tired. If you eliminate the mouse or trackpad factor, your hands will simply be resting on the keyboard home row at all times. You can see why it’s more ergonomic.
For the past couple of years, I’ve started noticing that my right wrist (I’m right-handed) gets fatigued quickly. So I’ve spent some time putting together a keyboard-first desktop (using the i3 tiling window manager) and Qutebrowser. It has helped minimize my mouse usage, which in turn helps with my wrist problems.
Once you learn to use Qutebrowser, it actually feels like a superpower. Whenever I go back to a regular browser after using Qutebrowser, it feels slow and clunky.
Setting up Qutebrowser
You can install it with a single command
Qutebrowser is available on Linux, macOS, and Windows. For macOS and Windows, you can download the installers from the Qutebrowser website. On Linux, you can use your distro’s default package manager to install it. Both apt and pacman have it in the official repos.
sudo apt update
sudo apt install qutebrowser
Use the desktop shortcut or enter qutebrowser in a terminal to launch it. Note how strikingly minimalist the interface is compared to a regular browser. There is just a status bar at the bottom and tab indicators at the top.
To access different menus and settings, you just type : without selecting anything. Then you can use Tab to cycle through different command suggestions.
It’s also much more customizable than any mainstream browser. You can edit the Qutebrowser config to make it look and behave precisely how you want.
Navigating the browser with your keyboard
Learning the Vim modes
Qutebrowser uses what’s called Vim modes and keybindings. Normally, when you’re editing a text file, you use the mouse to navigate and select the text, and you use the keyboard to type. What if you could do both things with the keyboard? That would remove the need for a mouse entirely. That’s what Vim is built on.
By default, when you open the Vim text editor, it opens in “Normal” mode. Normal mode is the navigation mode. You can use the j and k keys to scroll down and scroll up. You can press h to scroll left and l to scroll right.
You might be wondering why not use the standard arrow keys instead j, k, h, and l. The idea is to keep your fingers on the home row key. Even though most people are used to the arrow keys for navigation, you’ll have to move your hand to reach them. By using the four home row keys for navigation, you can switch between typing and navigating without losing speed.
You can tap the g key twice and this gg shortcut will instantly move you to the top of the text file. You can hold down Shift and press g, and G will instantly take you to the very bottom of the text file. There is a whole slew of these keybindings that make navigation fast and painless.
Then there’s Insert mode. The i key is reserved for this mode. Wherever you press the i key, it’ll instantly switch to the “typing” mode. When you’re done typing, you can drop into the “navigation” mode again by pressing Esc.
Qutebrowser uses these same Vim principles. There are many keybindings, but you don’t need to learn them all.
Technically, there is also a Caret mode which lets you select and copy text without a mouse. You can press v and Shift+v to switch to it. In caret mode, the j, k, h, and l keys let you highlight text. You can copy or “yank” it with y.
Some Qutebrowser keybindings to get you started
Learn these few basic keybindings, and they’ll get you 80% of the way there. You can always look up the full list of keybindings by typing :help.
Remember, you must be in Normal mode to navigate. The status bar at the bottom indicates whether you’re in Normal mode or Insert mode.
Open a website or search with the default search engine
Press o and start typing. You can type a URL here or a search query, just like you would in a regular browser. Press enter to load it.
Click and interact with the web page
With the web page loaded, you can now interact with it by highlighting links. Press f and Qutebrowser will show little tags on all clickable or interactive elements of that page. For example, I searched for the “gentoo wiki” on the status bar when I pressed o earlier. Pressing f reveals all these highlighted links. If I want to open the first search result, I’ll press j then a. I can open the Wikipedia link by typing kd.
Scroll and jump around on a web page
However, if I want to scroll through this Google search page. I can press Esc to clear the highlighted links. Then I press j to scroll down and k to scroll up. Typing gg takes me back to the top of the page. And hitting Shift+g jumps the cursor to the bottom.
Switch between tabs and closing tabs
Let’s say I’ve already opened a link and I want to go back to the results page. I can press Shift+h and Shift+l to go back and forward.
Hold down Shift and press o to load a web search or a website in a new tab.
Now that you have multiple tabs open, you can cycle between them using Shift+k and Shift+j. You can jump to specific tabs by pressing Alt+[tab number].
To close a tab, press d. If you close one accidentally, press u to undo. Press u multiple times to keep opening recently closed tabs in order. To reload a tab, press r.
Typing on web pages
When you want to type some text in a form or input field, you’ll want to switch to the Insert mode. If the cursor is already on the input field, just press the i key and start typing. If you need to move the cursor to the typing area, press f and follow the keybinding to click the field. Most of the time, this will automatically switch you to Insert mode. Keep an eye at the bottom of the status bar.
Some caveats you should know
You might need to use the mouse occasionally, and it doesn’t support extensions
As efficient as this Vim-based environment is, it’s not perfect. Occasionally, the link highlight feature will miss an interactive element that you want to interact with. Sometimes, websites steal focus and capture your cursor in their input fields, even if you’re in Normal mode. You’ll be forced to use your mouse in both those scenarios. I find them to be rare though.
Also, some sites might ask you to upgrade your browser when you’re using Qutebrowser. In my experience, those are just harmless warnings because the websites load and work just fine most of the time.
The biggest caveat is its lack of support for extensions. The most you can do is run user scripts to access things like your password managers.
It takes a little bit of patience to learn this, but it’s worth it
There is a little bit of a learning curve with Qutebrowser, especially if you’ve never used Vim bindings before. But I can personally testify that learning them is worth it. In the beginning, it felt somewhat frustrating to stick to the keyboard, but a few days in, it started to become muscle memory. It’s kind of like learning to ride a bicycle, I think. It also means that you can come back to this workflow after ages and the muscle memory will kick in almost instantly.
