Skip to content

Support configurable keybindings #20

@mmcdole

Description

@mmcdole

Keybindings are currently hardcoded in internal/tui/keys.go and internal/tui/components/keys.go with no way to override them.

It would be useful to support user-defined keybindings via the config file (~/.config/kino/config.yaml), for example:

keys:
  up: ["k", "up"]
  down: ["j", "down"]
  quit: ["q", "ctrl+c"]
  filter: ["/"]
  play: ["p"]
  # ...

Users who prefer different navigation schemes (e.g. arrow-only, Emacs-style) or need to resolve conflicts with their terminal emulator could remap keys without forking.

The infrastructure is partially there already — keybindings use key.NewBinding from Charmbracelet's bubbles library, and default maps are returned from constructor functions (DefaultKeyMap(), DefaultListColumnKeyMap(), etc.), so wiring in config overrides should be straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions