diff options
Diffstat (limited to 'keyboards/jones/v03')
-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 |
3 files changed, 13 insertions, 4 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) { |