MCPcopy Create free account
hub / github.com/cursor/cookbook / getInputCharacter

Function getInputCharacter

sdk/coding-agent-cli/src/tui/App.tsx:1175–1181  ·  view source on GitHub ↗
(key: KeyEvent)

Source from the content-addressed store, hash-verified

1173}
1174
1175function getInputCharacter(key: KeyEvent) {
1176 if (key.ctrl || key.meta || key.name.length !== 1) {
1177 return ""
1178 }
1179
1180 return key.shift ? key.name.toUpperCase() : key.name
1181}
1182
1183function isSearchInput(input: string) {
1184 return input.length > 0 && !/[\u0000-\u001F\u007F]/.test(input)

Callers 1

AppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected