Keyboard Shortcuts for AI Workflows
Power-user keyboard shortcuts for Claude Code and AI-assisted development. Master terminal navigation, context management, and rapid skill invocation.
Keyboard Shortcuts for AI Workflows
The fastest AI developers don't type faster. They type less. Every mouse movement, every menu navigation, every time you reach for the trackpad is time you could spend thinking about the problem instead of operating the tool.
Keyboard shortcuts in AI workflows aren't just convenience. They're the difference between staying in flow and breaking concentration. When you can invoke a skill, switch context, manage files, and navigate history without lifting your hands from the keyboard, AI-assisted development feels like thought made real.
This guide covers the shortcuts that matter most for Claude Code and AI-assisted development workflows.
Key Takeaways
- Terminal navigation shortcuts save 2-3 seconds per command -- at 100+ commands per day, that's 5+ minutes of pure productivity
- Claude Code has specific shortcuts for context management including compaction, history navigation, and skill invocation
- VS Code integration shortcuts let you send code to Claude Code without leaving your editor
- Custom keybindings can chain multiple actions into single shortcuts for complex workflows
- Learning 15-20 shortcuts creates more speed improvement than learning 100 -- focus on the high-frequency operations
Terminal Navigation Essentials
These shortcuts work in any terminal (bash, zsh, fish) and are the foundation of fast AI workflow:
Line Editing
| Shortcut | Action | When to Use |
|---|---|---|
Ctrl+A | Move to start of line | Jump to beginning to edit a command prefix |
Ctrl+E | Move to end of line | Jump to end to add flags or arguments |
Ctrl+W | Delete word backward | Remove the last word you typed |
Alt+D | Delete word forward | Remove a word in the middle of a command |
Ctrl+U | Delete to start of line | Clear everything before cursor |
Ctrl+K | Delete to end of line | Clear everything after cursor |
Ctrl+Y | Paste deleted text | Restore text you just deleted with Ctrl+U/K |
Alt+B | Move back one word | Navigate within a long command |
Alt+F | Move forward one word | Navigate within a long command |
History Navigation
| Shortcut | Action | When to Use |
|---|---|---|
Ctrl+R | Reverse search history | Find a previous command by typing part of it |
Ctrl+P / Up | Previous command | Cycle through recent commands |
Ctrl+N / Down | Next command | Cycle forward through history |
!! | Repeat last command | Re-run the previous command exactly |
!$ | Last argument of previous command | Reuse a file path from the last command |
The reverse search (Ctrl+R) is the single most valuable terminal shortcut for AI workflows. When you've run a complex Claude Code invocation before, Ctrl+R lets you find it by typing just a few characters of the command.
Process Control
| Shortcut | Action | When to Use |
|---|---|---|
Ctrl+C | Cancel current process | Stop a runaway AI generation |
Ctrl+Z | Suspend current process | Pause to run another command |
fg | Resume suspended process | Return to the suspended process |
Ctrl+D | EOF / Exit | Close the terminal session |
Ctrl+L | Clear screen | Clean up visual clutter |
Claude Code Specific Shortcuts
Claude Code has its own shortcut system that operates within the AI session:
Session Management
| Shortcut | Action |
|---|---|
/ + command name | Invoke a slash command |
Escape | Cancel current generation |
Up Arrow | Edit previous message |
Ctrl+C | Exit Claude Code |
Context Operations
Managing context is critical for effective AI-assisted development. These operations control what Claude Code knows about your project:
Compaction: When the context window fills up, Claude Code can compact the conversation history, preserving key decisions while freeing space for new context. This is covered in depth in the context management guide.
File references: Typing @filename in a Claude Code prompt adds that file to the context. This is faster than asking Claude to read the file because it adds the content immediately.
Skill Invocation
Skills are invoked with / prefix commands. The most common:
/commit - Create a git commit
/review-pr - Review a pull request
/feature-dev - Start feature development
Each slash command can accept arguments, making them composable:
/commit -m "fix: resolve date parsing bug"
/review-pr 123
VS Code Integration
When using Claude Code alongside VS Code, these shortcuts bridge the gap:
Terminal Panel
| Shortcut | Action |
|---|---|
Ctrl+` | Toggle terminal panel |
Ctrl+Shift+ | Create new terminal |
Ctrl+Shift+5 | Split terminal |
Ctrl+PageUp/PageDown | Switch between terminals |
Sending Code to Terminal
VS Code can send selected code directly to the terminal where Claude Code runs:
- Select code in the editor
Ctrl+Shift+Pto open command palette- Type "Terminal: Run Selected Text in Active Terminal"
For faster access, bind this to a custom shortcut:
// keybindings.json
{
"key": "ctrl+shift+enter",
"command": "workbench.action.terminal.runSelectedText"
}
Now you can select any code snippet and send it to Claude Code with Ctrl+Shift+Enter.
Multi-Cursor Editing
When Claude Code generates code that needs minor adjustments across multiple lines:
| Shortcut | Action |
|---|---|
Alt+Click | Add cursor at click position |
Ctrl+Alt+Up/Down | Add cursor above/below |
Ctrl+D | Select next occurrence of selection |
Ctrl+Shift+L | Select all occurrences |
Alt+Shift+I | Add cursors to end of each selected line |
Multi-cursor editing is particularly useful after AI code generation. When Claude produces a list of similar items that each need a small adjustment, multi-cursor lets you modify all of them simultaneously.
Custom Keybindings for AI Workflows
Setting Up Custom Shortcuts
Claude Code supports custom keybindings through ~/.claude/keybindings.json. You can bind any action to any key combination.
Common custom bindings for AI workflows:
[
{
"key": "ctrl+shift+c",
"command": "claude.compact",
"description": "Compact conversation history"
},
{
"key": "ctrl+shift+s",
"command": "claude.skill",
"args": "commit",
"description": "Quick commit"
}
]
Chord Bindings
For actions you use frequently but want to keep out of simple key combinations, use chord bindings (two-key sequences):
{
"key": "ctrl+k ctrl+c",
"command": "claude.skill",
"args": "commit"
}
Press Ctrl+K, release, then press Ctrl+C to trigger the commit skill. This avoids conflicts with existing shortcuts while keeping the binding accessible.
Platform-Specific Bindings
macOS and Linux have different modifier key conventions:
| Action | macOS | Linux/Windows |
|---|---|---|
| Cut | Cmd+X | Ctrl+X |
| Copy | Cmd+C | Ctrl+C |
| Paste | Cmd+V | Ctrl+V |
| Terminal interrupt | Ctrl+C | Ctrl+C |
Note the conflict: Ctrl+C is both "copy" (macOS) and "interrupt" (terminal). On macOS, use Cmd+C for copy and Ctrl+C for interrupt. This distinction trips up developers switching between platforms.
Building a Shortcut Practice Routine
The 15-Shortcut Foundation
Don't try to learn all shortcuts at once. Start with these 15 that cover 80% of AI workflow operations:
Terminal (5):
Ctrl+R- Search historyCtrl+A/Ctrl+E- Start/end of lineCtrl+W- Delete wordCtrl+L- Clear screenCtrl+C- Cancel
Editor (5):
6. Ctrl+P - Quick file open
7. Ctrl+Shift+P - Command palette
8. Ctrl+D - Select next occurrence
9. Ctrl+` - Toggle terminal
10. Ctrl+/ - Toggle comment
Claude Code (5):
11. /commit - Commit changes
12. Up Arrow - Edit previous message
13. Escape - Cancel generation
14. @filename - Add file to context
15. / - Browse available commands
Practice Method
Each day, pick one shortcut you don't use and force yourself to use it instead of the mouse/menu alternative. After two weeks, the 15 shortcuts become muscle memory.
The productivity gain compounds. Each shortcut saves 2-3 seconds per use. At 50+ uses per day across 15 shortcuts, you save 25-35 minutes daily. Over a month, that's more than a full workday reclaimed for actual thinking.
Advanced Workflow Patterns
The Quick Edit Loop
When iterating on a skill definition:
Ctrl+Pto open the skill file- Make edits
Ctrl+`to switch to terminal/to invoke the skill for testingUp Arrowto edit the previous prompt- Repeat from step 1
This loop takes under 5 seconds per iteration once the shortcuts are muscle memory.
The Review Pipeline
When reviewing AI-generated code:
Ctrl+Shift+Gto open source control- Review diffs with
](next change) and[(previous change) Ctrl+Dto select repeated patterns for bulk editingCtrl+`to test in terminal/committo commit if satisfied
These patterns align with the documentation generation and test writing workflows where rapid iteration is essential.
FAQ
How do I find all available shortcuts in Claude Code?
Type /help in a Claude Code session to see available commands. For terminal shortcuts, run bind -p in bash or bindkey in zsh to see all current key bindings.
Can I remap Claude Code shortcuts that conflict with my terminal?
Yes, use ~/.claude/keybindings.json to remap any Claude Code shortcut. If a terminal shortcut conflicts, you can also remap terminal shortcuts in your shell configuration.
Do these shortcuts work on Windows?
Most terminal shortcuts work identically. VS Code shortcuts are the same except Cmd on macOS maps to Ctrl on Windows. Claude Code shortcuts are platform-independent.
What's the fastest way to switch between multiple Claude Code sessions?
Use terminal multiplexers like tmux or screen. Ctrl+B followed by a number switches between tmux panes, each running a separate Claude Code session. This is faster than opening multiple terminal windows.
How do I create shortcuts for my most-used skills?
Add entries to ~/.claude/keybindings.json with the skill name as the command argument. You can bind any skill to any key combination, including chord bindings for less-frequent skills.
Sources
- GNU Readline Documentation -- Terminal editing shortcuts reference
- VS Code Keyboard Shortcuts -- Editor shortcut configuration
- Claude Code Documentation -- AI assistant keyboard shortcuts
- tmux Cheat Sheet -- Terminal multiplexer shortcuts
Explore production-ready AI skills at aiskill.market/browse or submit your own skill to the marketplace.