summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-05-20 15:51:44 -0400
committerPete Johanson <peter@peterjohanson.com>2020-05-20 15:51:44 -0400
commit0db57b0c12a6eeb5f0947b9988b5ac585f240c44 (patch)
treebdbbce810e2fa17e536bda436d66ddfaeb3099fe
parent9e27f0b5665a6e3b277105f03dc475918ba810d3 (diff)
Fix for return value from HID mod functions.
-rw-r--r--src/hid.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/hid.c b/src/hid.c
index 234c624..51f92a7 100644
--- a/src/hid.c
+++ b/src/hid.c
@@ -4,12 +4,13 @@ static struct zmk_hid_report report = {
.modifiers = 0,
.keys = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-#define _TOGGLE_MOD(mod, state) \
- if (modifier > MOD_RGUI) \
- { \
- return -EINVAL; \
- } \
- WRITE_BIT(report.modifiers, mod, state);
+#define _TOGGLE_MOD(mod, state) \
+ if (modifier > MOD_RGUI) \
+ { \
+ return -EINVAL; \
+ } \
+ WRITE_BIT(report.modifiers, mod, state); \
+ return 0;
int zmk_hid_register_mod(zmk_mod modifier)
{