Keyboard Shortcuts & Keymaps
Effective use of keyboard shortcuts can significantly improve your productivity in ThinkCode. This guide explains how to view, customize, and create your own keymaps to match your workflow.
Default Keyboard Shortcuts
ThinkCode comes with a comprehensive set of default keyboard shortcuts for common operations. Here are some essential shortcuts to get you started:
General
Action | Windows/Linux | macOS |
---|---|---|
Command Palette | Ctrl+Shift+P | Cmd+Shift+P |
Quick Open | Ctrl+P | Cmd+P |
Settings | Ctrl+, | Cmd+, |
Save | Ctrl+S | Cmd+S |
Save All | Ctrl+K S | Cmd+Option+S |
Close Editor | Ctrl+W | Cmd+W |
Toggle Terminal | `Ctrl+`` | `Ctrl+`` |
Editing
Action | Windows/Linux | macOS |
---|---|---|
Cut | Ctrl+X | Cmd+X |
Copy | Ctrl+C | Cmd+C |
Paste | Ctrl+V | Cmd+V |
Undo | Ctrl+Z | Cmd+Z |
Redo | Ctrl+Y | Cmd+Shift+Z |
Find | Ctrl+F | Cmd+F |
Replace | Ctrl+H | Cmd+Option+F |
Multi-Cursor | Alt+Click | Option+Click |
Format Document | Shift+Alt+F | Shift+Option+F |
AI Features
Action | Windows/Linux | macOS |
---|---|---|
AI Explain Code | Alt+Shift+E | Option+Shift+E |
Generate Code | Alt+Shift+G | Option+Shift+G |
Refactor with AI | Alt+Shift+R | Option+Shift+R |
AI Chat | Alt+Shift+C | Option+Shift+C |
Context Panel | Alt+Shift+X | Option+Shift+X |
Keymap Presets
ThinkCode includes several keymap presets to match your experience with other editors:
- ThinkCode Default - The standard keymap
- VS Code Compatible - For those transitioning from VS Code
- Vim - For Vim enthusiasts
- Emacs - For Emacs users
- Sublime Text - For Sublime Text users
- JetBrains IDEs - For users coming from IntelliJ, PyCharm, etc.
To change the keymap preset:
- Open the Command Palette (
Ctrl+Shift+P
orCmd+Shift+P
) - Search for "Preferences: Keymap"
- Select a preset from the dropdown menu
Customizing Keyboard Shortcuts
ThinkCode allows full customization of keyboard shortcuts to suit your workflow:
-
Open Keyboard Shortcuts Editor:
- Navigate to Settings → Keyboard Shortcuts
- Or use the Command Palette to search for "Keyboard Shortcuts"
-
Search for Commands:
- Use the search box to find specific commands
- Browse by category using the dropdown filter
-
Edit a Shortcut:
- Click on the pencil icon next to a command
- Press the desired key combination
- Click the checkmark to save
-
Remove a Shortcut:
- Click the "X" icon next to the shortcut
-
Add a New Shortcut:
- Click the "+" icon to add an additional binding to a command
Creating a Custom Keymap File
For advanced customization, you can create and edit your keymap file directly:
- Open the Command Palette and search for "Open Keyboard Shortcuts (JSON)"
- Edit the
keybindings.json
file:
Each keybinding consists of:
key
: The keyboard shortcutcommand
: The command to executewhen
: Optional context when the shortcut is activeargs
: Optional arguments for the command
Context-Aware Keybindings
ThinkCode supports context-aware keyboard shortcuts that only apply in specific situations using the when
clause:
Common context conditions include:
editorFocus
: When the editor has focusterminalFocus
: When the terminal has focuseditorHasSelection
: When text is selectedaiPanelVisible
: When the AI panel is visibleinCodeLensMode
: When code lens mode is active
Chord Keybindings
You can create multi-step shortcuts (chord keybindings) for advanced workflows:
This requires pressing Ctrl+K
followed by Ctrl+I
.
Language-Specific Shortcuts
Create shortcuts that only apply to specific programming languages:
Importing and Exporting Keymaps
Share your customized keymaps with teammates or across devices:
-
Export:
- Command Palette → "Export Keyboard Shortcuts"
- Save the
.keymap
file
-
Import:
- Command Palette → "Import Keyboard Shortcuts"
- Select a
.keymap
file
Managing Conflicts
When keyboard shortcuts conflict:
- ThinkCode will highlight conflicts in the Keyboard Shortcuts editor
- Prioritization depends on context specificity (more specific contexts win)
- Use the Command Palette's "Show Conflicts" option to find and resolve issues
Best Practices
- Focus on customizing shortcuts for your most frequent actions
- Create a consistent mental model (e.g., use
Ctrl+Shift
for AI features) - Avoid overriding standard system shortcuts
- Document custom shortcuts for team use
- Periodically review and refine your keymaps
Troubleshooting
If keyboard shortcuts aren't working as expected:
- Check for conflicts with system-wide shortcuts
- Verify the context condition in the
when
clause - Restart ThinkCode to apply complex changes
- Reset to default keymap and gradually add customizations
- Ensure extensions haven't overridden your shortcuts
For more advanced keymap customization, refer to the ThinkCode API documentation.