MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / parseKey

Function parseKey

frontend/util/keyutil.ts:63–72  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

61}
62
63function parseKey(key: string): { key: string; type: string } {
64 let regexMatch = key.match(KeyTypeCodeRegex);
65 if (regexMatch != null && regexMatch.length > 1) {
66 let code = regexMatch[1];
67 return { key: code, type: KeyTypeCode };
68 } else if (regexMatch != null) {
69 console.log("error: regexMatch is not null yet there is no captured group: ", regexMatch, key);
70 }
71 return { key: key, type: KeyTypeKey };
72}
73
74function parseKeyDescription(keyDescription: string): KeyPressDecl {
75 let rtn = { key: "", mods: {} } as KeyPressDecl;

Callers 1

parseKeyDescriptionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected