Accept common key chord notations - #165
Merged
Merged
Conversation
schickling
marked this pull request as ready for review
August 15, 2026 09:15
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Problem
pty send --seq key:<name>accepted only+modifier separators. Common spellings such asctrl-u,ctrl_u, and readline/tmux-styleC-ufailed with diagnostics that did not show a valid form.Goal
Accept familiar, unambiguous key-chord notation across CLI, client, and testing surfaces, while preserving whole-sequence pre-send validation and making invalid input self-correcting.
Decisions
+,-, and_between full modifier names; accept leadingC-as the only compact modifier alias.M-,S-, andC+invalid rather than assigning surprising meanings.--seqitem cannot send an earlier prefix.Verification
npm run build- passed.npm run typecheck- passed.npm test -- --run tests/keys.test.ts tests/help.test.ts tests/send-paste.test.ts- 3 files, 67 tests passed.node scripts/verify-docs.ts --vrs-only- verified 2 VRS documents and 13 requirement IDs.ctrl+u,ctrl-u,ctrl_u, andC-udelivered four0x15bytes.--seq PARTIAL --seq key:ctrl- --seq AFTERexited 1; the receiver remained unchanged, proving atomic pre-send rejection.npm testresult: 1,609 passed, 21 skipped, 3 failed. All three failures are existing Vim/Nano screenshot environment failures reportingIncomplete terminfo entry; no changed-path test failed.Complexity
Small parser normalization helpers and no new dependency or module boundary.
Concerns
Future named keys containing modifier separators intentionally fail only if the same spelling also forms a valid chord. The compact alias remains deliberately limited to Control.
Friction & bottlenecks
The local terminal environment points
TERMINFOat a terminal-specific database while PTY fixtures launchxterm-256color; this caused the unrelated Vim/Nano full-suite failures above. No performance bottleneck was encountered.Follow-ups
None.
References
Closes #164.