fix(cli): remove invalid 'c-S-c' key binding crashing TUI on startup - #19902
Closed
amonkarsidhant wants to merge 1 commit into
Closed
fix(cli): remove invalid 'c-S-c' key binding crashing TUI on startup#19902amonkarsidhant wants to merge 1 commit into
amonkarsidhant wants to merge 1 commit into
Conversation
The `@kb.add('c-S-c')` registration in HermesCLI raises
`Invalid key: c-S-c` from prompt_toolkit immediately after the
welcome banner, making the TUI unusable.
Terminal emulators do not deliver Ctrl+Shift+C as a key combination
distinct from Ctrl+C (the shift modifier is not transmitted for
control-letter sequences in standard xterm/VT encodings), so
prompt_toolkit rejects the key name. The handler was a documented
no-op anyway — its sole purpose was to prevent Hermes from
intercepting native terminal copy, which already works without any
binding because the terminal handles Ctrl+Shift+C before the
application sees it.
Removing the binding restores TUI startup. Native terminal copy
behavior is unchanged.
This was referenced May 4, 2026
Contributor
|
Duplicate — the underlying bug was fixed on main before your PR landed.
Closing issue #19903 too. Thanks for jumping on it — appreciate the quick turnaround even if we only needed one of the fixes. |
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.
Summary
@kb.add('c-S-c')(added in 645a2f4) raisesInvalid key: c-S-cfrom prompt_toolkit immediately after the welcome banner, making the TUI unusable on startup.Removing the binding restores TUI startup with no behavioral change to copy/paste.
Reproduction
Test plan
hermesstarts cleanly past the welcome banner with the patch appliedpython -m py_compile cli.pyclean