Align location of tap dance keycode (#22742)
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "action.h"
|
||||
#include "quantum_keycodes.h"
|
||||
|
||||
typedef struct {
|
||||
uint16_t interrupting_keycode;
|
||||
@ -74,8 +75,7 @@ typedef struct {
|
||||
#define ACTION_TAP_DANCE_FN_ADVANCED_WITH_RELEASE(user_fn_on_each_tap, user_fn_on_each_release, user_fn_on_dance_finished, user_fn_on_dance_reset) \
|
||||
{ .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, user_fn_on_each_release}, .user_data = NULL, }
|
||||
|
||||
#define TD(n) (QK_TAP_DANCE | TD_INDEX(n))
|
||||
#define TD_INDEX(code) ((code)&0xFF)
|
||||
#define TD_INDEX(code) QK_TAP_DANCE_GET_INDEX(code)
|
||||
#define TAP_DANCE_KEYCODE(state) TD(((tap_dance_action_t *)state) - tap_dance_actions)
|
||||
|
||||
extern tap_dance_action_t tap_dance_actions[];
|
||||
|
Reference in New Issue
Block a user