Skip to content

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

ShortcutActionDescription
Ctrl+U (Windows/Linux)
Cmd+U (macOS)
Open AI ChatOpens the AI chat sidebar
Ctrl+Shift+U (Windows/Linux)
Cmd+Shift+U (macOS)
Toggle Builder ModeSwitches between Chat and Builder modes
Ctrl+Enter (Windows/Linux)
Cmd+Enter (macOS)
Send MessageSends your message to the AI assistant
Shift+EnterNew LineAdds a new line in the chat input
Ctrl+/ (Windows/Linux)
Cmd+/ (macOS)
Quick AI ActionOpens quick AI action menu

Code Generation and Editing

ShortcutActionDescription
Ctrl+Shift+G (Windows/Linux)
Cmd+Shift+G (macOS)
Generate CodeGenerates code based on selection or cursor position
Ctrl+Shift+E (Windows/Linux)
Cmd+Shift+E (macOS)
Explain CodeExplains the selected code
Ctrl+Shift+R (Windows/Linux)
Cmd+Shift+R (macOS)
Refactor CodeRefactors the selected code
Ctrl+Shift+T (Windows/Linux)
Cmd+Shift+T (macOS)
Generate TestsGenerates unit tests for selected code
Ctrl+Shift+C (Windows/Linux)
Cmd+Shift+C (macOS)
Add CommentsAdds comments to selected code

Fast Apply

ShortcutActionDescription
Ctrl+Enter (Windows/Linux)
Cmd+Enter (macOS)
Apply SuggestionApplies the current AI suggestion
Ctrl+Shift+Enter (Windows/Linux)
Cmd+Shift+Enter (macOS)
Apply AllApplies all pending suggestions
Ctrl+Shift+P (Windows/Linux)
Cmd+Shift+P (macOS)
Preview ChangesShows a preview of changes before applying
EscapeDismiss SuggestionDismisses the current suggestion
ShortcutActionDescription
Ctrl+Shift+H (Windows/Linux)
Cmd+Shift+H (macOS)
Show HistoryOpens the chat history panel
Ctrl+Shift+F (Windows/Linux)
Cmd+Shift+F (macOS)
Find in ChatSearches within chat history
Up ArrowPrevious MessageNavigates to previous message in chat input
Down ArrowNext MessageNavigates 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

ShortcutActionDescription
Ctrl+. (Windows/Linux)
Cmd+. (macOS)
Quick FixShows AI-powered quick fix suggestions
Alt+Enter (Windows/Linux)
Option+Enter (macOS)
Code ActionsShows available code actions

Cue (Code Completion) Shortcuts

ShortcutActionDescription
TabAccept SuggestionAccepts the current code completion suggestion
EnterAccept SuggestionAlternative way to accept suggestions
EscapeDismiss SuggestionsCloses the suggestion popup
Ctrl+Space (Windows/Linux)
Cmd+Space (macOS)
Trigger SuggestionsManually triggers code suggestions
Arrow KeysNavigate SuggestionsMoves through available suggestions

Builder Mode Shortcuts

ShortcutActionDescription
Ctrl+Shift+B (Windows/Linux)
Cmd+Shift+B (macOS)
Toggle BuilderSwitches to Builder mode
Ctrl+Shift+A (Windows/Linux)
Cmd+Shift+A (macOS)
Accept All ChangesAccepts all pending file changes
Ctrl+Shift+D (Windows/Linux)
Cmd+Shift+D (macOS)
Reject All ChangesRejects all pending file changes
Ctrl+Shift+V (Windows/Linux)
Cmd+Shift+V (macOS)
Preview ChangesOpens preview window

Terminal Integration

ShortcutActionDescription
Ctrl+Shift+\`` (Windows/Linux)<br>Cmd+Shift+`` (macOS)AI Terminal HelpGets AI assistance for terminal commands
Ctrl+Alt+T (Windows/Linux)
Cmd+Option+T (macOS)
Explain CommandExplains the current terminal command

Customizing Shortcuts

You can customize these shortcuts through VS Code's keyboard shortcuts settings:

  1. Open VS Code settings (Ctrl+, on Windows/Linux, Cmd+, on macOS)
  2. Go to Keyboard Shortcuts (Ctrl+K Ctrl+S on Windows/Linux, Cmd+K Cmd+S on macOS)
  3. Search for "Trae" to find all Trae-related shortcuts
  4. Click on a shortcut to modify it
  5. Enter your preferred key combination

Tips for Efficient Use

  1. Learn the most common shortcuts first: Start with Ctrl+U for chat and Ctrl+Enter for applying suggestions
  2. Use context menus: Right-click on code for quick access to AI features
  3. Combine with VS Code shortcuts: Trae shortcuts work well with existing VS Code shortcuts
  4. Practice regularly: The more you use shortcuts, the more natural they become
  5. Customize as needed: Adjust shortcuts to match your workflow preferences

Troubleshooting

If shortcuts aren't working:

  1. Check for conflicts: Ensure shortcuts don't conflict with other extensions
  2. Verify plugin status: Make sure Trae Plugin is active
  3. Restart VS Code: Sometimes a restart resolves shortcut issues
  4. Reset to defaults: You can reset shortcuts to default values in settings

For additional support, refer to the Support documentation.

Your Ultimate AI-Powered IDE Learning Guide