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

Add Readline-compatible keybinding configuration

Open ncaq opened this issue 8 months ago • 7 comments

I would like to request custom keybinding support for the Claude Code CLI interface.

Proposal

Implement Readline-compatible configuration and automatically load the user's ~/.inputrc file.

Rationale

  • I with non-standard keyboard layouts (like Dvorak) currently face usability challenges
  • Leveraging existing Readline configurations means users don't need to learn new configuration methods

Example

Here's an example of my ~/.inputrc configuration:

set editing-mode emacs

# control

"\C-b": backward-delete-char
"\C-h": backward-char
"\C-n": history-search-forward
"\C-s": forward-char
"\C-t": history-search-backward

# alt

"\eb": backward-kill-word
"\eh": backward-word
"\es": forward-word
"\et": history-search-backward

Being able to use this configuration with Claude Code would significantly improve my workflow efficiency.

ncaq avatar Apr 15 '25 09:04 ncaq

+1

Ctrl-a currently works to go to beginning of line on mac-os, but ctrl-e does not go to the end of the line.

A .inputrc or /emacs option would work for me.

I appreciate ctrl-p and ctrl-n implemented with https://github.com/anthropics/claude-code/issues/33!

crkrenn avatar Apr 18 '25 14:04 crkrenn

Just adding a +1, would really like to edit my text input with vi keybindings, readline would be perfect.

bsturk avatar Jul 01 '25 22:07 bsturk

I’d love it if Claude Code let me open the current prompt input in my $EDITOR (the way Bash does with Ctrl-X Ctrl-E, the edit-and-execute-command).

paulsmith avatar Jul 18 '25 15:07 paulsmith

omg, i want this pls +1

xdannyrobertsx avatar Aug 27 '25 21:08 xdannyrobertsx

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 04 '25 10:12 github-actions[bot]

Can this issue be merged with #4950? (Or vice versa?)

This would still be useful, and I don't want to lose priority or the +1s

crkrenn avatar Dec 04 '25 14:12 crkrenn

I'd also really like this. Many text editors allow ctrl+u to delete newlines after deleting to the start of the line, i.e., you can press ctrl+u once to delete a whole line and then press again to go up to the end of the line above. IIUC, I need this feature request to impl this in Claude Code.

asager avatar Dec 10 '25 00:12 asager