forked from mirrors/qmk_userspace
Add action 'Momentary switching with Modifiers'
This commit is contained in:
parent
8cec0bc9d6
commit
821c719e98
3 changed files with 19 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue