Skip to content

Support more emacs-style keybindings in TextArea #6488

Closed

Description

@mgesbert

The missing ones we have currently identified are:

  • ctrl+u doesn't remove previous \n when cursor is at the beginning of the line (but ctrl+k actually has the good behavior regarding \n)
  • ctrl+b: Move cursor backward (left)
  • ctrl+f: Move cursor forward (right) - instead, it currently deletes the next word
  • ctrl+backspace: delete previous word (this one is probably also linked to kitty protocol support)
  • option+delete: Delete end of word
  • ctrl+p: Move cursor to the previous line
  • ctrl+n: Move cursor to the next line

Side note: would it make sense to support cmd+Z at the TextArea level?

Activity

  1. github-actions commented on Apr 15, 2026

    @github-actions

    Thank you for your issue. Give us a little time to review it.

    PS. You might want to check the FAQ if you haven't done so already.

    This project is developed and maintained by Will McGugan. Consider sponsoring Will's work on this project (and others).

    This is an automated reply, generated by FAQtory

  2. willmcgugan commented on Apr 16, 2026

    @willmcgugan
    Member

    Yeah, this should be straightforward. Ideally it would all go in to the builtin TextArea, but custom bindings remain an option.

  3. self-assigned this
    on Apr 16, 2026
  4. willmcgugan commented on May 16, 2026

    @willmcgugan
    Member

    @mgesbert Until very recently Mac terminals didn't report the cmd modifier. Now at least Ghostty and Kitty do. iTerm doesn't unfortunately.

    I'll bind cmd+Z and friends in the associate PR, but it won't be universally supported.

  5. willmcgugan commented on May 18, 2026

    @willmcgugan
    Member

    Update here: #6543

  6. github-actions commented on May 19, 2026

    @github-actions

    I hope I solved your issue!

    Consider sponsoring my work to continue to maintain and develop Textual.

    • Will McGugan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions