summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorPeter Johanson <peter@peterjohanson.com>2021-10-05 02:41:56 +0000
committerPete Johanson <peter@peterjohanson.com>2021-10-04 23:01:39 -0400
commitbc179b1030ccf9dd02818f77ecd9b5b9f14e85b7 (patch)
treec4386f2dde6a4bdaffcb9c2a9b64770d91669189 /app/src
parent91ba034896c3b1668b88286e18d8f38314ec39c3 (diff)
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.
Diffstat (limited to 'app/src')
-rw-r--r--app/src/hid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/hid.c b/app/src/hid.c
index 756ed90..b524b09 100644
--- a/app/src/hid.c
+++ b/app/src/hid.c
@@ -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; \