co-mono/packages/tui/src
Ryota 5bb3700717 fix(tui): prevent Kitty protocol base layout key from causing false shortcut matches
With the Kitty keyboard protocol (flag 4), terminals report both the
logical key codepoint and the physical base layout key (PC-101 QWERTY
position). The key matching logic in matchesKittySequence matched
against both unconditionally, which caused a single keypress to match
multiple shortcuts on remapped keyboard layouts.

For example, on a Dvorak layout with xremap, pressing Ctrl+K sends
CSI 107::118;5u (codepoint=107 'k', base layout=118 'v'). The
unconditional base layout match made this also match Ctrl+V, which is
bound to pasteImage. Since CustomEditor checks app-level keybindings
(pasteImage) before editor keybindings (deleteToLineEnd), Ctrl+K was
silently intercepted by the paste image handler instead of deleting
to end of line. The same issue affects symbol keys, as Dvorak also
remaps symbols to different physical positions (e.g., '/' sits where
'[' is on QWERTY).

The fix restricts base layout key matching to cases where the codepoint
is not a recognized Latin letter (a-z) or symbol (/, -, [, ;, etc.).
When the codepoint is already a recognized key, it is authoritative and
the base layout key is ignored. This preserves non-Latin layout support
(Ctrl+К on a Russian layout still matches Ctrl+K via base layout key
107) while preventing false matches from differing physical key
positions on remapped layouts.

Both matchesKittySequence and parseKey are updated with the same logic.
2026-02-01 01:25:00 +01:00
..
components feat(tui): add sticky column for vertical cursor navigation (#1120) 2026-01-31 22:52:47 +01:00
autocomplete.ts fix(tui): avoid duplicating quotes during autocomplete 2026-01-30 00:26:24 +01:00
editor-component.ts feat: add autocompleteMaxVisible setting for configurable dropdown height 2026-01-29 03:16:52 +01:00
fuzzy.ts More fuzzy finder (#860) 2026-01-19 22:22:51 +01:00
index.ts fix(tui): proper Kitty image ID management and cleanup 2026-01-22 04:39:58 +01:00
keybindings.ts feat(tui,coding-agent): add ctrl+b/ctrl+f cursor navigation keybindings (#1053) 2026-01-30 01:43:54 +01:00
keys.ts fix(tui): prevent Kitty protocol base layout key from causing false shortcut matches 2026-02-01 01:25:00 +01:00
stdin-buffer.ts fix(tui): handle batched input over SSH with StdinBuffer 2026-01-07 17:50:06 +01:00
terminal-image.ts perf(tui): use startsWith short-circuit in isImageLine 2026-01-30 17:07:43 +01:00
terminal.ts fix(tui): fix scrollback overwrite when appending lines past viewport 2026-01-26 16:51:28 +01:00
tui.ts fix(tui): auto-clear empty rows when content shrinks (#1095) 2026-01-30 20:45:34 +01:00
utils.ts feat(tui): hardware cursor positioning for IME support 2026-01-16 04:30:07 +01:00