feat: add vim-style j/k keyboard navigation for approval and question…#1377
Open
IAMLEIzZ wants to merge 1 commit intoMoonshotAI:mainfrom
Open
feat: add vim-style j/k keyboard navigation for approval and question…#1377IAMLEIzZ wants to merge 1 commit intoMoonshotAI:mainfrom
IAMLEIzZ wants to merge 1 commit intoMoonshotAI:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Vim-style j/k navigation support to the shell UI’s interactive approval and structured question panels, aligning the terminal UX with common Vim navigation habits.
Changes:
- Extend
KeyEventto detectj/kkey presses in the shell keyboard listener (Unix + Windows). - Update shell LiveView keyboard dispatch so approval and question panels treat
kas “up” andjas “down”.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/kimi_cli/ui/shell/keyboard.py |
Adds KeyEvent.J/KeyEvent.K and emits them when j/k are pressed. |
src/kimi_cli/ui/shell/visualize.py |
Handles KeyEvent.J/KeyEvent.K for down/up navigation in question + approval panels. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
718a2f7 to
af10266
Compare
This was referenced Mar 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
feat: add vim-style j/k keyboard navigation for approval and question…
Description
This PR adds Vim-style
j/kkeybindings for navigating approval and question panels in the shell UI. Since many Agent CLI users are Vim users, supporting this feature should make the experience feel more natural and comfortable for them.Changes:
src/kimi_cli/ui/shell/keyboard.py: AddedKeyEvent.JandKeyEvent.Kfor j/k key detectionsrc/kimi_cli/ui/shell/visualize.py: Updated approval panel and question panel to respond to j/k keys for up/down navigationBehavior:
kor↑: Move selection upjor↓: Move selection down1/2/3: Direct selection (unchanged)Enter: Confirm (unchanged)This allows Vim users to navigate approval/question prompts using familiar keybindings without affecting normal input behavior (j/k only work when the panels are active).
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.