Skip to content

feat: vim-style j/k navigation in CLI selectors #2063

@rossim2i2

Description

@rossim2i2

Problem

The CLI uses arrow keys exclusively for navigation in selectors (conversation picker, autocomplete, approval dialogs). Users with vi mode enabled in their shell (set -o vi) or vim muscle memory naturally reach for j/k instead of arrow keys.

Proposal

Add j/k as aliases for down/up arrow in the following components:

  • useAutocompleteNavigation hook — autocomplete dropdowns
  • ConversationSelector — conversation picker (/resume)
  • Any other useInput handlers that bind key.upArrow/key.downArrow

Implementation

In useAutocompleteNavigation.ts, add input === "j" / input === "k" checks alongside the existing key.downArrow / key.upArrow checks. Same pattern in ConversationSelector.tsx.

The j/k bindings should only be active when the text input field is not focused (i.e., when navigating a list), to avoid intercepting typing.

Alternatives

  • Could make this a config option (letta.keybindings: vim), but starting with j/k as always-on aliases is simpler and doesn't conflict with list navigation contexts.

Context

Arch Linux + Wayland, vi mode shell user. The arrow keys work fine, but j/k would match the workflow of users who live in vim/tmux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions