diff options
author | Nick Brassel <nick@tzarc.org> | 2023-02-28 11:22:29 +1100 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2023-02-28 11:22:29 +1100 |
commit | bacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch) | |
tree | d4e3e57aac1a829a191831efd2e62c8a43217885 /users/konstantin | |
parent | d70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff) | |
parent | b865b9e1706ad28ae4882bd2e0331e98808295fa (diff) |
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'users/konstantin')
-rw-r--r-- | users/konstantin/konstantin.c | 2 | ||||
-rw-r--r-- | users/konstantin/tap_dance.c | 34 | ||||
-rw-r--r-- | users/konstantin/unicode.c | 2 | ||||
-rw-r--r-- | users/konstantin/unicode.h | 2 |
4 files changed, 20 insertions, 20 deletions
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index f083839630..497142ed4d 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -47,7 +47,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #ifdef LAYER_NUMPAD bool numpad = IS_LAYER_ON_STATE(state, L_NUMPAD); - bool num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK); + bool num_lock = host_keyboard_led_state().num_lock; if (numpad != num_lock) { tap_code(KC_NUM_LOCK); // Toggle Num Lock to match Numpad layer state } diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index 57a29d98b8..38d00bf56c 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -19,11 +19,11 @@ #define ACTION_TAP_DANCE_DOUBLE_MOD(mod1, mod2) { \ .fn = { td_double_mod_each, NULL, td_double_mod_reset }, \ - .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ + .user_data = &(tap_dance_pair_t){ mod1, mod2 }, \ } -void td_double_mod_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; +void td_double_mod_each(tap_dance_state_t *state, void *user_data) { + tap_dance_pair_t *data = (tap_dance_pair_t *)user_data; // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 if (state->count == 1 || state->count == 3) { @@ -36,8 +36,8 @@ void td_double_mod_each(qk_tap_dance_state_t *state, void *user_data) { state->weak_mods &= ~(MOD_BIT(data->kc1) | MOD_BIT(data->kc2)); } -void td_double_mod_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; +void td_double_mod_reset(tap_dance_state_t *state, void *user_data) { + tap_dance_pair_t *data = (tap_dance_pair_t *)user_data; if (state->count == 1 || state->count >= 3) { unregister_code(data->kc1); @@ -49,11 +49,11 @@ void td_double_mod_reset(qk_tap_dance_state_t *state, void *user_data) { #define ACTION_TAP_DANCE_MOD_LAYER(mod, layer) { \ .fn = { td_mod_layer_each, NULL, td_mod_layer_reset }, \ - .user_data = &(qk_tap_dance_dual_role_t){ mod, layer }, \ + .user_data = &(tap_dance_dual_role_t){ mod, layer }, \ } -void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; +void td_mod_layer_each(tap_dance_state_t *state, void *user_data) { + tap_dance_dual_role_t *data = (tap_dance_dual_role_t *)user_data; // Single tap → mod, double tap → layer, triple tap etc. → mod+layer if (state->count == 1 || state->count == 3) { @@ -66,8 +66,8 @@ void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) { } } -void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; +void td_mod_layer_reset(tap_dance_state_t *state, void *user_data) { + tap_dance_dual_role_t *data = (tap_dance_dual_role_t *)user_data; if (state->count == 1 || state->count >= 3) { unregister_code(data->kc); @@ -79,7 +79,7 @@ void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) { #define ACTION_TAP_DANCE_LAYER_MOD(layer, mod) { \ .fn = { td_layer_mod_each, NULL, td_layer_mod_reset }, \ - .user_data = &(qk_tap_dance_layer_mod_t){ layer, mod, 0, 0 }, \ + .user_data = &(tap_dance_layer_mod_t){ layer, mod, 0, 0 }, \ } typedef struct { @@ -87,10 +87,10 @@ typedef struct { uint16_t kc; bool layer_on; // Layer state when tap dance started bool started; -} qk_tap_dance_layer_mod_t; +} tap_dance_layer_mod_t; -void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; +void td_layer_mod_each(tap_dance_state_t *state, void *user_data) { + tap_dance_layer_mod_t *data = (tap_dance_layer_mod_t *)user_data; if (!data->started) { data->layer_on = IS_LAYER_ON(data->layer); data->started = true; @@ -107,8 +107,8 @@ void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) { } } -void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; +void td_layer_mod_reset(tap_dance_state_t *state, void *user_data) { + tap_dance_layer_mod_t *data = (tap_dance_layer_mod_t *)user_data; if ((state->count == 1 || state->count >= 3) && !data->layer_on) { layer_off(data->layer); @@ -120,7 +120,7 @@ void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) { data->started = false; } -qk_tap_dance_action_t tap_dance_actions[] = { +tap_dance_action_t tap_dance_actions[] = { [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_REM), [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_RGUI), diff --git a/users/konstantin/unicode.c b/users/konstantin/unicode.c index 4eae716afd..ed92b818b0 100644 --- a/users/konstantin/unicode.c +++ b/users/konstantin/unicode.c @@ -17,7 +17,7 @@ #include "unicode.h" #ifdef UNICODEMAP_ENABLE -const uint32_t PROGMEM unicode_map[] = { +const uint32_t unicode_map[] PROGMEM = { FOREACH_UNICODE(UCM_ENTRY) }; #endif diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h index 1a1eb60894..82caea7c9a 100644 --- a/users/konstantin/unicode.h +++ b/users/konstantin/unicode.h @@ -42,7 +42,7 @@ enum unicode_names { FOREACH_UNICODE(UCM_NAME) }; -extern const uint32_t PROGMEM unicode_map[]; +extern const uint32_t unicode_map[] PROGMEM; enum unicode_keycodes { FOREACH_UNICODE(UCM_KEYCODE) |