forked from kofal.net/zmk
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:
committed by
Pete Johanson
parent
91ba034896
commit
bc179b1030
@@ -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; \
|
||||
|
||||
Reference in New Issue
Block a user