IDE
Keyboard shortcuts
These shortcuts work in the IDE. On a Mac, Cmd is the Command key and Option is the Alt key.
Some shortcuts use Ctrl on a Mac too, not Cmd. The tables say so where that is the case.
Run your code
| Action | Windows and Linux | Mac |
|---|---|---|
| Run the program | Ctrl+Enter | Ctrl+Enter |
The cursor must be in the code editor.
Suggestions
| Action | Windows and Linux | Mac |
|---|---|---|
| Get an inline AI autocomplete suggestion | Ctrl+I | Cmd+I |
| Open the AI menu | Ctrl+K | Cmd+K |
| Run an AI menu option | Ctrl+K, then 1 to 7 | Cmd+K, then 1 to 7 |
| Accept the inline AI suggestion | Tab | Tab |
| Dismiss the inline AI suggestion | Esc | Esc |
| Open the autocomplete list | Ctrl+Space | Option+Space |
| Move through the list | Up and Down arrows | Up and Down arrows |
| Accept from the list | Enter or Tab | Enter or Tab |
| Close the list | Esc | Esc |
Each press of Ctrl+I (Cmd+I on a Mac) uses 1 AI credit. See autocomplete and AI suggestions.
Editing
| Action | Windows and Linux | Mac |
|---|---|---|
| Undo | Ctrl+Z | Cmd+Z |
| Redo | Ctrl+Y or Ctrl+Shift+Z | Cmd+Y or Cmd+Shift+Z |
| Select all | Ctrl+A | Cmd+A |
| Comment or uncomment lines | Ctrl+/ | Cmd+/ |
| Indent the selected lines | Tab | Tab |
| Outdent the selected lines | Shift+Tab | Shift+Tab |
| Delete the line | Ctrl+D | Cmd+D |
| Duplicate the line | Ctrl+Shift+D | Cmd+Shift+D |
| Move the line up or down | Alt+Up or Alt+Down | Option+Up or Option+Down |
| Copy the line up or down | Alt+Shift+Up or Alt+Shift+Down | Cmd+Option+Up or Cmd+Option+Down |
Debugger
These work while a debug session is running. Continue and the step keys work only while the program is paused.
| Action | Windows and Linux | Mac |
|---|---|---|
| Continue | Alt+C | Option+C |
| Step over | Alt+O | Option+O |
| Step into | Alt+I | Option+I |
| Step out | Alt+U | Option+U |
| Stop | Alt+S | Option+S |
Terminal
| Action | Windows and Linux | Mac |
|---|---|---|
| Copy the selected text | Ctrl+C | Ctrl+C |
| Paste | Ctrl+V | Ctrl+V |
When no text is selected, Ctrl+C goes to your program instead, which usually stops it.
AI assistant
| Action | Windows and Linux | Mac |
|---|---|---|
| Send your message | Enter | Enter |
| Start a new line | Shift+Enter | Shift+Enter |
Menus and dialogs
| Action | Keys |
|---|---|
| Close a menu or dialog | Esc |
| Move through a list | Up and Down arrows |
| Choose the highlighted item | Enter |
What next
Autocomplete and AI suggestions explains both kinds of suggestion.
Editor settings lists every setting.