summaryrefslogtreecommitdiffstats
path: root/common/action_code.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/action_code.h')
-rw-r--r--common/action_code.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/action_code.h b/common/action_code.h
index bd3652e380..8df86b1192 100644
--- a/common/action_code.h
+++ b/common/action_code.h
@@ -209,11 +209,11 @@ enum mods_codes {
MODS_TAP_TOGGLE = 0x01,
};
#define ACTION_KEY(key) ACTION(ACT_MODS, (key))
-#define ACTION_MODS(mods) ACTION(ACT_MODS, (mods&0x1f)<<8 | 0)
-#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, (mods&0x1f)<<8 | (key))
-#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, (mods&0x1f)<<8 | (key))
-#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, (mods&0x1f)<<8 | MODS_ONESHOT)
-#define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, (mods&0x1f)<<8 | MODS_TAP_TOGGLE)
+#define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods)&0x1f)<<8 | 0)
+#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods)&0x1f)<<8 | (key))
+#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | (key))
+#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_ONESHOT)
+#define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_TAP_TOGGLE)
/*