Don’t Touch That Mouse! Smart Developers Use Keyboard Shortcuts
Tags: programming, productivity, startup, beginners
Published: 2021-12-13 19:49:57

## TL;DR

> Mouses are slow. Keyboards are fast. If you’re a developer, use keyboard shortcuts to drastically increase your productivity in web browsers, IDEs and code snippet tools like [Pieces](https://pieces.app).

![How it feels using keyboard shortcuts in the Pieces app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p46k3tafxyw9s9l0fzx2.gif)

## The Case for Keyboard Shortcuts
According to [Brainscape…](https://www.brainscape.com/academy/keyboard-shortcuts-revive-economy/)
> If your job requires you to be working on a computer throughout each standard 8-hour workday, then using keyboard shortcuts can save you 8 entire workdays every year.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2i5s7r8bp7s98freppw.jpeg)

A single keystroke may only shave you “0.4 seconds” but think about the hundreds of times you reach for your mouse daily. We’re talking hours per week, days per month, weeks per year.

More importantly, **keyboard shortcuts keep you in your flow and let you work at the speed of thought.**

With some practice, you’ll be able to quickly perform key tasks and navigate menus in your browser, IDE and code snippet tools like [Pieces](https://pieces.app) without ever touching that dreaded mouse.

## The Browser
Let’s start with the good ol’ browser, where you’re probably doing a lot of your development research (and checking crypto prices, flicking through YouTubes and I don’t want to know what else).

[Vimium](https://vimium.github.io/)

Vimium — often referred to as the “hacker’s browser” — is a popular [Chrome extension](https://chrome.google.com/extensions/detail/dbepggeogbaibhgnhhndojpepiihcmeb) (with a [port to Firefox](https://addons.mozilla.org/en-GB/firefox/addon/vimium-ff/)) that allows you to navigate the web using just your keyboard! Shortcuts are based on the [Vim text editor.](https://www.vim.org/)

Some power shortcuts in the GIF below include:

- Follow a hyperlink in a new tab (**F**)
- Scroll up and down (**j**, **k**)
- Switch between tabs (**J**, **K**)

![Vimium features mouse-less scrolling and web page navigation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/luduquhms3s4ersk0kbo.gif)

## Code Snippet Tools Like Pieces
Code snippets are an incredibly helpful way to save time by not re-writing the same code or re-searching for solved solutions.

But it’s always been a hassle to save and work with code snippets.

[Pieces](https://code.pieces.app) is a popular new tool that enables you to save code snippets in less than a second from your code editor or any web page in Chrome and Edge.

And as you can guess, keyboard shortcuts are the heart of this beautifully intuitive app.

**Saving a Snippet from IntelliJ**

Just highlight your snippet and click **⌥** + **⌘** + **P** (Mac) or **Ctrl** + **Alt** + **P** (Windows).


![Saving snippets in IntelliJ with keyboard shortcuts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eupa8xubw84bq9t6qdp6.gif)

**Saving a Snippet from Chrome**

The Pieces [Chrome extension](https://chrome.google.com/webstore/detail/pieces/igbgibhbfonhmjlechmeefimncpekepm?hl=en) makes saving code from the internet a breeze.

Highlight the desired code and hit **⌘** + **Shift** + **P** (Mac) or **Alt** + **Shift** + **P** twice (Windows).

Even easier, while this isn’t technically a keyboard shortcut, Pieces pops up a “Save” button when it detects code on a webpage. A single click will save that snippet.


![Saving to Pieces with Google Chrome](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/46mx2ukbg314gy58sfj5.gif)

**Finding and Re-Using Snippets in Pieces**
To find a snippet in Pieces, just hit / and start searching.

What’s even more helpful is that the Pieces [Chrome extension](https://chrome.google.com/webstore/detail/pieces/igbgibhbfonhmjlechmeefimncpekepm?hl=en) automatically adds the source URL to the snippet as a Related Link. This is one of my favorite features and I no longer have endlessly cluttered Stack Overflow bookmarks with no context.

You can view and manage your related links by hitting **⌘** + **K** (Mac) or **Ctrl** + **K** (Windows).


![Related links in Pieces](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hb6lajem112m18stc7ka.gif)

**So Many Shortcuts**

There are loads of other great keyboard shortcuts throughout Pieces. Hover over almost any action and you’ll see a shortcut option.

Some of my favorites include:

- Rename your snippet: **⌘** + **R** / **Ctrl** + **R**
- Edit the description: **⌘** + **N** / **Ctrl** + **N**
- Reclassify the snippet language: **⌘** + **Y** / **Ctrl** + **Y**
- Open the Quick Menu actions: **⌘** + **O** / **Ctrl** + **O**


![Quickly add a description. Descriptions are searchable, and can span multiple lines.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t51y7iyibg7gqri5jh7k.gif)

## Code Editors
When it’s time to get down to coding, the mouse is your enemy. Let’s look at some critical shortcuts for two popular editors:

**VSCode**

[VSCode](https://code.visualstudio.com/) is one of the most popular free code editors, with [extensions](https://marketplace.visualstudio.com/vscode) for all kinds of programming languages and projects.

{% youtube Xa5EU-qAv-I %}

**IntelliJ**
[IntelliJ](https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html) comes jammed with built-in shortcuts and has a [robust library of plugins](https://plugins.jetbrains.com/) to boost your productivity.

{% youtube QYO5_riePOQ %}

## Resources

**Guake Project**

A simple and easy way to use the terminal without leaving your current application.

[Guake](https://github.com/Guake/guake/blob/master/README.rst) is triggered by a hotkey that drops down a terminal over your desktop, and retreats when that same hotkey is pressed again.

Only available for Linux machines running [Gnome](https://www.gnome.org/) as their desktop environments.


![Guake terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nsyoj9thx69sm92h2jew.jpeg)

**AceJump for IntelliJ**

[AceJump](https://github.com/acejump/AceJump) enables single character search, select and jump inside IntelliJ.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u8cj5mr9axgkbkjb4yur.gif)

**KeyCombiner**

Not to get too meta on you, but [KeyCombiner](https://keycombiner.com/) is a cool app designed to help practice keyboard shortcuts. [Collections](https://keycombiner.com/collections/) are available for many popular apps, including IDEs and web applications.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s2pe13xejqhsfo57kh3z.png)

---

## Wrapping Up

Keyboard shortcuts liberate you from the burden of mouse wiggles and right-clicks. Simple time-saving measures compound into **days** of your life back! **Take the red pill,** learn keyboard shortcuts, and relish in your regained time.


![I know Kung Fu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b5h8vzjdbt74clnrnq41.png)

Thank you for reading! If you enjoyed this article, [check out our app](https://code.pieces.app/install), [follow us on Twitter](https://twitter.com/getpieces), and [give our Medium publication a follow](https://medium.com/getpieces)!