Skip to content

Kitty keyboard protocol support (unlocked by v2) #56

Description

@acgh213

Summary

Bubble Tea v2 supports the Kitty keyboard protocol, enabling key release detection, key disambiguation, and richer modifier tracking. This could simplify chisel's key dispatch and open up new binding possibilities.

What it enables

  • Key release events — distinguish press from release. Could enable hold-to-repeat scrolling in reading mode, or press-and-hold for continuous navigation.
  • Key disambiguationShift+Enter vs Enter, Ctrl+I vs Tab, etc. Currently many key combos are ambiguous.
  • Rich modifiersCtrl+Alt+Super+Enter is now a single matchable keystroke.
  • Auto-repeat detectionkey.IsRepeat flags whether the terminal is auto-repeating a held key.
  • PC-101 layout mappingkey.BaseCode gives the physical key regardless of layout. Useful for game-like bindings.

Current state

chisel has a complex key dispatch tree in model.go — the root model dispatches keys based on view mode (binder, editor, structural views, overlays). Mode-aware routing means keys mean different things in different contexts. The current KeyMsg API works but lacks the richness v2 provides.

Scope

Not a rewrite of the key system — this is about enabling richer input where chisel wants it. The Kitty protocol is progressive: terminals that don't support it fall back gracefully. Enable it, then use the new capabilities where they make sense:

  • Reading mode: hold-to-repeat scrolling
  • Editor: potential new shortcuts without ambiguity
  • General: more reliable modifier detection

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3: mediumNice to have, lower leverageenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions