Keyboard Shortcuts Every Developer Should Know
A curated guide to the most impactful keyboard shortcuts across VS Code, terminal, browser DevTools, and your operating system for faster, more focused development.
Keyboard Shortcuts Every Developer Should Know
There is a particular moment, familiar to anyone who has watched an experienced developer work, when the screen seems to rearrange itself without any visible effort. Files open, text rearranges, terminals split and merge, and the mouse sits untouched on the desk. It looks like magic, but it is really just muscle memory built on a foundation of well-chosen keyboard shortcuts. The gap between a developer who relies on menus and one who has internalized a few dozen shortcuts is not trivial - it compounds across thousands of interactions every day.
This guide covers the shortcuts that matter most across VS Code, the terminal, browser DevTools, and your operating system. Not an exhaustive dump of every keybinding, but a curated set you will actually use.
VS Code: Where You Spend Most of Your Day
VS Code has hundreds of keybindings, but a core set of about twenty will handle 90% of your editing needs. Start here.
Navigation and File Management
Command Palette (Cmd+Shift+P on Mac, Ctrl+Shift+P on Windows/Linux) is the single most important shortcut in VS Code. It surfaces every command the editor offers, so even if you forget a specific keybinding, you can search for it here. Get in the habit of reaching for the Command Palette before reaching for a menu.
Quick Open (Cmd+P / Ctrl+P) lets you open any file by typing part of its name. In large projects, this is orders of magnitude faster than navigating a file tree. Type a filename, and fuzzy matching handles the rest. You can also type : followed by a line number to jump directly to that line, or @ to jump to a symbol within the current file.
Go to Definition (F12) and Peek Definition (Alt+F12) are essential for navigating codebases. F12 jumps to where a function or variable is defined. Alt+F12 opens a small inline window showing the definition without leaving your current file - perfect for a quick glance.
Go Back / Go Forward (Ctrl+- / Ctrl+Shift+- on Mac, Alt+Left / Alt+Right on Windows) lets you navigate your cursor history. After jumping to a definition, press Go Back to return to where you were. This pair of shortcuts makes exploratory code reading feel effortless.
Editing and Selection
Multi-cursor editing is where VS Code really shines. Press Cmd+D (Ctrl+D) to select the next occurrence of the current word, then press it again to add another cursor at the next occurrence. Need to rename a variable in five places? Select them all and type the new name once. To add cursors manually, hold Alt and click wherever you want them.
Move Line Up/Down (Alt+Up / Alt+Down) reorders lines without cutting and pasting. Select multiple lines and move them as a block. Similarly, Alt+Shift+Up/Down duplicates the current line.
Toggle Line Comment (Cmd+/ / Ctrl+/) comments or uncomments the current line or selection. Simple, but you will use it dozens of times a day.
Expand/Shrink Selection (Cmd+Shift+Left/Right or Shift+Alt+Left/Right for smart selection) grows or shrinks the selection by semantic units - from a word to a string to a function argument to an entire expression. This is far more useful than shift-clicking.
Integrated Terminal
Toggle Terminal (Ctrl+`) opens and closes the integrated terminal. Split Terminal (Cmd+\ in the terminal panel) gives you side-by-side terminal windows for running a dev server in one and tests in another. Cmd+Shift+[ and Cmd+Shift+] switch between terminal tabs.
Search and Replace
Find in Files (Cmd+Shift+F / Ctrl+Shift+F) searches the entire workspace. Enable regex mode with the .* button for pattern matching - once you are comfortable with regex patterns, this becomes incredibly powerful.
Find and Replace (Cmd+H / Ctrl+H) in a single file, or Cmd+Shift+H for workspace-wide replace. Use capture groups in regex mode to restructure text - for example, swapping the order of function arguments across an entire codebase.
If you work with code formatting and need to quickly transform variable names between conventions, the Text Case Converter can handle bulk transformations outside your editor.
Terminal Shortcuts: Moving at the Speed of Thought
Whether you use Bash, Zsh, or Fish, the underlying terminal shortcuts (mostly inherited from GNU Readline) are consistent and worth learning.
Line Editing
Ctrl+A- Move cursor to the beginning of the lineCtrl+E- Move cursor to the end of the lineCtrl+W- Delete the word before the cursorAlt+D- Delete the word after the cursorCtrl+U- Delete from cursor to the beginning of the lineCtrl+K- Delete from cursor to the end of the lineCtrl+Y- Paste (yank) the last deleted text
These six shortcuts eliminate the need to hold arrow keys or reach for the mouse when editing commands. Ctrl+U is especially handy when you have typed a long command and want to start over without reaching for Home and then Shift+End.
History and Search
Ctrl+R triggers reverse incremental search through your command history. Start typing, and the terminal finds the most recent command matching your input. Press Ctrl+R again to cycle through older matches. This alone can replace the habit of pressing the up arrow fifty times.
!! repeats the last command. sudo !! is the classic use case - when you run a command and realize it needed root privileges, sudo !! reruns it with sudo prepended.
Alt+. (or !$) inserts the last argument from the previous command. If you just ran mkdir my-project, typing cd Alt+. expands to cd my-project.
Process Control
Ctrl+C- Kill the current foreground processCtrl+Z- Suspend the current process (resume withfg)Ctrl+D- Send EOF (exit the shell if the line is empty)Ctrl+L- Clear the screen (equivalent toclearbut faster)
Browser DevTools: Debugging Without the Mouse
Chrome, Firefox, and Edge share most of the same DevTools shortcuts, though there are minor differences. These apply to Chromium-based browsers.
Opening DevTools
F12orCmd+Option+I(Ctrl+Shift+I) - Toggle DevToolsCmd+Option+J(Ctrl+Shift+J) - Open DevTools directly to ConsoleCmd+Option+C(Ctrl+Shift+C) - Open DevTools in element inspection mode
The element inspection shortcut is the fastest path to clicking on an element and seeing its CSS. No need to right-click and choose "Inspect."
Console Tricks
Inside the Console panel, $0 references the currently selected element in the Elements panel. $_ references the result of the last evaluated expression. $$('selector') is shorthand for document.querySelectorAll, which is much faster than typing the full method.
Cmd+K clears the console. Shift+Enter lets you write multi-line expressions without executing them.
Network and Performance
Cmd+Shift+E (Ctrl+Shift+E) opens the Network tab. Before reproducing a network issue, check the "Preserve log" box so entries do not disappear on page navigation.
Cmd+Shift+P opens the DevTools Command Menu (similar to VS Code's Command Palette). From here you can take screenshots, disable JavaScript, simulate different network speeds, switch to dark mode, and access dozens of hidden features.
Responsive Design
Cmd+Shift+M (Ctrl+Shift+M) toggles device toolbar mode for responsive testing. Pair this with the throttling dropdown to simulate slow mobile connections.
Operating System Shortcuts
These transcend any single application and will speed up your general workflow.
macOS
Cmd+Space- Spotlight search (launch apps, find files, do calculations)Cmd+Tab- Switch between applications; holdCmdand pressTabrepeatedly to cycleCmd+`- Switch between windows of the same applicationCtrl+Up- Mission Control (see all windows)Ctrl+Left/Right- Switch between desktopsCmd+Shift+4- Screenshot a selected area; addSpaceto capture a specific windowCmd+Option+Esc- Force quit applicationsCmd+Shift+.- Show/hide hidden files in Finder
Windows and Linux
Win+E- Open File ExplorerWin+D- Show desktopWin+Tab- Task view / virtual desktopsWin+Arrow keys- Snap windows to halves or quadrantsWin+Shift+S(Windows) - Screenshot toolAlt+Tab- Switch windowsWin+L- Lock the screen
Window Management
If you are not using window snapping, start now. On macOS, tools like Rectangle or the native Stage Manager handle this. On Windows, Win+Left and Win+Right snap the active window to half the screen. Win+Up maximizes, Win+Down restores or minimizes. Keeping your editor on one half and a terminal or browser on the other is a fundamental layout for development work.
Building the Habit
Knowing about shortcuts and actually using them are different things. Here is a practical approach to building keyboard fluency:
Start with three. Pick the three shortcuts from this article that address your most common friction points. Maybe it is Quick Open, multi-cursor, and Ctrl+R in the terminal. Use only those three deliberately for a full week.
Put a sticky note on your monitor. Write down your three shortcuts and put them where you will see them. When you catch yourself reaching for the mouse to do something one of your shortcuts covers, stop and use the shortcut instead. The first few times will feel slower. By day three, it will feel natural.
Use VS Code's shortcut trainer. Install the "Learn Keybindings" extension or simply open Keyboard Shortcuts (Cmd+K Cmd+S) and browse. You can also search for a specific action you find yourself doing manually and learn its keybinding.
Print a cheat sheet. This sounds old-fashioned, but a printed reference card on your desk is faster to glance at than switching to a browser tab. Many developer communities maintain well-designed code reference sheets that you can print or keep as a quick desktop reference.
Gradually expand. Once your first three shortcuts are automatic, pick three more. Over the course of a month, you will have internalized a dozen shortcuts that save you real time every day. Over a year, the cumulative effect on your speed and flow state is substantial.
The Compounding Returns
A single shortcut might save you two seconds. That seems insignificant in isolation. But consider how many times a day you open a file, search through code, switch between applications, or edit a line of text. If you perform 200 such actions per day and each shortcut saves an average of two seconds, that is almost seven minutes daily - roughly 28 hours per year spent not waiting for menus, not dragging the mouse, not breaking your train of thought.
The real benefit is not even the time saved. It is the cognitive continuity. Every time you move your hand from the keyboard to the mouse, find the right menu, click the right option, and return your hand to the keyboard, there is a tiny context switch. Your working memory takes a hit. Shortcuts keep you in flow, and flow is where your best work happens.
The shortcuts listed here are not exhaustive. They are a starting point - the ones that deliver the most value for the least memorization effort. Start small, be deliberate, and let muscle memory do the rest.
Related Tools
Code Syntax Highlighter
Add syntax highlighting to code in 22 languages with 7 color themes, line numbers, and export to HTML
Text Case Converter
Convert text between 12 cases: UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, path/case, Sentence, and Alternating
Related Articles
Try Our Free Tools
200+ browser-based tools for developers and creators. No uploads, complete privacy.
Explore All Tools