VS Code extension: Ctrl+A and Ctrl+E Emacs keybindings not working in terminal mode on macOS
Bug Description
When using the Claude Code VS Code extension with "Use Terminal" setting enabled, the standard macOS/Emacs keybindings Ctrl+A (move to beginning of line) and Ctrl+E (move to end of line) do not work. These are essential keybindings for terminal navigation on macOS.
Other Emacs keybindings such as Ctrl+F (forward character) and Ctrl+B (backward character) work correctly.
Note: When running claude directly in VS Code's integrated terminal (without the extension's "Use Terminal" mode), Ctrl+A and Ctrl+E work correctly. This issue only occurs when using the VS Code extension with "Use Terminal" enabled.
Steps to Reproduce
- Install Claude Code VS Code extension
- In VS Code Settings, enable "Claude Code: Use Terminal" (Launch Claude in the terminal instead of the native UI)
- Launch Claude Code via the extension
- Type some text
- Press
Ctrl+Ato move cursor to the beginning of the line → does not work - Press
Ctrl+Eto move cursor to the end of the line → does not work - Press
Ctrl+Fto move cursor forward → works correctly - Press
Ctrl+Bto move cursor backward → works correctly
Works correctly:
- Running
claudecommand directly in VS Code's integrated terminal → all Emacs keybindings work
Does not work:
- Launching Claude Code via VS Code extension with "Use Terminal" enabled →
Ctrl+AandCtrl+Eare intercepted
Expected Behavior
All standard Emacs keybindings should work in the extension's terminal mode:
Ctrl+A→ move to beginning of lineCtrl+E→ move to end of lineCtrl+F→ move forward one characterCtrl+B→ move backward one character
Actual Behavior
Ctrl+A→ intercepted by the extension (likely mapped to "Select All" or another action)Ctrl+E→ intercepted by the extension (likely mapped to an extension command)Ctrl+F→ works correctly (move forward)Ctrl+B→ works correctly (move backward)
Environment
- OS: macOS (Darwin 25.2.0)
- VS Code: Latest stable
- Claude Code extension: Latest
Additional Context
On macOS, Emacs keybindings (Ctrl+A, Ctrl+E, Ctrl+F, Ctrl+B, Ctrl+K, Ctrl+D, etc.) are a fundamental part of terminal navigation. The extension should not intercept these keybindings when the terminal is focused, or should provide a passthrough option for terminal mode.
Since running claude directly in VS Code's terminal works without issues, the problem is clearly with the extension's keybinding interception when the "Use Terminal" setting is enabled.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗