These are the Best Keyboard Shortcuts for Programmers

Andrew Musholt
5 min readDec 19, 2021

Is it really worth it?

For most jobs, I would argue it is worth it to learn keyboard shortcuts. For programmers, the productivity boost is undeniable.

Not only does it save time, but the keyboard is actually more precise than the mouse. In addition to saving time, it takes less mental energy/focus.

The idea is, learn to use your keyboard for EVERYTHING you possibly can. From the simple, basic shortcuts like CTRL + C (copy) and CTRL + P (paste) to the more advanced shortcuts like switching between virtual desktops (CTRL + WIN + ARROW), learning these will result in a massive amount of time saved.

It is a little hard to get started. But once you learn a couple, learning more becomes easier and easier….as most of these shortcuts are just different combinations of the same few keys. Not only that, but certain shortcuts actually become MORE effective when used in combination with others.

*** You may be able to skip the first few….just kept them in the article because they are the best place to start if you haven’t learned them.

How to Learn These

The best way to learn this, like all things, is just a matter of practicing consistently over time. Reading this article once will do you no good.

I recommend bookmarking this page, and revisiting it each day. Practice 1 new shortcut for a few minutes, and then commit to using it throughout the rest of the day.

It really doesn’t take long to learn one, but using it throughout your work day is what will make it stick forever.

Once you learn several, commit to using using the mouse as little as possible — try to do as much as you can without ever touching the mouse.

Again, learn one new shortcut per day. Use it in your work. Before you know it you won’t even think about it anymore.

Keyboard Shortcuts — Prioritized by Usefulness

1. Cut, Copy, Paste — CTRL + X, CTRL + C, CTRL + V

You probably already know these…but if not, this is definitely where to start. Programmers copy/paste hundreds of times a day (StackOverflow into your project :D) and this will let you do it faster and more precisely. It will also get you used to hitting the CTRL key, which is the base for most of the other shortcuts.

2. Select Everything— CTRL + A

This selects the entire document text. Very useful for clearing a log file (CTRL + A, DELETE).

3. Undo — CTRL +Z

Undo the last action quickly.

4. Find — CTRL + F

Find a word or phrase in the document. Press enter to move to the next instance of the word or phrase. Use CTRL + R for a similar “find and replace” function, which is useful when you change a variable name and need to refactor/replace all instances of that variable’s usages.

5. Jump From Word to Word — CTRL + ARROW

Normally, pressing the right/left arrow keys moves the cursor one letter. This will let you move between entire words. This can be useful when combined with the shift key to highlight a word. For example, you can CTRL + SHIFT + ARROW to highlight a word, then CTRL + C to copy it.

6. Delete Word — CTRL + BACKSPACE

Typos are super common. And most of the time, we only recognize them after we already typed out the full word. And it is much quicker to retype the word than to correct it (arrowing to the specific letter and fixing it). If you are working on your typing speed, this is actually where most of your time is lost — miss-typing/fixing typos instead of just deleting the whole word and starting over.

You can read more about increasing your typing speed here:

7. Switch Windows — ALT + TAB

Press (and hold) ALT + TAB to display all of your windows in a pane. Continue tapping the tab until your desired window is selected. Windows actually puts your “most recent” windows closest, so it is extremely convenient and efficient even when you have a ton of windows open.

Add the shift key to tab the opposite direction (ALT + SHIFT + TAB)

8. Close Windows — ALT+F4

Instead of reaching for the mouse, navigating to the “X” button in the upper right corner, just learn to hit this. If your desktop becomes cluttered with too many open windows, use this in combination with ALT + TAB (from #5) to clean up your workspace.

9. Navigate to Start/End of Line — HOME, END

In the same way we can jump around words by CTRL + ARROW, using HOME and END lets you jump to the start / end of the current line.

This can be extremely useful when used in combination with SHIFT for highlight a line….either to copy it or delete it.

For example, if you are in the middle of a line you want to copy, press HOME, then SHIFT + END, then CTRL + C. You have copied the entire line in about a second. Doing this with a mouse takes forever, and is extremely error prone (you usually end up missing a letter, highlighting the next line, etc.)

10. Navigate to Top/Bottom of Document — CTRL + HOME, CTRL + END

Similar to #7 for the start/end of a line, add the CTRL key to hop to the very top or bottom of a document.

Can be useful for quickly moving back to the top of a document to view global variables, documentation comments, namespaces, and other things that tend to live on the top of documents.

11. Open as Admin — CTRL + SHIFT + ENTER

As programmers, many programs require admin access to run. Most config files will also require admin rights to access.

Press the WINDOWS key, type out the program you want, then hit CTRL + SHIFT + ENTER.

12. Virtual Desktops

With windows, you can have multiple instances of a desktop at once (basically, having two or more identical “computers” you can interact with)

Press WIN + TAB to create one or more virtual desktops.

This can be very useful for separating fairly different tasks. A very common setup is to have your programming tasks on one desktop, then your email (work + personal) on another desktop.

Any time you want to check your email, you can press CTRL + WIN + RIGHT ARROW. Then to return back to your work, CTRL + WIN + LEFT ARROW.

And there you have it! These cover the majority of all commonly-used keyboard actions.

Again, simply reading this article will do nothing. Make sure to bookmark this page, revisit it each day, and try to learn/use one new shortcut each day.

Some Other Good Ones:

ALT + ARROW — in a browser, like hitting “forward” and “back” buttons

WIN + ARROW — snap windows

CTRL + SHIFT + V — paste as plain text

WIN + M — minimize all windows

F2 — rename selected file/folder

--

--