Keyboard Shortcuts¶
Learning a few keyboard shortcuts can save you a lot of time while programming.
General¶
The following shortcuts work in most apps on every operating system.
Linux/Windows | macOS | Action |
---|---|---|
Ctrl+X | Cmd+X | Cut |
Ctrl+C | Cmd+C | Copy |
Ctrl+V | Cmd+V | Paste |
Ctrl+Z | Cmd+Z | Undo |
Ctrl+Y | Cmd+Y | Redo |
Ctrl+A | Cmd+A | Select all |
Ctrl+S | Cmd+S | Save |
Ctrl+W | Cmd+W | Close tab |
Alt+Tab | Cmd+Tab | Switch apps |
VS Code¶
Most tasks in Visual Studio Code can be done with the keyboard (without the mouse). The most important shortcut to remember is F1 which opens the command palette. From here, you can search for any command available in VS Code.
Another shortcut worth memorizing is "Format document" which corrects the indentation and spacing in your code.
- Linux: Ctrl+Shift+I
- macOS: Alt+Shift+F
- Windows: Alt+Shift+F
Additional shortcuts are linked below:
Website¶
This website uses keyboard shortcuts to make browsing easier. There are two modes:
global
-
This mode is active when search is not focussed and when there's no other focussed element that is susceptible to keyboard input. The following keys are bound:
- F , S , / : open search dialog
- P , , : go to previous page
- N , . : go to next page
search
-
This mode is active when the search is focused. The following keys are bound:
- Down , Up : select next / previous result
- Esc , Tab : close search dialog
- Enter : follow selected result