Add ability to use tap macros without using functions
This commit is contained in:
parent
87bc36253d
commit
cfc4149712
2 changed files with 5 additions and 1 deletions
|
@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key)
|
|||
action.code = keymap_function_id_to_action( (int)keycode & 0xFFF );
|
||||
break;
|
||||
case QK_MACRO ... QK_MACRO_MAX:
|
||||
action.code = ACTION_MACRO(keycode & 0xFF);
|
||||
if (keycode & 0x800) // tap macros have upper bit set
|
||||
action.code = ACTION_MACRO_TAP(keycode & 0xFF);
|
||||
else
|
||||
action.code = ACTION_MACRO(keycode & 0xFF);
|
||||
break;
|
||||
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
|
||||
action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
|
||||
|
|
|
@ -246,6 +246,7 @@ enum quantum_keycodes {
|
|||
|
||||
#define M(kc) (kc | QK_MACRO)
|
||||
|
||||
#define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8)
|
||||
#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
|
||||
|
||||
// L-ayer, T-ap - 256 keycode max, 16 layer max
|
||||
|
|
Loading…
Reference in a new issue