Repository navigation
feat: latch Shift in the extra-keys row - #35
Merged
Merged
Conversation
Add a Shift key beside Ctrl and Alt so touch users can send Shift+arrow and other Shift chords (e.g. Codex's Shift+Left). The native core already forwards the Shift bit to Herdr; the only gap was sendText, which kept a Shift-only latch alive after a typed character. A latched Shift now upper-cases a single typed character and is consumed like Ctrl and Alt.
GlassUiTest.t10 attaches to the CI host, runs cat -v, and taps Shift then ← and Shift then Tab in the extra-keys row: the pane must show ^[[1;2D and ^[[Z, and the next ← must be plain. Its screenshots are the PR's evidence. Also lists Shift on the Chinese site, which the first commit missed.
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.
Closes #31.
Adds a latching Shift key to the extra-keys row (Esc, Tab, Shift, Ctrl, Alt, …) so touch users can send Shift+arrow and other Shift chords, such as Codex's Shift+Left or Shift+Tab, without a hardware keyboard.
Modifiers::from_meta_state), so arrows, Tab (back-tab), Home/End and PgUp/PgDn need no Rust change.shift_reaches_navigation_keyscovers Shift+Left and Shift+Ctrl+Left.TerminalView.sendTextused to consume the latch only for Ctrl/Alt, so a Shift-only latch stayed on after typing. A latched Shift now upper-cases a single typed character and is consumed. With Ctrl/Alt it goes through the existing chord path.ExtraKey.Modifierlatch).Verification
GlassUiTest.t10_shiftLatchesForTheNextKeyruns on the CI emulator against the runner's sshd + Herdr: incat -vit taps Shift then ←, Shift then Tab, then a plain ←, and asserts the pane shows^[[1;2D,^[[Z, and^[[D.Key{Left, SHIFT}→^[[1;2D,Key{BackTab, SHIFT}→^[[Z, Shift+Alt+Left →^[[1;4D.Screenshots
cat -v