MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / parseModifyOtherKeysSequence

Function parseModifyOtherKeysSequence

packages/pi-tui/src/keys.ts:696–702  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

694}
695
696function parseModifyOtherKeysSequence(data: string): ParsedModifyOtherKeysSequence | null {
697 const match = data.match(/^\x1b\[27;(\d+);(\d+)~$/);
698 if (!match) return null;
699 const modValue = parseInt(match[1]!, 10);
700 const codepoint = parseInt(match[2]!, 10);
701 return { codepoint, modifier: modValue - 1 };
702}
703
704/**
705 * Match xterm modifyOtherKeys format: CSI 27 ; modifiers ; keycode ~

Callers 4

matchesModifyOtherKeysFunction · 0.85
parseKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected