Skip to content

Document keybind implementation architecture - #5218

Closed
thdxr with Copilot wants to merge 3 commits into
devfrom
copilot/implement-keybinds-feature
Closed

Document keybind implementation architecture#5218
thdxr with Copilot wants to merge 3 commits into
devfrom
copilot/implement-keybinds-feature

Conversation

CopilotAI commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

The codebase lacked documentation on keybind implementation locations and architecture. This adds comprehensive technical documentation.

Changes

  • KEYBINDS.md: Documents the three-layer keybind architecture

    • Utility layer (src/util/keybind.ts): Parsing/matching logic for keybind strings
    • Context layer (src/cli/cmd/tui/context/keybind.tsx): Solid.js provider with leader key state management
    • Configuration layer (src/config/config.ts): Zod schema defining 40+ configurable keybinds
  • Includes architecture diagram, usage patterns, all available keybinds with defaults, and guide for adding new keybinds

  • README.md: Added reference link to documentation

Example usage pattern documented:

import{useKeybind}from"@tui/context/keybind"constkeybind=useKeybind()// Match keyboard eventsif(keybind.match("app_exit",event)){// handle exit}// Display to userconstexitKey=keybind.print("app_exit")// "ctrl+c"
Original prompt

where are keybinds implemented?


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

CopilotAIand others added 2 commits December 8, 2025 01:37
Co-authored-by: thdxr <826656+thdxr@users.noreply.github.com>
Co-authored-by: thdxr <826656+thdxr@users.noreply.github.com>
CopilotAI changed the title [WIP] Implement keybinds functionalityDocument keybind implementation architectureDec 8, 2025
CopilotAI requested a review from thdxrDecember 8, 2025 01:40
@thdxr
thdxrforce-pushed the dev branch 3 times, most recently from f1ae801 to 08fa7f7CompareJanuary 30, 2026 14:37
@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@thdxr
thdxr deleted the copilot/implement-keybinds-feature branch February 7, 2026 06:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@thdxr