summaryrefslogtreecommitdiffstats
path: root/common/action.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-09-29 10:12:58 +0900
committertmk <nobody@nowhere>2014-09-29 10:29:33 +0900
commit821c719e98f310938e2bb3f2ad3e6a726bd8b03e (patch)
tree0af03831bbed9d6a4155e46923406b4a3bd6b67e /common/action.c
parent8cec0bc9d66cb7da4770e6502e97a426908eb532 (diff)
Add action 'Momentary switching with Modifiers'
Diffstat (limited to 'common/action.c')
-rw-r--r--common/action.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/action.c b/common/action.c
index fddb97c508..83bc8a6187 100644
--- a/common/action.c
+++ b/common/action.c
@@ -237,6 +237,16 @@ void process_action(keyrecord_t *record)
case ACT_LAYER_TAP:
case ACT_LAYER_TAP_EXT:
switch (action.layer_tap.code) {
+ case 0xe0 ... 0xef:
+ /* layer On/Off with modifiers(left only) */
+ if (event.pressed) {
+ layer_on(action.layer_tap.val);
+ register_mods(action.layer_tap.code & 0x0f);
+ } else {
+ layer_off(action.layer_tap.val);
+ unregister_mods(action.layer_tap.code & 0x0f);
+ }
+ break;
case OP_TAP_TOGGLE:
/* tap toggle */
if (event.pressed) {