Essential Keyboard Shortcuts for Windows and macOS
Keyboard shortcuts save hours of time. Here are the ones worth memorizing.
Universal Shortcuts
These work on both Windows and macOS (with Cmd instead of Ctrl):
| Action | Windows | macOS |
|---|---|---|
| Copy | Ctrl+C | Cmd+C |
| Cut | Ctrl+X | Cmd+X |
| Paste | Ctrl+V | Cmd+V |
| Select all | Ctrl+A | Cmd+A |
| Undo | Ctrl+Z | Cmd+Z |
| Redo | Ctrl+Y | Cmd+Shift+Z |
| Save | Ctrl+S | Cmd+S |
| Find | Ctrl+F | Cmd+F |
| Ctrl+P | Cmd+P | |
| Close tab | Ctrl+W | Cmd+W |
| New tab | Ctrl+T | Cmd+T |
| Switch tab | Ctrl+Tab | Cmd+Tab |
| Bold | Ctrl+B | Cmd+B |
| Italic | Ctrl+I | Cmd+I |
| Underline | Ctrl+U | Cmd+U |
Text Editing
| Action | Windows | macOS |
|---|---|---|
| Move to word | Ctrl+←/→ | Option+←/→ |
| Select word | Ctrl+Shift+←/→ | Option+Shift+←/→ |
| Move to line start/end | Home/End | Cmd+←/→ |
| Select to line start/end | Shift+Home/End | Cmd+Shift+←/→ |
| Delete word | Ctrl+Backspace | Option+Delete |
| Delete line | Ctrl+Shift+K (VS Code) | Cmd+Shift+K (VS Code) |
| Go to beginning/end | Ctrl+Home/End | Cmd+↑/↓ |
Window Management
| Action | Windows | macOS |
|---|---|---|
| Switch window | Alt+Tab | Cmd+Tab |
| Close window | Alt+F4 | Cmd+W |
| Minimize | Windows+M | Cmd+M |
| Maximize | Windows+↑ | Green button (top left) |
| Snap left/right | Windows+←/→ | Rectangle pro / manual |
| Show desktop | Windows+D | Cmd+F3 |
| Next window (same app) | Ctrl+Tab | Cmd+` |
| Lock screen | Windows+L | Cmd+Ctrl+Q |
Browser Shortcuts
| Action | Windows | macOS |
|---|---|---|
| New tab | Ctrl+T | Cmd+T |
| Close tab | Ctrl+W | Cmd+W |
| Reopen closed tab | Ctrl+Shift+T | Cmd+Shift+T |
| Next/previous tab | Ctrl+Tab / Ctrl+Shift+Tab | Cmd+Option+←/→ |
| Open history | Ctrl+H | Cmd+Y |
| Open downloads | Ctrl+J | Cmd+Shift+J |
| Bookmark this page | Ctrl+D | Cmd+D |
| Full screen | F11 | Cmd+Ctrl+F |
| Zoom in/out | Ctrl++/- | Cmd++/- |
| Reset zoom | Ctrl+0 | Cmd+0 |
| Search bar | Ctrl+L or F6 | Cmd+L |
| View page source | Ctrl+U | Cmd+Option+U |
| Developer tools | F12 | Cmd+Option+I |
| Clear browsing data | Ctrl+Shift+Del | Cmd+Shift+Del |
Screenshots
| Action | Windows | macOS |
|---|---|---|
| Full screen | Windows+PrtScn | Cmd+Shift+3 |
| Selection | Windows+Shift+S | Cmd+Shift+4 |
| Window | Alt+PrtScn | Cmd+Shift+4 → Space |
| Screenshot toolbar | — | Cmd+Shift+5 |
Virtual Desktops
| Action | Windows | macOS |
|---|---|---|
| New desktop | Windows+Ctrl+D | F3 → + (Mission Control) |
| Switch desktop | Windows+Ctrl+←/→ | Ctrl+←/→ |
| Close desktop | Windows+Ctrl+F4 | Hover → ✕ |
VS Code Shortcuts
| Action | Windows | macOS |
|---|---|---|
| Command palette | Ctrl+Shift+P | Cmd+Shift+P |
| Quick file open | Ctrl+P | Cmd+P |
| Sidebar toggle | Ctrl+B | Cmd+B |
| Terminal toggle | Ctrl+` | Ctrl+` |
| Multi-cursor | Alt+Click | Option+Click |
| Find in project | Ctrl+Shift+F | Cmd+Shift+F |
| Format document | Shift+Alt+F | Shift+Option+F |
| Go to definition | F12 | F12 |
| Peek definition | Alt+F12 | Option+F12 |
macOS Trackpad Gestures
| Gesture | Action |
|---|---|
| Two-finger scroll | Scroll up/down |
| Two-finger pinch | Zoom in/out |
| Two-finger tap | Right-click |
| Three-finger swipe up | Mission Control |
| Three-finger swipe down | App Exposé |
| Three-finger swipe left/right | Switch desktop |
| Four-finger pinch | Launchpad |
Creating Your Own Shortcuts
Windows — AutoHotkey
; Example: Win+Space types the date
#Space::
SendInput %A_YYYY%-%A_MM%-%A_DD%
returnmacOS — Keyboard Shortcuts
System Settings → Keyboard → Keyboard Shortcuts → App Shortcuts → +Related: Learn VS Code shortcuts and how to take screenshots.