mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 07:03:25 +00:00
fix(tui): handle Kitty protocol lock key modifiers
Fixes keyboard input in Ghostty on Linux when Num Lock is enabled. The Kitty protocol includes Caps Lock (64) and Num Lock (128) bits in modifier values. Now masks out lock bits when matching shortcuts. Added helper functions: isArrowUp/Down/Left/Right, isEnter, isTab, isBackspace, isShiftEnter, isAltEnter, isAltLeft/Right, isCtrlLeft/Right fixes #243
This commit is contained in:
parent
7e38897673
commit
28c3ffb914
6 changed files with 278 additions and 42 deletions
|
|
@ -21,18 +21,31 @@ export { TruncatedText } from "./components/truncated-text.js";
|
|||
// Kitty keyboard protocol helpers
|
||||
export {
|
||||
isAltBackspace,
|
||||
isAltEnter,
|
||||
isAltLeft,
|
||||
isAltRight,
|
||||
isArrowDown,
|
||||
isArrowLeft,
|
||||
isArrowRight,
|
||||
isArrowUp,
|
||||
isBackspace,
|
||||
isCtrlA,
|
||||
isCtrlC,
|
||||
isCtrlD,
|
||||
isCtrlE,
|
||||
isCtrlK,
|
||||
isCtrlLeft,
|
||||
isCtrlO,
|
||||
isCtrlP,
|
||||
isCtrlRight,
|
||||
isCtrlT,
|
||||
isCtrlU,
|
||||
isCtrlW,
|
||||
isEnter,
|
||||
isEscape,
|
||||
isShiftEnter,
|
||||
isShiftTab,
|
||||
isTab,
|
||||
Keys,
|
||||
} from "./keys.js";
|
||||
// Terminal interface and implementations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue