Keyboard Shortcuts
Trae provides a comprehensive set of keyboard shortcuts to help you work more efficiently. These shortcuts are designed to speed up common tasks and improve your development workflow.
Accessing Keyboard Shortcuts
To view all available keyboard shortcuts:
- Open the Command Palette with
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows/Linux) - Type "Keyboard Shortcuts" and select Preferences: Open Keyboard Shortcuts
- Alternatively, use the direct shortcut:
Cmd+K Cmd+S(macOS) orCtrl+K Ctrl+S(Windows/Linux)
General Shortcuts
Command Palette and Quick Actions
| Shortcut | Action | Description |
|---|---|---|
Cmd+Shift+P / Ctrl+Shift+P | Open Command Palette | Access all available commands |
Cmd+P / Ctrl+P | Quick Open | Quickly open files by name |
Cmd+Shift+O / Ctrl+Shift+O | Go to Symbol | Navigate to symbols in current file |
Cmd+T / Ctrl+T | Go to Symbol in Workspace | Navigate to symbols across workspace |
Cmd+G / Ctrl+G | Go to Line | Jump to specific line number |
File Operations
| Shortcut | Action | Description |
|---|---|---|
Cmd+N / Ctrl+N | New File | Create a new file |
Cmd+O / Ctrl+O | Open File | Open an existing file |
Cmd+S / Ctrl+S | Save File | Save current file |
Cmd+Shift+S / Ctrl+Shift+S | Save As | Save file with new name |
Cmd+W / Ctrl+W | Close File | Close current file |
Cmd+Shift+W / Ctrl+Shift+W | Close Window | Close current window |
Navigation
| Shortcut | Action | Description |
|---|---|---|
Cmd+Tab / Ctrl+Tab | Switch Between Files | Cycle through open files |
Cmd+1-9 / Ctrl+1-9 | Switch to Tab | Jump to specific tab by number |
Cmd+\ / Ctrl+\ | Split Editor | Split editor into multiple panes |
Cmd+Shift+\ / Ctrl+Shift+\ | Split Editor Orthogonal | Split editor perpendicular to current split |
Editor Shortcuts
Text Editing
| Shortcut | Action | Description |
|---|---|---|
Cmd+Z / Ctrl+Z | Undo | Undo last action |
Cmd+Shift+Z / Ctrl+Y | Redo | Redo last undone action |
Cmd+X / Ctrl+X | Cut | Cut selected text |
Cmd+C / Ctrl+C | Copy | Copy selected text |
Cmd+V / Ctrl+V | Paste | Paste from clipboard |
Cmd+A / Ctrl+A | Select All | Select all text in file |
Text Selection
| Shortcut | Action | Description |
|---|---|---|
Shift+Arrow | Extend Selection | Extend selection by character/line |
Cmd+Shift+Arrow / Ctrl+Shift+Arrow | Extend Selection by Word | Extend selection by word |
Cmd+L / Ctrl+L | Select Line | Select entire current line |
Cmd+D / Ctrl+D | Select Word | Select word at cursor |
Cmd+Shift+L / Ctrl+Shift+L | Select All Occurrences | Select all occurrences of current selection |
Code Editing
| Shortcut | Action | Description |
|---|---|---|
Cmd+/ / Ctrl+/ | Toggle Line Comment | Comment/uncomment current line |
Cmd+Shift+A / Ctrl+Shift+A | Toggle Block Comment | Comment/uncomment selected block |
Cmd+] / Ctrl+] | Indent Line | Increase indentation |
Cmd+[ / Ctrl+[ | Outdent Line | Decrease indentation |
Cmd+Shift+K / Ctrl+Shift+K | Delete Line | Delete current line |
Alt+Up/Down | Move Line Up/Down | Move current line up or down |
Shift+Alt+Up/Down | Copy Line Up/Down | Duplicate current line up or down |
Code Navigation
| Shortcut | Action | Description |
|---|---|---|
F12 | Go to Definition | Navigate to symbol definition |
Cmd+F12 / Ctrl+F12 | Go to Implementation | Navigate to symbol implementation |
Shift+F12 | Find All References | Find all references to symbol |
F2 | Rename Symbol | Rename symbol across workspace |
Cmd+. / Ctrl+. | Quick Fix | Show available quick fixes |
Search and Replace
| Shortcut | Action | Description |
|---|---|---|
Cmd+F / Ctrl+F | Find | Open find dialog |
Cmd+H / Ctrl+H | Replace | Open find and replace dialog |
Cmd+Shift+F / Ctrl+Shift+F | Find in Files | Search across all files |
Cmd+Shift+H / Ctrl+Shift+H | Replace in Files | Replace across all files |
F3 / Ctrl+G | Find Next | Go to next search result |
Shift+F3 / Ctrl+Shift+G | Find Previous | Go to previous search result |
Panel and Sidebar Management
| Shortcut | Action | Description |
|---|---|---|
Cmd+B / Ctrl+B | Toggle Sidebar | Show/hide sidebar |
Cmd+J / Ctrl+J | Toggle Panel | Show/hide bottom panel |
Cmd+Shift+E / Ctrl+Shift+E | Show Explorer | Open file explorer |
Cmd+Shift+G / Ctrl+Shift+G | Show Source Control | Open source control panel |
Cmd+Shift+D / Ctrl+Shift+D | Show Debug | Open debug panel |
Cmd+Shift+X / Ctrl+Shift+X | Show Extensions | Open extensions panel |
Terminal Shortcuts
| Shortcut | Action | Description |
|---|---|---|
Cmd+`` / Ctrl+`` | Toggle Terminal | Show/hide integrated terminal |
Cmd+Shift+`` / Ctrl+Shift+`` | New Terminal | Create new terminal instance |
Cmd+\ / Ctrl+\ | Split Terminal | Split terminal into multiple panes |
AI Assistant Shortcuts
| Shortcut | Action | Description |
|---|---|---|
Cmd+I / Ctrl+I | Inline Chat | Open AI inline chat |
Cmd+Shift+I / Ctrl+Shift+I | Chat Panel | Open AI chat panel |
Cmd+K / Ctrl+K | AI Commands | Access AI-powered commands |
Tab | Accept AI Suggestion | Accept AI code suggestion |
Esc | Dismiss AI Suggestion | Dismiss AI code suggestion |
Debug Shortcuts
| Shortcut | Action | Description |
|---|---|---|
F5 | Start Debugging | Start or continue debugging |
Shift+F5 | Stop Debugging | Stop debugging session |
Cmd+Shift+F5 / Ctrl+Shift+F5 | Restart Debugging | Restart debugging session |
F10 | Step Over | Step over current line |
F11 | Step Into | Step into function call |
Shift+F11 | Step Out | Step out of current function |
F9 | Toggle Breakpoint | Add/remove breakpoint |
Customizing Keyboard Shortcuts
You can customize keyboard shortcuts to match your preferences:
Modifying Existing Shortcuts
- Open Keyboard Shortcuts settings (
Cmd+K Cmd+S/Ctrl+K Ctrl+S) - Find the command you want to modify
- Click the pencil icon next to the shortcut
- Press your desired key combination
- Press
Enterto confirm
Adding New Shortcuts
- In the Keyboard Shortcuts settings, click the + button
- Search for the command you want to assign a shortcut to
- Press your desired key combination
- Press
Enterto confirm
Removing Shortcuts
- Find the shortcut you want to remove
- Right-click on the shortcut
- Select Remove Keybinding
Resetting to Defaults
- Right-click on a modified shortcut
- Select Reset Keybinding
- The shortcut will return to its default value
Keybinding Conflicts
Trae automatically detects and highlights keybinding conflicts:
- Warning Icon: Indicates conflicting shortcuts
- Conflict Resolution: Choose which command should use the shortcut
- Alternative Shortcuts: Assign different shortcuts to conflicting commands
Platform-Specific Shortcuts
macOS Specific
| Shortcut | Action | Description |
|---|---|---|
Cmd+, | Open Preferences | Access Trae settings |
Cmd+Q | Quit Application | Close Trae completely |
Cmd+M | Minimize Window | Minimize current window |
Cmd+Option+F | Replace in Files | Advanced replace options |
Windows/Linux Specific
| Shortcut | Action | Description |
|---|---|---|
Ctrl+, | Open Preferences | Access Trae settings |
Alt+F4 | Close Application | Close Trae completely |
Ctrl+Shift+N | New Window | Open new Trae window |
F11 | Toggle Full Screen | Enter/exit full screen mode |
Productivity Tips
Efficient Workflow Shortcuts
- Quick File Navigation: Use
Cmd+P/Ctrl+Pto quickly open files by typing part of their name - Symbol Navigation: Use
Cmd+Shift+O/Ctrl+Shift+Oto jump to functions, classes, or variables - Multi-cursor Editing: Use
Cmd+D/Ctrl+Dto select multiple instances of the same word - Command Palette: Use
Cmd+Shift+P/Ctrl+Shift+Pto access any command without remembering its shortcut
Customization Recommendations
- Assign Frequently Used Commands: Create shortcuts for commands you use often
- Use Consistent Patterns: Follow consistent modifier key patterns for related commands
- Avoid Conflicts: Check for conflicts with system shortcuts or other applications
- Document Custom Shortcuts: Keep a record of your custom shortcuts for reference
Keyboard Shortcut Reference Card
For quick reference, you can:
- Print the keyboard shortcuts reference from the Help menu
- Export your custom shortcuts configuration
- Share shortcut configurations with your team
- Import shortcuts from other editors or IDEs