summaryrefslogtreecommitdiff
path: root/keyboards/jones/v03_1
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/jones/v03_1')
-rw-r--r--keyboards/jones/v03_1/keymaps/default_ansi/config.h1
-rw-r--r--keyboards/jones/v03_1/keymaps/default_ansi/keymap.c17
-rw-r--r--keyboards/jones/v03_1/keymaps/default_jp/config.h1
-rw-r--r--keyboards/jones/v03_1/keymaps/default_jp/keymap.c17
4 files changed, 28 insertions, 8 deletions
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) {