Yes, it is. Turns out we’re not using it, I’ll fix this, thanks for noticing!
You can add one, but it is not strictly required. You can just add another entry, like this:
USE_MAGIC_COMBOS({.action = toggleKeyboardProtocol,
.keys = {...}
},
{.action = someOtherAction,
.keys = { ... }
});
The name is most useful when you have the same .action
for multiple combos, and want to do different things in the action handler, based on what the magic combo index is. A name helps there, so you don’t have to use magic numbers. Other than that, it’s not particularly useful - but does make the code somewhat clearer, I think.
BootKeyboard.getProtocol()
will return either HID_BOOT_PROTOCOL
or HID_REPORT_PROTOCOL
, you can light up stuff based on that.