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

Function shouldRecord

codejar.ts:88–94  ·  view source on GitHub ↗
(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

86
87 let recording = false
88 const shouldRecord = (event: KeyboardEvent): boolean => {
89 return !isUndo(event) && !isRedo(event)
90 && event.key !== 'Meta'
91 && event.key !== 'Control'
92 && event.key !== 'Alt'
93 && !event.key.startsWith('Arrow')
94 }
95 const debounceRecordHistory = debounce((event: KeyboardEvent) => {
96 if (shouldRecord(event)) {
97 recordHistory()

Callers 1

CodeJarFunction · 0.85

Calls 2

isUndoFunction · 0.85
isRedoFunction · 0.85

Tested by

no test coverage detected