Add a keybinding to open the model picker
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
The model picker is reachable only via the /model slash command (or Enter during
the onboarding ModelSelect phase). There is no keybinding to open it, unlike the
session picker (Alt+R / cmd+B).
Ctrl+Tab / Ctrl+Shift+Tab cycle models without opening the picker, which is not the
same as picking. Users want a key that opens the picker.
Why Ctrl+M is a safe choice (verified)
- The TUI unconditionally pushes
KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES
at startup (crates/jcode-tui/src/tui/mod.rs:92-96), i.e. the kitty keyboard protocol. - Alacritty 0.13+ implements this protocol, so Ctrl+M arrives as
CSI 109;5u->
KeyCode::Char('m')with CONTROL, distinct fromKeyCode::Enter. Ctrl+P already
works this way as the autopoke toggle, proving the path. - Routing is gated on
modifiers.contains(CONTROL)(input.rs:2877), so a plainm
still types normally.
Proposed implementation
- Add
model_picker_open: StringtoKeybindingsConfig
(crates/jcode-config-types/src/lib.rs:868) defaulting to"ctrl+m". - Register it in the keybindings defaults (
crates/jcode-config-types/src/keybindings.rs,
jcode_bindings()) with afieldpathkeybindings.model_picker_open, so the
conflict checker (crates/jcode-setup-hints/src/keymap/conflicts.rs) picks it up. - Wire it in
handle_control_key(crates/jcode-tui/src/tui/app/input.rs:1791),
mirroring the Ctrl+P arm:KeyCode::Char('m') => { app.open_model_picker(); true } - Add the hotkey to the registry (
crates/jcode-tui/src/tui/app/hotkey_feedback.rs,
the Ctrl+P entry at line ~345) so it appears in⌨help.
Caveat
If the kitty protocol fails to negotiate (e.g. Alacritty < 0.13), Ctrl+M collapses to
Enter and would collide. This is the same risk Ctrl+P already lives with; acceptable
but worth noting.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with KeybindingsConfig and jcode_bindings() in crates/jcode-config-types, then compare the Ctrl+P handling in crates/jcode-tui/src/tui/app/input.rs and its hotkey_feedback.rs registry entry. Check the conflict checker path and verify that Ctrl+M opens the model picker, appears in keyboard help, and leaves plain m behavior unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100