feat(hid): Kconfig for basic/full consumer usages.
* Add ZMK_HID_CONSUMER_REPORT_USAGES choice to allow choosing between full consumer usage range, with poor OS compat, or basic consumer usage range, with broader compat.
This commit is contained in:
parent
91ba034896
commit
bc179b1030
3 changed files with 45 additions and 1 deletions
|
|
@ -117,6 +117,8 @@ static inline int deselect_keyboard_usage(zmk_key_t usage) {
|
|||
#endif
|
||||
|
||||
#define TOGGLE_CONSUMER(match, val) \
|
||||
COND_CODE_1(IS_ENABLED(CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC), \
|
||||
(if (val > 0xFF) { return -ENOTSUP; }), ()) \
|
||||
for (int idx = 0; idx < CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE; idx++) { \
|
||||
if (consumer_report.body.keys[idx] != match) { \
|
||||
continue; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue