]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk_core/common/action_macro.h
Merge pull request #230 from jerryen/master
[max/tmk_keyboard.git] / tmk_core / common / action_macro.h
index aedc32ec6b2c428e53cd24d3d5c105eb1f1143eb..4cf2216dad0a6a0571dd5ecc579f874c266f70c7 100644 (file)
@@ -64,6 +64,9 @@ enum macro_command_id{
     /* 0x74 - 0x83 */
     WAIT                = 0x74,
     INTERVAL,
+    MOD_STORE,
+    MOD_RESTORE,
+    MOD_CLEAR,
 
     /* 0x84 - 0xf3 (reserved for keycode up) */
 
@@ -82,6 +85,9 @@ enum macro_command_id{
 #define TYPE(key)       DOWN(key), UP(key)
 #define WAIT(ms)        WAIT, (ms)
 #define INTERVAL(ms)    INTERVAL, (ms)
+#define STORE()         MOD_STORE
+#define RESTORE()       MOD_RESTORE
+#define CLEAR()         MOD_CLEAR
 
 /* key down */
 #define D(key)          DOWN(KC_##key)
@@ -93,6 +99,12 @@ enum macro_command_id{
 #define W(ms)           WAIT(ms)
 /* interval */
 #define I(ms)           INTERVAL(ms)
+/* store modifier(s) */
+#define SM()            STORE()
+/* restore modifier(s) */
+#define RM()            RESTORE()
+/* clear modifier(s) */
+#define CM()            CLEAR()
 
 /* for backward comaptibility */
 #define MD(key)         DOWN(KC_##key)