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

Feature Request: Support for Shell-Style / Emacs-Inspired Keybindings in Message Input

Open roychri opened this issue 4 months ago • 4 comments

Would love to see support for standard shell/emacs-style keybindings in the message input box (similar to what’s available in terminals and Bash). Right now, using keystrokes like Esc+C (aka Meta+C) to uppercase the first letter of a word—or other shortcuts like Meta+B to jump back a word, Meta+D to delete the next word—either do nothing or trigger unrelated UI behaviors (e.g., Esc clearing the input altogether, which is especially frustrating).

This behavior breaks muscle memory for anyone used to working in terminal or Emacs-style editing environments. Supporting these common bindings would make the text entry experience much smoother, especially when editing long prompts or code snippets.

Some examples of what would be nice to support:

  • Meta+C – Capitalize word
  • Meta+U – Uppercase word
  • Meta+L – Lowercase word
  • Meta+B / Meta+F – Move by word
  • Meta+D – Delete word forward
  • Meta+Backspace – Delete word backward
  • Ctrl+A/E/K/Y – Beginning/end of line, kill line, yank, etc.

At the very least, it’d be helpful to be able to disable the Esc → clear behavior or remap it.

Thanks for considering this!

roychri avatar Aug 01 '25 21:08 roychri

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/796
  2. https://github.com/anthropics/claude-code/issues/1581
  3. https://github.com/anthropics/claude-code/issues/2088

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

🤖 Generated with Claude Code

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

There is a Vim mode, by the way, but it’s not really a Vim-like readline. :D

osv avatar Aug 01 '25 21:08 osv

I find myself trying to edit, selecting, re-wording too frequently. Even if the https://github.com/manzaltu/claude-code-ide.el mode exists, quick access to the prompt with Emacs key bindings is a game changer for the emacsen.

esteban avatar Oct 30 '25 04:10 esteban

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 09 '25 10:12 github-actions[bot]