Ctrl+B Keybinding Conflict on macOS

Status Fixed / completed
Maintainer reply None cached
Activity 10 comments · opened Aug 8, 2025 · closed Aug 16, 2025

Issue Description

The Ctrl+B hotkey for running background commands in Claude Code conflicts with the default macOS terminal keybinding for moving the cursor backward by one character.

Problem Details

  • Claude Code Version: 1.0.71+ (feature introduced in 1.0.71)
  • Platform: macOS
  • Conflicting Keybinding: Ctrl+B is a standard Unix/macOS terminal keybinding for backward cursor movement
  • Expected Feature: Run Bash commands in background while Claude continues working

Impact

macOS users cannot use the background command feature as the system intercepts Ctrl+B for cursor navigation, preventing Claude Code from receiving the keystroke.

Reproduction Steps

  1. Open Claude Code on macOS
  2. Try to use Ctrl+B to run a command in background
  3. Observe that cursor moves backward instead of triggering background execution

Suggested Solutions

  1. Add configurable keybindings: Allow users to customize the background command hotkey through settings.json
  2. Use different default on macOS: Detect macOS and use an alternative default keybinding (e.g., Cmd+B, Ctrl+Shift+B)
  3. Multiple keybinding options: Support multiple keybindings for the same action

References

Workaround

Currently, there is no workaround as keybindings are hardcoded and not configurable.

View original on GitHub ↗

10 Comments

frodobaggins23 · 1 year ago

The same problems occurs on Ubuntu 24.04

synthbeat · 1 year ago

Unfortunately on macOS remapping even with Karabiner Elements, Keyboard Maestro, terminal config (WezTerm), using Objective-C frameworks directly to send the key code, using AppleScript doesn't work. There really needs to be an update to the Claude Code itself for a workaround.

github-actions[bot] · 1 year ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5391
  2. https://github.com/anthropics/claude-code/issues/5378

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

synthbeat · 1 year ago

Well as far as I got the workflow, the Ctrl-b works on macOS (of course why would Anthropic ship something that broken). It just consumes the keybinding only when Claude Code proposes to put some long running processes on background. I guess CHANGELOG.md could be a little bit clearer, so people wouldn't try using the keybinding in regular prompt context.

jessearmand · 1 year ago
Well as far as I got the workflow, the Ctrl-b works on macOS (of course why would Anthropic ship something that broken). It just consumes the keybinding only when Claude Code proposes to put some long running processes on background. I guess CHANGELOG.md could be a little bit clearer, so people wouldn't try using the keybinding in regular prompt context.

I don't understand, how are we supposed to use this feature? Is it spawning a process, where we can observe the child process explicitly, instead of being hidden, like it currently does?

Because claude-code already executes a long running job when needed, just the developer experience can be improved if we can see the running jobs simultaneously

austeane · 1 year ago

I cannot make the feature work even when doing it as you said @synthbeat. Can you send a screencapture of you doing that?

aurindo10 · 1 year ago

I'm having the same problem

fxrlv · 1 year ago

Not sure whether there have been any changes, but I figured out how it works using the 1.0.77 release.

At the very first I thought it's a feature for so called _bash mode_. but it's not.
Well, one can explicitly ask to use run_in_background mode. The other way is that Claude proposes to use the hotkey while some job is running, and that way the hotkey works well, see the screen-capture

https://github.com/user-attachments/assets/b689d1f6-3aae-41f7-81aa-b5bd8fc2b089

fxrlv · 1 year ago

I believe the issue is no longer relevant. Right now Ctrl+B works well when Claude suggests using it.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.