claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Ctrl+B Keybinding Conflict on Linux (Ubuntu)

Open frodobaggins23 opened this issue 1 year ago • 6 comments

Issue Description

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

Closely related with the same problem on Macos: https://github.com/anthropics/claude-code/issues/5376

Problem Details

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

Impact

Linux 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

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

Suggested Solutions

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

Workaround

Currently, there is no workaround. Even if user disables the readline keybinding in shell, in Claude Code the behaviour is not altered (while in bash directly ctrl+b no longer trigger pointer move backward, in Claude Code it still does).

frodobaggins23 avatar Aug 08 '25 13:08 frodobaggins23

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/5376

If your issue is a duplicate, please close it and 👍 the existing issue instead.

This issue will be automatically closed as a duplicate in 3 days if there are no additional comments. To prevent auto-closure, please 👎 this comment.

🤖 Generated with Claude Code

github-actions[bot] avatar Aug 08 '25 13:08 github-actions[bot]

This bug is Linux related, so it is not a strict duplicate of #5376

frodobaggins23 avatar Aug 08 '25 13:08 frodobaggins23

Same in iterm terminal on MacOS

kky42 avatar Aug 09 '25 06:08 kky42

Same in any terminal app on MacOS

dblumenau avatar Aug 09 '25 08:08 dblumenau

I might have misunderstood how the feature works, or it was fixed in later versions.

Anyhow, it seems to be working now as described here: https://github.com/anthropics/claude-code/issues/5376#issuecomment-3183064486

frodobaggins23 avatar Aug 15 '25 20:08 frodobaggins23

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.

github-actions[bot] avatar Aug 25 '25 14:08 github-actions[bot]