Repository navigation
[FEATURE REQUEST] Add natural text editing on macOS - #8
Merged
Raiden-MeixElysia merged 1 commit intoOct 22, 2026
Merged
Raiden-MeixElysia merged 1 commit into
Raiden-MeixElysia merged 1 commit into
Conversation
…by default that sends Option and Command's editing keys as readline's bytes
Contributor
|
Thanks for the PR! Merged and shipped in v0.1.8. https://github.com/ELY-Open-Source/ELYTerminal/releases/tag/v0.1.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
What and why
Adds a macOS-only Settings › Terminal switch,
natural_text_editing, off by default. When on, Option and Command edit text the way macOS's text views do, sending bytes that bash, zsh, fish and readline already bind:ESC b/ESC fESC DEL/ESC dCtrl-A/Ctrl-ECtrl-U/Ctrl-KThe mapping applies whatever Option as Alt says, and before kitty's flags, since it is a compatibility choice; Shift/Ctrl variants and Command+Option pass through. Releases are consumed without sending bytes. Cmd-Up and Cmd-Down still jump between prompts.
This is the iTerm2 “Natural Text Editing” preset, opt-in. It is not on by default because it overrides the modified-arrow encodings a program may expect.
How it was tested
cargo test --lib natural_text_editing— the new mapping test passes.shotsent all eight combinations to/bin/shunderstty raw;odrecorded1b 62 1b 66 1b 7f 1b 64 01 05 15 0b, in that order.1b 5b 31 3b 39 44, the previous modified arrow.scripts/check.sh: fmt and clippy pass; 262 of 264 tests pass. The two failures are the fish and PowerShell shell tests, becausefishandpwshare not installed on this machine; CI covers them.Checklist
[FEATURE REQUEST],[BUG REPORT]or[Other]