MCPcopy
hub / github.com/antonmedv/codejar / getKeyCode

Function getKeyCode

codejar.ts:507–511  ·  view source on GitHub ↗
(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

505 }
506
507 function getKeyCode(event: KeyboardEvent): string | undefined {
508 let key = event.key || event.keyCode || event.which
509 if (!key) return undefined
510 return (typeof key === 'string' ? key : String.fromCharCode(key)).toUpperCase()
511 }
512
513 function insert(text: string) {
514 text = text

Callers 3

isUndoFunction · 0.85
isRedoFunction · 0.85
isCopyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected