Skip to content

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:

  1. Open the Command Palette with Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)
  2. Type "Keyboard Shortcuts" and select Preferences: Open Keyboard Shortcuts
  3. Alternatively, use the direct shortcut: Cmd+K Cmd+S (macOS) or Ctrl+K Ctrl+S (Windows/Linux)

General Shortcuts

Command Palette and Quick Actions

ShortcutActionDescription
Cmd+Shift+P / Ctrl+Shift+POpen Command PaletteAccess all available commands
Cmd+P / Ctrl+PQuick OpenQuickly open files by name
Cmd+Shift+O / Ctrl+Shift+OGo to SymbolNavigate to symbols in current file
Cmd+T / Ctrl+TGo to Symbol in WorkspaceNavigate to symbols across workspace
Cmd+G / Ctrl+GGo to LineJump to specific line number

File Operations

ShortcutActionDescription
Cmd+N / Ctrl+NNew FileCreate a new file
Cmd+O / Ctrl+OOpen FileOpen an existing file
Cmd+S / Ctrl+SSave FileSave current file
Cmd+Shift+S / Ctrl+Shift+SSave AsSave file with new name
Cmd+W / Ctrl+WClose FileClose current file
Cmd+Shift+W / Ctrl+Shift+WClose WindowClose current window
ShortcutActionDescription
Cmd+Tab / Ctrl+TabSwitch Between FilesCycle through open files
Cmd+1-9 / Ctrl+1-9Switch to TabJump to specific tab by number
Cmd+\ / Ctrl+\Split EditorSplit editor into multiple panes
Cmd+Shift+\ / Ctrl+Shift+\Split Editor OrthogonalSplit editor perpendicular to current split

Editor Shortcuts

Text Editing

ShortcutActionDescription
Cmd+Z / Ctrl+ZUndoUndo last action
Cmd+Shift+Z / Ctrl+YRedoRedo last undone action
Cmd+X / Ctrl+XCutCut selected text
Cmd+C / Ctrl+CCopyCopy selected text
Cmd+V / Ctrl+VPastePaste from clipboard
Cmd+A / Ctrl+ASelect AllSelect all text in file

Text Selection

ShortcutActionDescription
Shift+ArrowExtend SelectionExtend selection by character/line
Cmd+Shift+Arrow / Ctrl+Shift+ArrowExtend Selection by WordExtend selection by word
Cmd+L / Ctrl+LSelect LineSelect entire current line
Cmd+D / Ctrl+DSelect WordSelect word at cursor
Cmd+Shift+L / Ctrl+Shift+LSelect All OccurrencesSelect all occurrences of current selection

Code Editing

ShortcutActionDescription
Cmd+/ / Ctrl+/Toggle Line CommentComment/uncomment current line
Cmd+Shift+A / Ctrl+Shift+AToggle Block CommentComment/uncomment selected block
Cmd+] / Ctrl+]Indent LineIncrease indentation
Cmd+[ / Ctrl+[Outdent LineDecrease indentation
Cmd+Shift+K / Ctrl+Shift+KDelete LineDelete current line
Alt+Up/DownMove Line Up/DownMove current line up or down
Shift+Alt+Up/DownCopy Line Up/DownDuplicate current line up or down

Code Navigation

ShortcutActionDescription
F12Go to DefinitionNavigate to symbol definition
Cmd+F12 / Ctrl+F12Go to ImplementationNavigate to symbol implementation
Shift+F12Find All ReferencesFind all references to symbol
F2Rename SymbolRename symbol across workspace
Cmd+. / Ctrl+.Quick FixShow available quick fixes

Search and Replace

ShortcutActionDescription
Cmd+F / Ctrl+FFindOpen find dialog
Cmd+H / Ctrl+HReplaceOpen find and replace dialog
Cmd+Shift+F / Ctrl+Shift+FFind in FilesSearch across all files
Cmd+Shift+H / Ctrl+Shift+HReplace in FilesReplace across all files
F3 / Ctrl+GFind NextGo to next search result
Shift+F3 / Ctrl+Shift+GFind PreviousGo to previous search result

Panel and Sidebar Management

ShortcutActionDescription
Cmd+B / Ctrl+BToggle SidebarShow/hide sidebar
Cmd+J / Ctrl+JToggle PanelShow/hide bottom panel
Cmd+Shift+E / Ctrl+Shift+EShow ExplorerOpen file explorer
Cmd+Shift+G / Ctrl+Shift+GShow Source ControlOpen source control panel
Cmd+Shift+D / Ctrl+Shift+DShow DebugOpen debug panel
Cmd+Shift+X / Ctrl+Shift+XShow ExtensionsOpen extensions panel

Terminal Shortcuts

ShortcutActionDescription
Cmd+`` / Ctrl+`` Toggle TerminalShow/hide integrated terminal
Cmd+Shift+`` / Ctrl+Shift+`` New TerminalCreate new terminal instance
Cmd+\ / Ctrl+\Split TerminalSplit terminal into multiple panes

AI Assistant Shortcuts

ShortcutActionDescription
Cmd+I / Ctrl+IInline ChatOpen AI inline chat
Cmd+Shift+I / Ctrl+Shift+IChat PanelOpen AI chat panel
Cmd+K / Ctrl+KAI CommandsAccess AI-powered commands
TabAccept AI SuggestionAccept AI code suggestion
EscDismiss AI SuggestionDismiss AI code suggestion

Debug Shortcuts

ShortcutActionDescription
F5Start DebuggingStart or continue debugging
Shift+F5Stop DebuggingStop debugging session
Cmd+Shift+F5 / Ctrl+Shift+F5Restart DebuggingRestart debugging session
F10Step OverStep over current line
F11Step IntoStep into function call
Shift+F11Step OutStep out of current function
F9Toggle BreakpointAdd/remove breakpoint

Customizing Keyboard Shortcuts

You can customize keyboard shortcuts to match your preferences:

Modifying Existing Shortcuts

  1. Open Keyboard Shortcuts settings (Cmd+K Cmd+S / Ctrl+K Ctrl+S)
  2. Find the command you want to modify
  3. Click the pencil icon next to the shortcut
  4. Press your desired key combination
  5. Press Enter to confirm

Adding New Shortcuts

  1. In the Keyboard Shortcuts settings, click the + button
  2. Search for the command you want to assign a shortcut to
  3. Press your desired key combination
  4. Press Enter to confirm

Removing Shortcuts

  1. Find the shortcut you want to remove
  2. Right-click on the shortcut
  3. Select Remove Keybinding

Resetting to Defaults

  1. Right-click on a modified shortcut
  2. Select Reset Keybinding
  3. 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

ShortcutActionDescription
Cmd+,Open PreferencesAccess Trae settings
Cmd+QQuit ApplicationClose Trae completely
Cmd+MMinimize WindowMinimize current window
Cmd+Option+FReplace in FilesAdvanced replace options

Windows/Linux Specific

ShortcutActionDescription
Ctrl+,Open PreferencesAccess Trae settings
Alt+F4Close ApplicationClose Trae completely
Ctrl+Shift+NNew WindowOpen new Trae window
F11Toggle Full ScreenEnter/exit full screen mode

Productivity Tips

Efficient Workflow Shortcuts

  1. Quick File Navigation: Use Cmd+P / Ctrl+P to quickly open files by typing part of their name
  2. Symbol Navigation: Use Cmd+Shift+O / Ctrl+Shift+O to jump to functions, classes, or variables
  3. Multi-cursor Editing: Use Cmd+D / Ctrl+D to select multiple instances of the same word
  4. Command Palette: Use Cmd+Shift+P / Ctrl+Shift+P to access any command without remembering its shortcut

Customization Recommendations

  1. Assign Frequently Used Commands: Create shortcuts for commands you use often
  2. Use Consistent Patterns: Follow consistent modifier key patterns for related commands
  3. Avoid Conflicts: Check for conflicts with system shortcuts or other applications
  4. Document Custom Shortcuts: Keep a record of your custom shortcuts for reference

Keyboard Shortcut Reference Card

For quick reference, you can:

  1. Print the keyboard shortcuts reference from the Help menu
  2. Export your custom shortcuts configuration
  3. Share shortcut configurations with your team
  4. Import shortcuts from other editors or IDEs

Your Ultimate AI-Powered IDE Learning Guide