mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 20:01:06 +00:00
feat(tui): add Kitty keyboard protocol flag 2 support for key release events
- Enable flag 2 in Kitty protocol for event type reporting - Add isKeyRelease() and isKeyRepeat() functions - Parse event type suffix (:1/:2/:3) in Kitty sequences - Export KeyEventType type
This commit is contained in:
parent
d863c8eb21
commit
a2f032a426
4 changed files with 99 additions and 15 deletions
|
|
@ -109,7 +109,8 @@ export class ProcessTerminal implements Terminal {
|
|||
|
||||
// Enable Kitty keyboard protocol (push flags)
|
||||
// Flag 1 = disambiguate escape codes
|
||||
process.stdout.write("\x1b[>1u");
|
||||
// Flag 2 = report event types (press/repeat/release)
|
||||
process.stdout.write("\x1b[>3u");
|
||||
|
||||
// Remove the response from buffer, forward any remaining input
|
||||
const remaining = buffer.replace(kittyResponsePattern, "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue