Skip to content

keybind.print() replaced with hardcoded labels — breaks if user overrides keybinds #32198

@lkonga

Description

@lkonga

Issue

In the v1.17.4 rebase, upstream deleted the useKeybind() hook which provided keybind.print() and keybind.leader. Our patches injected JSX referencing these:

  • keybind.print("session_interrupt") → hardcoded "esc"
  • keybind.print("session_child_cycle") → hardcoded "→"
  • keybind.print("session_child_first") → hardcoded "<leader>↓"
  • keybind.leaderleader() (from useLeaderActive() — this one is correct)

Impact

If a user overrides keybinds (e.g. remaps session_interrupt from escape to something else), the UI labels will show the wrong key. leader() is correct since it uses the real hook.

Proper fix

Replace hardcoded strings with a runtime keybind label lookup. Options:

  1. Use TuiKeybind.defaultValue("session_interrupt") — compile-time, still wrong if overridden
  2. Create a small helper that reads from tuiConfig.keybinds.get() and formats the binding as a display string
  3. Accept as-is (cosmetic only, rarely overridden)

Affected files

  • patch-selectall.ts (SA6 — "esc" label)
  • patch-steer-b.ts (S6 — "→", "↓" labels)

Metadata

Metadata

Assignees

Labels

needs:complianceThis means the issue will auto-close after 2 hours.

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