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

Function Output_toggleKbdProtocol_capability

Output/USB/output_usb.c:234–259  ·  view source on GitHub ↗

Toggle Keyboard Protocol

Source from the content-addressed store, hash-verified

232
233// Toggle Keyboard Protocol
234void Output_toggleKbdProtocol_capability( TriggerMacro *trigger, uint8_t state, uint8_t stateType, uint8_t *args )
235{
236#if enableKeyboard_define == 1
237 CapabilityState cstate = KLL_CapabilityState( state, stateType );
238
239 switch ( cstate )
240 {
241 case CapabilityState_Last:
242 // Only use capability on release
243 break;
244 case CapabilityState_Debug:
245 // Display capability name
246 print("Output_toggleKbdProtocol()");
247 return;
248 default:
249 return;
250 }
251
252 // Flush the key buffers
253 USB_flushBuffers();
254
255 // Toggle the keyboard protocol Mode
256 USBKeys_Protocol_New = !USBKeys_Protocol;
257 USBKeys_Protocol_Change = 1;
258#endif
259}
260
261
262// Sends a Consumer Control code to the USB Output buffer

Callers

nothing calls this directly

Calls 2

KLL_CapabilityStateFunction · 0.85
USB_flushBuffersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…