diff options
Diffstat (limited to 'keyboards/jones')
-rw-r--r-- | keyboards/jones/v03/config.h | 1 | ||||
-rw-r--r-- | keyboards/jones/v03/keymaps/default_jp/config.h | 1 | ||||
-rw-r--r-- | keyboards/jones/v03/keymaps/default_jp/keymap.c | 15 | ||||
-rw-r--r-- | keyboards/jones/v03_1/config.h | 1 | ||||
-rw-r--r-- | keyboards/jones/v03_1/keymaps/default_ansi/config.h | 1 | ||||
-rw-r--r-- | keyboards/jones/v03_1/keymaps/default_ansi/keymap.c | 17 | ||||
-rw-r--r-- | keyboards/jones/v03_1/keymaps/default_jp/config.h | 1 | ||||
-rw-r--r-- | keyboards/jones/v03_1/keymaps/default_jp/keymap.c | 17 |
8 files changed, 41 insertions, 13 deletions
diff --git a/keyboards/jones/v03/config.h b/keyboards/jones/v03/config.h index 9123005ac4..2c44bbd6bd 100644 --- a/keyboards/jones/v03/config.h +++ b/keyboards/jones/v03/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Same pins for Jones' custom Round-Robin matrix. #define MATRIX_ROW_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 } #define MATRIX_COL_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ // No need to define DIODE_DIRECTION for Jones' custom Round-Robin matrix. diff --git a/keyboards/jones/v03/keymaps/default_jp/config.h b/keyboards/jones/v03/keymaps/default_jp/config.h index aa06121c1c..7545003ac7 100644 --- a/keyboards/jones/v03/keymaps/default_jp/config.h +++ b/keyboards/jones/v03/keymaps/default_jp/config.h @@ -21,3 +21,4 @@ // time for long press #define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/jones/v03/keymaps/default_jp/keymap.c b/keyboards/jones/v03/keymaps/default_jp/keymap.c index 3f5b10208c..bdcb9e88b1 100644 --- a/keyboards/jones/v03/keymaps/default_jp/keymap.c +++ b/keyboards/jones/v03/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, @@ -303,7 +312,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: @@ -332,7 +341,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) { diff --git a/keyboards/jones/v03_1/config.h b/keyboards/jones/v03_1/config.h index e73bb22850..9359b0a51b 100644 --- a/keyboards/jones/v03_1/config.h +++ b/keyboards/jones/v03_1/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Same pins for Jones' custom Round-Robin matrix. #define MATRIX_ROW_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 } #define MATRIX_COL_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ // No need to define DIODE_DIRECTION for Jones' custom Round-Robin matrix. diff --git a/keyboards/jones/v03_1/keymaps/default_ansi/config.h b/keyboards/jones/v03_1/keymaps/default_ansi/config.h index 0b51190bbe..ee7b09a90c 100644 --- a/keyboards/jones/v03_1/keymaps/default_ansi/config.h +++ b/keyboards/jones/v03_1/keymaps/default_ansi/config.h @@ -21,6 +21,7 @@ // time for long press #define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY // music map for music-mode #define MUSIC_MAP diff --git a/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c b/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c index 5b1486bb86..a592418c4d 100644 --- a/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c +++ b/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c @@ -50,9 +50,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, @@ -244,7 +253,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(); @@ -322,7 +331,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: @@ -351,7 +360,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) { diff --git a/keyboards/jones/v03_1/keymaps/default_jp/config.h b/keyboards/jones/v03_1/keymaps/default_jp/config.h index 0b51190bbe..ee7b09a90c 100644 --- a/keyboards/jones/v03_1/keymaps/default_jp/config.h +++ b/keyboards/jones/v03_1/keymaps/default_jp/config.h @@ -21,6 +21,7 @@ // time for long press #define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY // music map for music-mode #define MUSIC_MAP 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) { |