Repository navigation
[CTX-0153] feat(ux): keymap-driven chrome keys - #256
Merged
Merged
Conversation
Single-owner rule: bound chords are consumed by chrome actions and never reach the PTY; unbound keys (Tab, arrows, plain letters/digits, Ctrl+P) always go to the shell. Removes the main.rs focus matcher that stole Tab/arrows/n/p/1-8 with no modifier check and no keymap. bitty-config: new keymap module (Chord/KeyName/ChromeAction schema, ghostty-derived 21-entry defaults, resolve with user override by context+chord identity, fail-closed validation wired into KeymapEntry::validate so plan/merge/config-check all reject unknown actions, chords, and contexts). bitty-app: pre-routing intercept with app modifier mirror (KeyEvent carries no modifiers), focus/split/close/resize/zoom via existing Runtime/LayoutNode APIs only, per-entry config check rows, starter init.lua keymap docs. Live (Hyprland ws4): od shows 09 for Tab, alt+h/l move focus 1<->2, alt+w closes 2->1, fish completes ec->echo with autosuggest alive. Screenshots: recording/evidence/ctx-0153-*.png (full + window-crop). Task: CTX-0153. Issue: #249.
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 #249. Task: CTX-0153.
Problem
main.rs routed every KeyboardInput to Runtime (PTY bytes) AND THEN consumed Tab/arrows/n/p/1-8 for pane focus with no modifier check and no keymap. Tab both completed and moved focus; arrows moved cursor and focus; Ctrl+P (0x10 via CTX-0154) also triggered Prev-focus. No user keymaps existed (config keymaps stub).
Fix (single-owner rule: each key event has exactly one consumer)
Coordination (CTX-0154)
Single-owner rule implemented on this side as required: Ctrl+P is shell-only unless bound (verified by default-table test).
Validation
Remaining risks
Priority: P0 | Area: ux | Labels: fix,area:ux,P0 | Milestone: v0.1.0 | RFC: - | Task: CTX-0153