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

Function parseKeyId

packages/pi-tui/src/keys.ts:788–801  ·  view source on GitHub ↗
(
	keyId: string,
)

Source from the content-addressed store, hash-verified

786}
787
788function parseKeyId(
789 keyId: string,
790): { key: string; ctrl: boolean; shift: boolean; alt: boolean; super: boolean } | null {
791 const parts = keyId.toLowerCase().split("+");
792 const key = parts[parts.length - 1];
793 if (!key) return null;
794 return {
795 key,
796 ctrl: parts.includes("ctrl"),
797 shift: parts.includes("shift"),
798 alt: parts.includes("alt"),
799 super: parts.includes("super"),
800 };
801}
802
803/**
804 * Match input data against a key identifier string.

Callers 1

matchesKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected