Keyboard Shortcuts
Trae Plugin provides a comprehensive set of keyboard shortcuts to help you work more efficiently. These shortcuts allow you to quickly access AI features, navigate the interface, and perform common tasks without leaving your keyboard.
General Shortcuts
Chat and AI Features
| Shortcut | Action | Description |
|---|---|---|
Ctrl+U (Windows/Linux)Cmd+U (macOS) | Open AI Chat | Opens the AI chat sidebar |
Ctrl+Shift+U (Windows/Linux)Cmd+Shift+U (macOS) | Toggle Builder Mode | Switches between Chat and Builder modes |
Ctrl+Enter (Windows/Linux)Cmd+Enter (macOS) | Send Message | Sends your message to the AI assistant |
Shift+Enter | New Line | Adds a new line in the chat input |
Ctrl+/ (Windows/Linux)Cmd+/ (macOS) | Quick AI Action | Opens quick AI action menu |
Code Generation and Editing
| Shortcut | Action | Description |
|---|---|---|
Ctrl+Shift+G (Windows/Linux)Cmd+Shift+G (macOS) | Generate Code | Generates code based on selection or cursor position |
Ctrl+Shift+E (Windows/Linux)Cmd+Shift+E (macOS) | Explain Code | Explains the selected code |
Ctrl+Shift+R (Windows/Linux)Cmd+Shift+R (macOS) | Refactor Code | Refactors the selected code |
Ctrl+Shift+T (Windows/Linux)Cmd+Shift+T (macOS) | Generate Tests | Generates unit tests for selected code |
Ctrl+Shift+C (Windows/Linux)Cmd+Shift+C (macOS) | Add Comments | Adds comments to selected code |
Fast Apply
| Shortcut | Action | Description |
|---|---|---|
Ctrl+Enter (Windows/Linux)Cmd+Enter (macOS) | Apply Suggestion | Applies the current AI suggestion |
Ctrl+Shift+Enter (Windows/Linux)Cmd+Shift+Enter (macOS) | Apply All | Applies all pending suggestions |
Ctrl+Shift+P (Windows/Linux)Cmd+Shift+P (macOS) | Preview Changes | Shows a preview of changes before applying |
Escape | Dismiss Suggestion | Dismisses the current suggestion |
Navigation
| Shortcut | Action | Description |
|---|---|---|
Ctrl+Shift+H (Windows/Linux)Cmd+Shift+H (macOS) | Show History | Opens the chat history panel |
Ctrl+Shift+F (Windows/Linux)Cmd+Shift+F (macOS) | Find in Chat | Searches within chat history |
Up Arrow | Previous Message | Navigates to previous message in chat input |
Down Arrow | Next Message | Navigates to next message in chat input |
Context Menu Shortcuts
Right-click Context Menu
When you right-click on selected code, you can access these AI features:
- Explain Code - Get an explanation of the selected code
- Generate Comments - Add descriptive comments
- Refactor - Improve code structure and readability
- Generate Tests - Create unit tests
- Fix Issues - Identify and fix potential problems
Editor Context Actions
| Shortcut | Action | Description |
|---|---|---|
Ctrl+. (Windows/Linux)Cmd+. (macOS) | Quick Fix | Shows AI-powered quick fix suggestions |
Alt+Enter (Windows/Linux)Option+Enter (macOS) | Code Actions | Shows available code actions |
Cue (Code Completion) Shortcuts
| Shortcut | Action | Description |
|---|---|---|
Tab | Accept Suggestion | Accepts the current code completion suggestion |
Enter | Accept Suggestion | Alternative way to accept suggestions |
Escape | Dismiss Suggestions | Closes the suggestion popup |
Ctrl+Space (Windows/Linux)Cmd+Space (macOS) | Trigger Suggestions | Manually triggers code suggestions |
Arrow Keys | Navigate Suggestions | Moves through available suggestions |
Builder Mode Shortcuts
| Shortcut | Action | Description |
|---|---|---|
Ctrl+Shift+B (Windows/Linux)Cmd+Shift+B (macOS) | Toggle Builder | Switches to Builder mode |
Ctrl+Shift+A (Windows/Linux)Cmd+Shift+A (macOS) | Accept All Changes | Accepts all pending file changes |
Ctrl+Shift+D (Windows/Linux)Cmd+Shift+D (macOS) | Reject All Changes | Rejects all pending file changes |
Ctrl+Shift+V (Windows/Linux)Cmd+Shift+V (macOS) | Preview Changes | Opens preview window |
Terminal Integration
| Shortcut | Action | Description |
|---|---|---|
Ctrl+Shift+\`` (Windows/Linux)<br>Cmd+Shift+`` (macOS) | AI Terminal Help | Gets AI assistance for terminal commands |
Ctrl+Alt+T (Windows/Linux)Cmd+Option+T (macOS) | Explain Command | Explains the current terminal command |
Customizing Shortcuts
You can customize these shortcuts through VS Code's keyboard shortcuts settings:
- Open VS Code settings (
Ctrl+,on Windows/Linux,Cmd+,on macOS) - Go to Keyboard Shortcuts (
Ctrl+K Ctrl+Son Windows/Linux,Cmd+K Cmd+Son macOS) - Search for "Trae" to find all Trae-related shortcuts
- Click on a shortcut to modify it
- Enter your preferred key combination
Tips for Efficient Use
- Learn the most common shortcuts first: Start with
Ctrl+Ufor chat andCtrl+Enterfor applying suggestions - Use context menus: Right-click on code for quick access to AI features
- Combine with VS Code shortcuts: Trae shortcuts work well with existing VS Code shortcuts
- Practice regularly: The more you use shortcuts, the more natural they become
- Customize as needed: Adjust shortcuts to match your workflow preferences
Troubleshooting
If shortcuts aren't working:
- Check for conflicts: Ensure shortcuts don't conflict with other extensions
- Verify plugin status: Make sure Trae Plugin is active
- Restart VS Code: Sometimes a restart resolves shortcut issues
- Reset to defaults: You can reset shortcuts to default values in settings
For additional support, refer to the Support documentation.