summaryrefslogtreecommitdiff
path: root/keyboards/jones/v03_1/keymaps/default_jp/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/jones/v03_1/keymaps/default_jp/keymap.c')
-rw-r--r--keyboards/jones/v03_1/keymaps/default_jp/keymap.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/keyboards/jones/v03_1/keymaps/default_jp/keymap.c b/keyboards/jones/v03_1/keymaps/default_jp/keymap.c
index 436586a721..56f51d56ce 100644
--- a/keyboards/jones/v03_1/keymaps/default_jp/keymap.c
+++ b/keyboards/jones/v03_1/keymaps/default_jp/keymap.c
@@ -51,9 +51,18 @@ void ql_reset(qk_tap_dance_state_t *state, void *user_data);
// Tap Dance definitions
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_LSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
- [TD_ESC_NUM] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275),
+ [TD_ESC_NUM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ql_finished, ql_reset),
};
+uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case TD(TD_ESC_NUM):
+ return 275;
+ default:
+ return TAPPING_TERM;
+ }
+}
+
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
MAC = SAFE_RANGE,
@@ -246,7 +255,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
}
if (index == 1) { /* Second encoder, Left side */
- switch(biton32(layer_state)) {
+ switch(get_highest_layer(layer_state)) {
case _LOWER:
if (clockwise) {
rgblight_decrease_hue();
@@ -324,7 +333,7 @@ static tap ql_tap_state = {
// Functions that control what our tap dance key does
void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
ql_tap_state.state = cur_dance(state);
- switch(state->keycode) {
+ switch(TAP_DANCE_KEYCODE(state)) {
case TD(TD_ESC_NUM): // ESC key action
switch (ql_tap_state.state) {
case SINGLE_TAP:
@@ -353,7 +362,7 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
}
void ql_reset(qk_tap_dance_state_t *state, void *user_data) {
- switch(state->keycode) {
+ switch(TAP_DANCE_KEYCODE(state)) {
case TD(TD_ESC_NUM):
// If the key was held down and now is released then switch off the layer
if (ql_tap_state.state == TAP_HOLD) {