MCPcopy Create free account
hub / github.com/kiibohd/controller / Scan_addScanCode

Function Scan_addScanCode

Scan/TestIn/scan_loop.c:142–152  ·  view source on GitHub ↗

Adds a ScanCode to the internal KLL buffer Returns 1 if added, 0 if the ScanCode is already in the buffer Returns 2 if there's an error Generally 1 will be the return

Source from the content-addressed store, hash-verified

140// Returns 2 if there's an error
141// Generally 1 will be the return
142int Scan_addScanCode( uint8_t index, uint8_t type )
143{
144 // Add key event to macro key buffer
145 TriggerGuide guide = {
146 .type = type,
147 .state = ScheduleType_P, // Press
148 .scanCode = index,
149 };
150
151 return Macro_pressReleaseAdd( &guide );
152}
153
154
155// Signals a ScanCode removal from the internal KLL buffer

Callers

nothing calls this directly

Calls 1

Macro_pressReleaseAddFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…