From: tmk Date: Wed, 11 Sep 2013 05:05:05 +0000 (+0900) Subject: Fix action macros X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=c7faa51ee843198c1b6a1dfeb0f1842c4e3ea0e6;p=max%2Ftmk_keyboard.git Fix action macros --- diff --git a/common/action_code.h b/common/action_code.h index 45e974a6..b2a7f2b4 100644 --- a/common/action_code.h +++ b/common/action_code.h @@ -207,10 +207,10 @@ enum mods_codes { MODS_ONESHOT = 0x00, }; #define ACTION_KEY(key) ACTION(ACT_MODS, (key)) -#define ACTION_MODS(mods) ACTION(ACT_MODS, (mods)<<8 | 0) -#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, (mods)<<8 | (key)) -#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, (mods)<<8 | (key)) -#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, (mods)<<8 | MODS_ONESHOT) +#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) /*