Add ability to use tap macros without using functions

example_keyboards
Luke Silva 8 years ago
parent 87bc36253d
commit cfc4149712

@ -80,6 +80,9 @@ 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:
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:

@ -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…
Cancel
Save