Skip to content

refactor(tui): simplify undo and redo keybindings - #1221

Merged
hakula139 merged 2 commits into
mainfrom
refactor/simplify-undo-redo-keybindings
Dec 6, 2026
Merged

hakula139 merged 2 commits into
mainfrom
refactor/simplify-undo-redo-keybindings

Conversation

@hakula139

@hakula139 hakula139 commented Dec 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Simplify ox-tui's default undo / redo keybindings to pair Alt+Z / Alt+Shift+Z and Cmd+Z / Cmd+Shift+Z alongside Readline Ctrl+_, removing the non-standard Alt+_, Alt+Shift+_, and Alt+Shift+- redo chords.

  • Bind CommandId::Undo to Ctrl+_, Ctrl+Shift+- (Kitty-protocol encoding of Ctrl+_), Alt+Z, and Cmd+Z.
  • Bind CommandId::Redo to Alt+Shift+Z and Cmd+Shift+Z.
  • Remove Alt+_, Alt+Shift+_, and Alt+Shift+- from the default keymap.
  • Update keymap unit tests, App input tests, and docs/reference/tui/keybindings.md.

Test plan

  • cargo test -p ox-tui (308 unit tests + 2 preview tests passed)
  • nix develop -c run-hooks (all 20 hooks passed, including clippy, rustfmt, cspell, markdownlint-cli2, dprint, and prettier)

@hakula139 hakula139 added refactor Behavior-preserving restructuring area: tui Touches terminal UI rendering, input, or theming labels Dec 6, 2026
@hakula139 hakula139 self-assigned this Dec 6, 2026
@codecov

codecov Bot commented Dec 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Bind undo to Ctrl+_ (plus Kitty-protocol Ctrl+Shift+-), Alt+Z, and Cmd+Z, and bind redo to Alt+Shift+Z and Cmd+Shift+Z. Remove the non-standard Alt+_, Alt+Shift+_, and Alt+Shift+- redo chords, and update keymap tests, app input tests, and the TUI keybindings reference.
@hakula139
hakula139 force-pushed the refactor/simplify-undo-redo-keybindings branch from 79d3a30 to 99b2743 Compare December 6, 2026 09:57
@hakula139
hakula139 merged commit 4187fb1 into main Dec 6, 2026
10 checks passed
@hakula139
hakula139 deleted the refactor/simplify-undo-redo-keybindings branch December 6, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tui Touches terminal UI rendering, input, or theming refactor Behavior-preserving restructuring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant