Keyboard Shortcuts Cheatsheet
Essential keyboard shortcuts for developers — system, VS Code, Chrome DevTools, terminal, Git, and browser navigation on both Mac and Windows.
System / General
| Action | Mac | Windows / Linux |
|---|---|---|
| Copy | Cmd + C | Ctrl + C |
| Paste | Cmd + V | Ctrl + V |
| Cut | Cmd + X | Ctrl + X |
| Undo | Cmd + Z | Ctrl + Z |
| Redo | Cmd + Shift + Z | Ctrl + Y |
| Select all | Cmd + A | Ctrl + A |
| Find | Cmd + F | Ctrl + F |
| Find and replace | Cmd + H | Ctrl + H |
| Save | Cmd + S | Ctrl + S |
| Close window / tab | Cmd + W | Ctrl + W |
| Quit application | Cmd + Q | Alt + F4 |
| Switch apps | Cmd + Tab | Alt + Tab |
| Screenshot (full) | Cmd + Shift + 3 | Win + PrtSc |
| Screenshot (area) | Cmd + Shift + 4 | Win + Shift + S |
| Lock screen | Cmd + Ctrl + Q | Win + L |
| Spotlight / Search | Cmd + Space | Win + S |
VS Code
| Action | Mac | Windows / Linux |
|---|---|---|
| Command Palette | Cmd + Shift + P | Ctrl + Shift + P |
| Quick Open file | Cmd + P | Ctrl + P |
| Toggle terminal | Ctrl + ` | Ctrl + ` |
| Toggle sidebar | Cmd + B | Ctrl + B |
| Go to definition | F12 | F12 |
| Peek definition | Opt + F12 | Alt + F12 |
| Find in files | Cmd + Shift + F | Ctrl + Shift + F |
| Move line up / down | Opt + ↑ / ↓ | Alt + ↑ / ↓ |
| Copy line up / down | Opt + Shift + ↑ / ↓ | Alt + Shift + ↑ / ↓ |
| Delete line | Cmd + Shift + K | Ctrl + Shift + K |
| Multi-cursor | Opt + Click | Alt + Click |
| Select all occurrences | Cmd + Shift + L | Ctrl + Shift + L |
| Comment / uncomment line | Cmd + / | Ctrl + / |
| Format document | Opt + Shift + F | Alt + Shift + F |
| Rename symbol | F2 | F2 |
| Split editor | Cmd + \ | Ctrl + \ |
| Fold / unfold region | Cmd + Opt + [ / ] | Ctrl + Shift + [ / ] |
Chrome DevTools
| Action | Mac | Windows / Linux |
|---|---|---|
| Open DevTools | Cmd + Opt + I | F12 / Ctrl + Shift + I |
| Open Console | Cmd + Opt + J | Ctrl + Shift + J |
| Inspect element | Cmd + Shift + C | Ctrl + Shift + C |
| Toggle device mode | Cmd + Shift + M | Ctrl + Shift + M |
| Clear console | Cmd + K | Ctrl + L |
| Search across files | Cmd + Opt + F | Ctrl + Shift + F |
| Run command | Cmd + Shift + P | Ctrl + Shift + P |
| Next / prev panel | Cmd + ] / [ | Ctrl + ] / [ |
| Hard refresh (no cache) | Cmd + Shift + R | Ctrl + Shift + R |
Terminal / Shell
| Action | Mac | Windows / Linux |
|---|---|---|
| Clear terminal | Cmd + K / Ctrl + L | cls / Ctrl + L |
| Cancel command | Ctrl + C | Ctrl + C |
| End of input (EOF) | Ctrl + D | Ctrl + D |
| Move cursor to start | Ctrl + A | Home |
| Move cursor to end | Ctrl + E | End |
| Delete word backward | Ctrl + W | Ctrl + Backspace |
| Previous command | ↑ / Ctrl + P | ↑ |
| Search command history | Ctrl + R | Ctrl + R |
| New tab | Cmd + T | Ctrl + Shift + T |
| Suspend process | Ctrl + Z | Ctrl + Z |
Git (Command Line)
| Action | Mac | Windows / Linux |
|---|---|---|
| Stage all changes | git add -A | git add -A |
| Commit with message | git commit -m "msg" | git commit -m "msg" |
| Push to remote | git push | git push |
| Pull latest | git pull | git pull |
| Check status | git status | git status |
| View log (compact) | git log --oneline | git log --oneline |
| Create & switch branch | git checkout -b name | git checkout -b name |
| Stash changes | git stash | git stash |
| Apply stash | git stash pop | git stash pop |
| Diff staged changes | git diff --staged | git diff --staged |
Browser Navigation
| Action | Mac | Windows / Linux |
|---|---|---|
| New tab | Cmd + T | Ctrl + T |
| Close tab | Cmd + W | Ctrl + W |
| Reopen closed tab | Cmd + Shift + T | Ctrl + Shift + T |
| Next tab | Cmd + Opt + → | Ctrl + Tab |
| Previous tab | Cmd + Opt + ← | Ctrl + Shift + Tab |
| Go to tab 1-8 | Cmd + 1-8 | Ctrl + 1-8 |
| Address bar | Cmd + L | Ctrl + L |
| Refresh page | Cmd + R | F5 / Ctrl + R |
| Back / Forward | Cmd + ← / → | Alt + ← / → |
| Bookmark page | Cmd + D | Ctrl + D |
FAQ
What is the Mac equivalent of Ctrl on Windows?
The Cmd (Command / ⌘) key on Mac corresponds to Ctrl on Windows for most shortcuts. The Mac Ctrl key is a separate key used primarily for terminal emulator shortcuts and right-click context menus.
How can I learn keyboard shortcuts faster?
Start with 3-5 shortcuts you'd use daily (e.g., Cmd+P for Quick Open, Cmd+Shift+P for Command Palette, Cmd+/ for comment). Practice them deliberately for a week before adding more. Most editors also have shortcut reference sheets you can print.
Can I customize VS Code keyboard shortcuts?
Yes. Open Keyboard Shortcuts with Cmd+K Cmd+S (Mac) or Ctrl+K Ctrl+S (Windows). You can search for any command and rebind it to your preferred key combination. VS Code also supports importing keymaps from other editors like Vim, Emacs, and Sublime Text.