X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=common%2Faction_code.h;h=c153838f2baf6fc351f10b43c6bdaa3c09483267;hb=e93188021c0b1578ffbb6e0fadcd94e1e5132dcf;hp=df6ce99986894b440b31dfabef489ed9d63fc38b;hpb=f8fbecff4ddde633921703985d3335f4777d92ee;p=max%2Ftmk_keyboard.git
diff --git a/common/action_code.h b/common/action_code.h
index df6ce999..c153838f 100644
--- a/common/action_code.h
+++ b/common/action_code.h
@@ -29,13 +29,13 @@ along with this program. If not, see .
* 000r|0000|0000 0001 Transparent code
* 000r|0000| keycode Key
* 000r|mods|0000 0000 Modifiers
- * 000r|mods| keycode Key and Modifiers
+ * 000r|mods| keycode Modifiers+Key(Modified key)
* r: Left/Right flag(Left:0, Right:1)
*
* ACT_MODS_TAP(001r):
- * 0010|mods|0000 0000 Modifiers with OneShot
- * 0010|mods|0000 00xx (reserved)
- * 0010|mods| keycode Modifiers with Tap Key
+ * 001r|mods|0000 0000 Modifiers with OneShot
+ * 001r|mods|0000 00xx (reserved)
+ * 001r|mods| keycode Modifiers with Tap Key(Dual role)
*
*
* Other Keys(01xx)
@@ -69,7 +69,7 @@ along with this program. If not, see .
* 1001|oopp|BBBB BBBB 8-bit Bitwise Operation???
*
* ACT_LAYER_TAP(101x):
- * 101E|LLLL| keycode Invert with tap key
+ * 101E|LLLL| keycode On/Off with tap key
* 101E|LLLL|1110 xxxx Reserved(0xE0-EF)
* 101E|LLLL|1111 0000 Invert with tap toggle(0xF0)
* 101E|LLLL|1111 0001 On/Off
@@ -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)
/*