aboutsummaryrefslogtreecommitdiff
path: root/common/action.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/action.h')
-rw-r--r--common/action.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/common/action.h b/common/action.h
index 9b559cb18..ac44b1a79 100644
--- a/common/action.h
+++ b/common/action.h
@@ -157,7 +157,7 @@ ACT_LAYER_BIT(1001): Bit-op layer
1571000|LLLL|0000 0001 set L to layer on press 1571000|LLLL|0000 0001 set L to layer on press
1581000|LLLL|0000 0010 set L to layer on release 1581000|LLLL|0000 0010 set L to layer on release
1591000|----|0000 0011 set default to layer on both(return to default layer) 1591000|----|0000 0011 set default to layer on both(return to default layer)
1601000|LLLL|xxxx xxxx set L to layer while hold and send key on tap 1601000|LLLL| keycode set L to layer while hold and send key on tap
1611000|LLLL|1111 0000 set L to layer while hold and toggle on several taps 1611000|LLLL|1111 0000 set L to layer while hold and toggle on several taps
1621000|LLLL|1111 1111 set L to default and layer(on press) 1621000|LLLL|1111 1111 set L to default and layer(on press)
163 163
@@ -165,7 +165,7 @@ ACT_LAYER_BIT(1001): Bit-op layer
1651001|BBBB|0000 0001 bit-xor layer with B on press 1651001|BBBB|0000 0001 bit-xor layer with B on press
1661001|BBBB|0000 0010 bit-xor layer with B on release 1661001|BBBB|0000 0010 bit-xor layer with B on release
1671001|BBBB|0000 0011 bit-xor layer with B on both(momentary) 1671001|BBBB|0000 0011 bit-xor layer with B on both(momentary)
1681001|BBBB|xxxx xxxx bit-xor layer with B while hold and send key on tap 1681001|BBBB| keycode bit-xor layer with B while hold and send key on tap
1691001|BBBB|1111 0000 bit-xor layer with B while hold and toggle on several taps 1691001|BBBB|1111 0000 bit-xor layer with B while hold and toggle on several taps
1701001|BBBB|1111 1111 bit-xor default with B and set layer(on press) 1701001|BBBB|1111 1111 bit-xor default with B and set layer(on press)
171 171
@@ -213,10 +213,10 @@ enum action_kind_id {
213/* Key */ 213/* Key */
214#define ACTION_KEY(key) ACTION(ACT_LMODS, key) 214#define ACTION_KEY(key) ACTION(ACT_LMODS, key)
215/* Mods & key */ 215/* Mods & key */
216#define ACTION_LMODS(mods) ACTION(ACT_LMODS, (mods)<<8 | 0x00) 216#define ACTION_LMODS(mods) ACTION(ACT_LMODS, MODS4(mods)<<8 | 0x00)
217#define ACTION_LMODS_KEY(mods, key) ACTION(ACT_LMODS, (mods)<<8 | (key)) 217#define ACTION_LMODS_KEY(mods, key) ACTION(ACT_LMODS, MODS4(mods)<<8 | (key))
218#define ACTION_RMODS(mods) ACTION(ACT_RMODS, (mods)<<8 | 0x00) 218#define ACTION_RMODS(mods) ACTION(ACT_RMODS, MODS4(mods)<<8 | 0x00)
219#define ACTION_RMODS_KEY(mods, key) ACTION(ACT_RMODS, (mods)<<8 | (key)) 219#define ACTION_RMODS_KEY(mods, key) ACTION(ACT_RMODS, MODS4(mods)<<8 | (key))
220/* Mod & key */ 220/* Mod & key */
221#define ACTION_LMOD(mod) ACTION(ACT_LMODS, MODS4(MOD_BIT(mod))<<8 | 0x00) 221#define ACTION_LMOD(mod) ACTION(ACT_LMODS, MODS4(MOD_BIT(mod))<<8 | 0x00)
222#define ACTION_LMOD_KEY(mod, key) ACTION(ACT_LMODS, MODS4(MOD_BIT(mod))<<8 | (key)) 222#define ACTION_LMOD_KEY(mod, key) ACTION(ACT_LMODS, MODS4(MOD_BIT(mod))<<8 | (key))
@@ -268,8 +268,9 @@ enum layer_vals_default {
268/* 268/*
269 * Set layer 269 * Set layer
270 */ 270 */
271/* set layer on press and set default on release */ 271/* set layer on press and none on release */
272#define ACTION_LAYER_SET(layer) ACTION_LAYER_SET_MOMENTARY(layer) 272#define ACTION_LAYER_SET(layer) ACTION_LAYER_SET_P(layer)
273/* set layer on press and set default on release (This is needed by legacy keymap support.) */
273#define ACTION_LAYER_SET_MOMENTARY(layer) ACTION(ACT_LAYER, (layer)<<8 | LAYER_MOMENTARY) 274#define ACTION_LAYER_SET_MOMENTARY(layer) ACTION(ACT_LAYER, (layer)<<8 | LAYER_MOMENTARY)
274/* set layer on press and none on release */ 275/* set layer on press and none on release */
275#define ACTION_LAYER_SET_TOGGLE(layer) ACTION_LAYER_SET_R(layer) 276#define ACTION_LAYER_SET_TOGGLE(layer) ACTION_LAYER_SET_R(layer)