From 1706da9054f8c4aa77493062a8937a7b64970a9e Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Mon, 13 Jun 2022 22:12:55 +0200 Subject: tap-dance: Restructure code and document in more detail (#16394) --- .../ergodox_ez/keymaps/hacker_dvorak/config.h | 1 + .../hacker_dvorak/tap_dance/tap_dance_actions.c | 38 ++++++++++++++++------ 2 files changed, 29 insertions(+), 10 deletions(-) (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h index da20820787..c35963d842 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -7,6 +7,7 @@ #undef TAPPING_TERM #define TAPPING_TERM 175 +#define TAPPING_TERM_PER_KEY #undef DEBOUNCE #define DEBOUNCE 15 diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c index 59e3e2b0dc..1d5e1cee00 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c @@ -13,14 +13,32 @@ qk_tap_dance_action_t tap_dance_actions[] = { [RPRN_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC), [LCBR_LABK] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LABK), [RCBR_RABK] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RABK), - [SCLN_COLN] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, scln_coln_finished, scln_coln_reset, DANCING_TERM), - [QUOT_DQUO] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, quot_dquot_finished, quot_dquot_reset, DANCING_TERM), - [DOT_COMM] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, dot_comm_finished, dot_comm_reset, DANCING_TERM), - [NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, none_lead_finished, none_lead_reset, DANCING_TERM), - [U_ARR_GUI] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, u_arrows_gui_finished, u_arrows_gui_reset, DANCING_TERM), - [H_MOU_GUI] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, h_mouse_gui_finished, h_mouse_gui_reset, DANCING_TERM), - [J_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, j_media_meh_finished, j_media_meh_reset, DANCING_TERM), - [W_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, w_media_meh_finished, w_media_meh_reset, DANCING_TERM), - [K_NUM_HYP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, k_numpad_hyper_finished, k_numpad_hyper_reset, DANCING_TERM), - [M_CHO_HYP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, m_chords_hyper_finished, m_chords_hyper_reset, DANCING_TERM), + [SCLN_COLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, scln_coln_finished, scln_coln_reset), + [QUOT_DQUO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, quot_dquot_finished, quot_dquot_reset), + [DOT_COMM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dot_comm_finished, dot_comm_reset), + [NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, none_lead_finished, none_lead_reset), + [U_ARR_GUI] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, u_arrows_gui_finished, u_arrows_gui_reset), + [H_MOU_GUI] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, h_mouse_gui_finished, h_mouse_gui_reset), + [J_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, j_media_meh_finished, j_media_meh_reset), + [W_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, w_media_meh_finished, w_media_meh_reset), + [K_NUM_HYP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, k_numpad_hyper_finished, k_numpad_hyper_reset), + [M_CHO_HYP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, m_chords_hyper_finished, m_chords_hyper_reset), }; + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(SCLN_COLN): + case TD(QUOT_DQUO): + case TD(DOT_COMM): + case TD(NONE_LEAD): + case TD(U_ARR_GUI): + case TD(H_MOU_GUI): + case TD(J_MED_MEH): + case TD(W_MED_MEH): + case TD(K_NUM_HYP): + case TD(M_CHO_HYP): + return DANCING_TERM; + default: + return TAPPING_TERM; + } +} -- cgit v1.2.1 From 0da6562c4df570729889690e21061229c5648b73 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 18 Jun 2022 14:37:51 -0700 Subject: Make default layer size 16-bit (#15286) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- .../ergodox_ez/keymaps/bepo_tm_style/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/blakedietz/keymap.c | 3 +- .../ergodox_ez/keymaps/bpruitt-goddard/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/default_osx/keymap.c | 2 +- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 2 +- .../hacker_dvorak/user/layer_set_state_user.c | 2 +- .../ergodox_ez/keymaps/heartrobotninja/keymap.c | 4 +- keyboards/ergodox_ez/keymaps/kou/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/lukaus/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/matrixman/keymap.c | 2 +- .../ergodox_ez/keymaps/nathanvercaemert/keymap.c | 3 +- keyboards/ergodox_ez/keymaps/nfriend/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/profet_80/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/pvinis/keymap.c | 6 +- keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c | 3 +- keyboards/ergodox_ez/keymaps/rishka/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/skug/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/smurmann/keymap.c | 8 +- keyboards/ergodox_ez/keymaps/steno/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/testing/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/vim/keymap.c | 2 +- keyboards/ergodox_ez/util/compile_keymap.py | 110 +++++++++------------ 22 files changed, 73 insertions(+), 94 deletions(-) (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c index a5b107baae..91798ab188 100755 --- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c @@ -190,7 +190,7 @@ static bool is_macro1_recording = false; // The current set of active layers (as a bitmask). // There is a global 'layer_state' variable but it is set after the call // to layer_state_set_user(). -static uint32_t current_layer_state = 0; +static layer_state_t current_layer_state = 0; layer_state_t layer_state_set_user(layer_state_t state); // Method called at the end of the tap dance on the TAP_MACRO key. That key is diff --git a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c index 5c08d30727..67c50eb129 100644 --- a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c +++ b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c @@ -200,7 +200,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); @@ -262,4 +262,3 @@ void matrix_scan_user(void) { // } // return true; //} - diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c index 229ece0d74..eff7f111b4 100644 --- a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c @@ -98,7 +98,7 @@ static bool is_macro1_recording = false; // The current set of active layers (as a bitmask). // There is a global 'layer_state' variable but it is set after the call // to layer_state_set_user(). -static uint32_t current_layer_state = 0; +static layer_state_t current_layer_state = 0; layer_state_t layer_state_set_user(layer_state_t state); // Method called at the end of the tap dance on the TAP_MACRO key. That key is diff --git a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c index 73b1077b83..3ab66078fe 100644 --- a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c @@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index fab2977356..ff9ae77bdd 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -725,7 +725,7 @@ void led_set_user(uint8_t usb_led) { void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_2_off(); diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c index fd022681b0..ed407def79 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c @@ -1,6 +1,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); switch (layer) { case DVORAK: diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c index b6edc17532..91884c8e76 100644 --- a/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c @@ -370,7 +370,7 @@ LEADER_EXTERNS(); void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (keyboard_report->mods & MOD_BIT(KC_LSFT) || ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && @@ -677,4 +677,4 @@ void matrix_init_user(void) wait_ms(1000); rgblight_effect_knight(50); -} \ No newline at end of file +} diff --git a/keyboards/ergodox_ez/keymaps/kou/keymap.c b/keyboards/ergodox_ez/keymaps/kou/keymap.c index c8d0a6b5dd..01427c2d2d 100644 --- a/keyboards/ergodox_ez/keymaps/kou/keymap.c +++ b/keyboards/ergodox_ez/keymaps/kou/keymap.c @@ -284,7 +284,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/lukaus/keymap.c b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c index 5d797beb18..542e123db3 100644 --- a/keyboards/ergodox_ez/keymaps/lukaus/keymap.c +++ b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c @@ -813,7 +813,7 @@ case RU_7: layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); // ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/matrixman/keymap.c b/keyboards/ergodox_ez/keymaps/matrixman/keymap.c index 10b6567cdb..bb6ba5ae34 100644 --- a/keyboards/ergodox_ez/keymaps/matrixman/keymap.c +++ b/keyboards/ergodox_ez/keymaps/matrixman/keymap.c @@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c index e31391a674..a3c2176951 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c @@ -218,7 +218,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); @@ -431,4 +431,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - diff --git a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c index 1d12093bab..ba578dd1c5 100644 --- a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c @@ -1057,7 +1057,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c index 85455fa9d9..6f602e828e 100644 --- a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c +++ b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c @@ -157,7 +157,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c index 024cefd270..c69621ab98 100644 --- a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c @@ -245,11 +245,11 @@ void keyboard_post_init_user_keymap(void) { } // light up leds based on the layer -uint32_t layer_state_set_user_keymap(uint32_t state) { +layer_state_t layer_state_set_user_keymap(layer_state_t state) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case LR_SYSCTL: ergodox_right_led_3_on(); // blue break; @@ -306,7 +306,7 @@ uint32_t layer_state_set_user_keymap(uint32_t state) { // SYSCTL on first tap, MOUSE ON second tap // void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) { -// uint8_t layer = biton32(layer_state); +// uint8_t layer = get_highest_layer(layer_state); // switch(state->count) { // case 1: diff --git a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c index 3e607edb39..595f3b4ee1 100644 --- a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c +++ b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c @@ -228,7 +228,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case SYMB: ergodox_right_led_1_on(); if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); } @@ -268,4 +268,3 @@ layer_state_t layer_state_set_user(layer_state_t state) { } return state; } - diff --git a/keyboards/ergodox_ez/keymaps/rishka/keymap.c b/keyboards/ergodox_ez/keymaps/rishka/keymap.c index 102803e512..0d6ac9fe95 100644 --- a/keyboards/ergodox_ez/keymaps/rishka/keymap.c +++ b/keyboards/ergodox_ez/keymaps/rishka/keymap.c @@ -138,7 +138,7 @@ void keyboard_post_init_user(void) { }; // Runs whenever there is a layer state change. -uint32_t layer_state_set_user(layer_state_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index 1446ea7466..04aa6a99fd 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -228,7 +228,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c index 42ac13775f..c8ddc23a8b 100644 --- a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c +++ b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c @@ -139,7 +139,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if(layer == 1) { @@ -157,7 +157,7 @@ void matrix_scan_user(void) { } if(keyboard_report->mods & MOD_BIT(KC_LSFT)) - { + { ergodox_right_led_1_set (LED_BRIGHTNESS_HI); ergodox_right_led_1_on (); } else { @@ -182,7 +182,7 @@ void matrix_scan_user(void) { } if(keyboard_report->mods & MOD_BIT(KC_LCTRL)) - { + { ergodox_right_led_3_set (LED_BRIGHTNESS_HI); ergodox_right_led_3_on (); } else { @@ -195,7 +195,7 @@ void matrix_scan_user(void) { }; void led_set_user(uint8_t usb_led){ - if (usb_led & (1 << USB_LED_CAPS_LOCK)) + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { capsOn = true; }else { diff --git a/keyboards/ergodox_ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c index 080d3f6cef..96218bbe99 100644 --- a/keyboards/ergodox_ez/keymaps/steno/keymap.c +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -228,7 +228,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/testing/keymap.c b/keyboards/ergodox_ez/keymaps/testing/keymap.c index 5c1fc4af28..3aee63ddf1 100644 --- a/keyboards/ergodox_ez/keymaps/testing/keymap.c +++ b/keyboards/ergodox_ez/keymaps/testing/keymap.c @@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/vim/keymap.c b/keyboards/ergodox_ez/keymaps/vim/keymap.c index 948f2b4794..c1c037ef23 100644 --- a/keyboards/ergodox_ez/keymaps/vim/keymap.c +++ b/keyboards/ergodox_ez/keymaps/vim/keymap.c @@ -330,7 +330,7 @@ void matrix_init_user(void) { }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/util/compile_keymap.py b/keyboards/ergodox_ez/util/compile_keymap.py index b447ecaf5c..310512c920 100755 --- a/keyboards/ergodox_ez/util/compile_keymap.py +++ b/keyboards/ergodox_ez/util/compile_keymap.py @@ -27,29 +27,34 @@ PY2 = sys.version_info.major == 2 if PY2: chr = unichr - KEYBOARD_LAYOUTS = { # These map positions in the parsed layout to # positions in the KEYMAP MATRIX 'ergodox_ez': [ - [ 0, 1, 2, 3, 4, 5, 6], [38, 39, 40, 41, 42, 43, 44], - [ 7, 8, 9, 10, 11, 12, 13], [45, 46, 47, 48, 49, 50, 51], - [14, 15, 16, 17, 18, 19 ], [ 52, 53, 54, 55, 56, 57], - [20, 21, 22, 23, 24, 25, 26], [58, 59, 60, 61, 62, 63, 64], - [27, 28, 29, 30, 31 ], [ 65, 66, 67, 68, 69], - [ 32, 33], [70, 71 ], - [ 34], [72 ], - [ 35, 36, 37], [73, 74, 75 ], + [0, 1, 2, 3, 4, 5, 6], + [38, 39, 40, 41, 42, 43, 44], + [7, 8, 9, 10, 11, 12, 13], + [45, 46, 47, 48, 49, 50, 51], + [14, 15, 16, 17, 18, 19], + [52, 53, 54, 55, 56, 57], + [20, 21, 22, 23, 24, 25, 26], + [58, 59, 60, 61, 62, 63, 64], + [27, 28, 29, 30, 31], + [65, 66, 67, 68, 69], + [32, 33], + [70, 71], + [34], + [72], + [35, 36, 37], + [73, 74, 75], ] } -ROW_INDENTS = { - 'ergodox_ez': [0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 5, 0, 6, 0, 4, 0] -} +ROW_INDENTS = {'ergodox_ez': [0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 5, 0, 6, 0, 4, 0]} BLANK_LAYOUTS = [ -# Compact Layout -""" + # Compact Layout + """ .------------------------------------.------------------------------------. | | | | | | | | | | | | | | | !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! @@ -70,8 +75,8 @@ BLANK_LAYOUTS = [ '-----------------' '-----------------' """, -# Wide Layout -""" + # Wide Layout + """ .---------------------------------------------. .---------------------------------------------. | | | | | | | | ! | | | | | | | !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! @@ -93,26 +98,22 @@ BLANK_LAYOUTS = [ """, ] - DEFAULT_CONFIG = { - "keymaps_includes": [ - "keymap_common.h", - ], + "keymaps_includes": ["keymap_common.h",], 'filler': "-+.'!:x", 'separator': "|", 'default_key_prefix': ["KC_"], } - SECTIONS = [ 'layout_config', 'layers', ] - # Markdown Parsing -ONELINE_COMMENT_RE = re.compile(r""" +ONELINE_COMMENT_RE = re.compile( + r""" ^ # comment must be at the start of the line \s* # arbitrary whitespace // # start of the comment @@ -121,22 +122,26 @@ ONELINE_COMMENT_RE = re.compile(r""" """, re.MULTILINE | re.VERBOSE ) -INLINE_COMMENT_RE = re.compile(r""" +INLINE_COMMENT_RE = re.compile( + r""" ([\,\"\[\]\{\}\d]) # anythig that might end a expression \s+ # comment must be preceded by whitespace // # start of the comment \s # and succeded by whitespace (?:[^\"\]\}\{\[]*) # the comment (except things which might be json) $ # until the end of line -""", re.MULTILINE | re.VERBOSE) +""", re.MULTILINE | re.VERBOSE +) -TRAILING_COMMA_RE = re.compile(r""" +TRAILING_COMMA_RE = re.compile( + r""" , # the comma (?:\s*) # arbitrary whitespace $ # only works if the trailing comma is followed by newline (\s*) # arbitrary whitespace ([\]\}]) # end of an array or object -""", re.MULTILINE | re.VERBOSE) +""", re.MULTILINE | re.VERBOSE +) def loads(raw_data): @@ -178,9 +183,7 @@ def parse_config(path): def end_section(): if section['start_line'] >= 0: if section['name'] == 'layout_config': - config.update(loads("\n".join( - section['code_lines'] - ))) + config.update(loads("\n".join(section['code_lines']))) elif section['sub_name'].startswith('layer'): layer_name = section['sub_name'] config['layer_lines'][layer_name] = section['code_lines'] @@ -215,6 +218,7 @@ def parse_config(path): assert 'layout' in config return config + # header file parsing IF0_RE = re.compile(r""" @@ -224,7 +228,6 @@ IF0_RE = re.compile(r""" #endif """, re.MULTILINE | re.DOTALL | re.VERBOSE) - COMMENT_RE = re.compile(r""" /\* .*? @@ -244,6 +247,7 @@ def regex_partial(re_str_fmt, flags): def partial(*args, **kwargs): re_str = re_str_fmt.format(*args, **kwargs) return re.compile(re_str, flags) + return partial @@ -256,7 +260,6 @@ KEYDEF_REP = regex_partial(r""" ) # capture group end """, re.MULTILINE | re.DOTALL | re.VERBOSE) - ENUM_RE = re.compile(r""" ( enum @@ -268,7 +271,6 @@ ENUM_RE = re.compile(r""" ) # capture group end """, re.MULTILINE | re.DOTALL | re.VERBOSE) - ENUM_KEY_REP = regex_partial(r""" ( {} # the prefixes @@ -309,14 +311,13 @@ def parse_valid_keys(config, out_path): include_path = os.path.join(dirpath, include) if os.path.exists(include_path): header_data = read_header_file(include_path) - valid_keycodes.update( - parse_keydefs(config, header_data) - ) + valid_keycodes.update(parse_keydefs(config, header_data)) return valid_keycodes # Keymap Parsing + def iter_raw_codes(layer_lines, filler, separator): filler_re = re.compile("[" + filler + " ]") for line in layer_lines: @@ -346,28 +347,21 @@ LAYER_CHANGE_RE = re.compile(r""" (DF|TG|MO)\(\d+\) """, re.VERBOSE) - MACRO_RE = re.compile(r""" M\(\w+\) """, re.VERBOSE) - UNICODE_RE = re.compile(r""" U[0-9A-F]{4} """, re.VERBOSE) - NON_CODE = re.compile(r""" ^[^A-Z0-9_]$ """, re.VERBOSE) def parse_uni_code(raw_code): - macro_id = "UC_" + ( - unicodedata.name(raw_code) - .replace(" ", "_") - .replace("-", "_") - ) + macro_id = "UC_" + (unicodedata.name(raw_code).replace(" ", "_").replace("-", "_")) code = "M({})".format(macro_id) uc_hex = "{:04X}".format(ord(raw_code)) return code, macro_id, uc_hex @@ -407,19 +401,13 @@ def parse_code(raw_code, key_prefixes, valid_keycodes): def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): keymap = {} - raw_codes = list(iter_raw_codes( - layer_lines, config['filler'], config['separator'] - )) + raw_codes = list(iter_raw_codes(layer_lines, config['filler'], config['separator'])) indexed_codes = iter_indexed_codes(raw_codes, key_indexes) key_prefixes = config['key_prefixes'] for raw_code, key_index, row_index in indexed_codes: - code, macro_id, uc_hex = parse_code( - raw_code, key_prefixes, valid_keycodes - ) + code, macro_id, uc_hex = parse_code(raw_code, key_prefixes, valid_keycodes) # TODO: line numbers for invalid codes - err_msg = "Could not parse key '{}' on row {}".format( - raw_code, row_index - ) + err_msg = "Could not parse key '{}' on row {}".format(raw_code, row_index) assert code is not None, err_msg # print(repr(raw_code), repr(code), macro_id, uc_hex) if macro_id: @@ -432,17 +420,14 @@ def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): def parse_keymaps(config, valid_keycodes): keymaps = collections.OrderedDict() - key_indexes = config.get( - 'key_indexes', KEYBOARD_LAYOUTS[config['layout']] - ) + key_indexes = config.get('key_indexes', KEYBOARD_LAYOUTS[config['layout']]) # TODO: maybe validate key_indexes for layer_name, layer_lines, in config['layer_lines'].items(): - keymaps[layer_name] = parse_keymap( - config, key_indexes, layer_lines, valid_keycodes - ) + keymaps[layer_name] = parse_keymap(config, key_indexes, layer_lines, valid_keycodes) return keymaps + # keymap.c output USERCODE = """ @@ -453,7 +438,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); @@ -572,7 +557,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {{ }}; """ - UNICODE_MACRO_TEMPLATE = """ case {macro_id}: unicode_action_function(0x{hi:02x}, 0x{lo:02x}); @@ -584,9 +568,7 @@ def unicode_macro_cases(config): for macro_id, uc_hex in config['unicode_macros'].items(): hi = int(uc_hex, 16) >> 8 lo = int(uc_hex, 16) & 0xFF - yield UNICODE_MACRO_TEMPLATE.format( - macro_id=macro_id, hi=hi, lo=lo - ) + yield UNICODE_MACRO_TEMPLATE.format(macro_id=macro_id, hi=hi, lo=lo) def iter_keymap_lines(keymap, row_indents=None): -- cgit v1.2.1 From 1cffe5b6ce764f4ff0d07e93669a425773ccc103 Mon Sep 17 00:00:00 2001 From: IFo Hancroft Date: Sat, 2 Jul 2022 17:06:23 +0300 Subject: My ErgoDox Keymap (finally perfected, I think) (#17208) Co-authored-by: Drashna Jaelre --- keyboards/ergodox_ez/keymaps/ifohancroft/config.h | 8 +- keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c | 172 ++++++++------------- keyboards/ergodox_ez/keymaps/ifohancroft/readme.md | 16 +- keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk | 3 +- 4 files changed, 77 insertions(+), 122 deletions(-) (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/config.h b/keyboards/ergodox_ez/keymaps/ifohancroft/config.h index 9a0d0e54f7..b279371a0b 100644 --- a/keyboards/ergodox_ez/keymaps/ifohancroft/config.h +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 IFo Hancroft +/* Copyright 2022 IFo Hancroft * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,5 +17,9 @@ #pragma once // place overrides here -#define USB_POLLING_INTERVAL_MS 1 #define FORCE_NKRO +#ifdef TAPPING_TOGGLE +# undef TAPPING_TOGGLE +#endif +#define TAPPING_TOGGLE 3 + diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c b/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c index 56c1ff28a7..58c3beaeaa 100644 --- a/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2021 IFo Hancroft +/* Copyright 2022 IFo Hancroft * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,19 +24,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - * | ESC | A | S | D | F | G | Del | | | H | J | K | L | ; | ' | + * | Esc | A | S | D | F | G | | | | H | J | K | L | ; | ' | * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| * | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| - * | Ctrl | Super | Alt | MO(4) | MO(3) | | MO(3) | Left | Down | Up | Right | + * | Ctrl | Super | Alt | | OSL(1) | | TT(1) | | Alt | Super | Ctrl | * *-------------------------------------------------* *-------------------------------------------------* * * *-------------------* *-------------------* - * | MO(2) | | | | | + * | | | | | | * *---------+---------+---------| |---------+---------+---------* * | | | | | | | | * | Bckspc | Enter |---------| |---------| Enter | Space | - * | | | Space | | | | | + * | | | SH_OS | | | | | * *---------+---------+---------* *---------+---------+---------* */ @@ -44,88 +44,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(3), MO(3), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, OSL(1), TT(1), KC_NO, KC_RALT, KC_RGUI, KC_RCTL, - MO(2), KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_BSPC, KC_ENT, KC_SPC, KC_NO, KC_ENT, KC_SPC - ), - - - - /* Gaming Layer - * *---------------------------------------------------------------------* *---------------------------------------------------------------------* - * | | | | | | | 6 | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | | | - * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | - * *-------------------------------------------------* *-------------------------------------------------* - * - * *-------------------* *-------------------* - * | | | | | | - * *---------+---------+---------| |---------+---------+---------* - * | | | | | | | | - * | Space | |---------| |---------| | | - * | | | | | | | | - * *---------+---------+---------* *---------+---------+---------* - */ - - LAYOUT_ergodox_pretty( - _______, _______, _______, _______, _______, _______, KC_6, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - - _______, _______, _______, _______, - _______, _______, - KC_SPC, _______, _______, _______, _______, _______ - ), - - - - /* Left Hand Layer - * *---------------------------------------------------------------------* *---------------------------------------------------------------------* - * | | 6 | 7 | 8 | 9 | 0 | = | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - * | \ | Y | U | I | O | P | ] | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - * | ' | H | J | K | L | ; | | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| - * | | N | M | , | . | / | | | | | | | | - * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | - * *-------------------------------------------------* *-------------------------------------------------* - * - * *-------------------* *-------------------* - * | | | | | | - * *---------+---------+---------| |---------+---------+---------* - * | | | | | | | | - * | | |---------| |---------| | | - * | | | | | | | | - * *---------+---------+---------* *---------+---------+---------* - */ - - LAYOUT_ergodox_pretty( - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, _______, _______, _______, _______, _______, _______, _______, - KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, - KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, _______, _______, _______, _______, _______, - _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - - _______, _______, _______, _______, - _______, _______, - _______, _______, _______, _______, _______, _______ + KC_BSPC, KC_ENT, SH_OS, KC_NO, KC_ENT, KC_SPC ), - - /* Function Keys Layer * *---------------------------------------------------------------------* *---------------------------------------------------------------------* * | NumLock | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | @@ -134,9 +60,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| * | | - | 4 | 5 | 6 | / | | | | Left | Down | Up | Right | | | * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| - * | | 0 | 1 | 2 | 3 | . | | | | | | | | + * | | 0 | 1 | 2 | 3 | . | | NK_TOGG | | | | | | * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | + * | | | | | | | | Left | Down | Up | Right | * *-------------------------------------------------* *-------------------------------------------------* * * *-------------------* *-------------------* @@ -152,40 +78,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NUM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PAST, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_PSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PDOT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PDOT, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, KC_PENT, KC_PGUP, KC_PGDN, _______, _______ ), + /* Empty Layer */ + LAYOUT_ergodox_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), - /* Layers Layer - * *---------------------------------------------------------------------* *---------------------------------------------------------------------* - * | | TO(0) | TO(1) | | | | | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | | | | | - * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | | | - * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| - * | | | | | | | | | | | | - * *-------------------------------------------------* *-------------------------------------------------* - * - * *-------------------* *-------------------* - * | | | | | | - * *---------+---------+---------| |---------+---------+---------* - * | | | | | | | | - * | | |---------| |---------| | | - * | | | | | | | | - * *---------+---------+---------* *---------+---------+---------* - */ - + /* Empty Layer */ LAYOUT_ergodox_pretty( - _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -195,5 +111,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ) +}; + /* Swap Hands + * *-------------------------------------------------* + * | Del | \ | ' | | | + * |---------+---------+---------+---------+---------+---------* + * | 6 | Y | H | N | | | + * |---------+---------+---------+---------+---------+---------| + * | 7 | U | J | M | | | + * |---------+---------+---------+---------+---------+---------| + * | 8 | I | K | , | | Space | + * |---------+---------+---------+---------+---------+---------| + * | 9 | O | L | . | | | + * |---------+---------+---------+---------+---------+---------| + * | 0 | P | ; | / | | | + * |---------+---------+---------+---------| |---------| + * | = | ] | | | | | + * *---------------------------------------* *---------* + */ + +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 13}, {1, 13}, {2, 13}, {3, 0}, {4, 0}}, + {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 1}, {5, 1}}, + {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 2}, {5, 2}}, + {{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 3}, {5, 10}}, + {{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 4}, {5, 9}}, + {{0, 12}, {1, 12}, {2, 12}, {3, 12}, {0, 0}, {5, 8}}, + {{0, 7}, {1, 7}, {0, 0}, {3, 7}, {0, 0}, {5, 7}}, + + {{0, 7}, {1, 7}, {0, 0}, {3, 7}, {0, 0}, {5, 7}}, + {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {0, 0}, {5, 8}}, + {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9}}, + {{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}, {5, 10}}, + {{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 11}, {5, 11}}, + {{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}, {5, 12}}, + {{0, 13}, {1, 13}, {2, 13}, {3, 13}, {4, 13}} }; + diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md b/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md index daa581062c..7a94a05eae 100644 --- a/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md @@ -1,20 +1,18 @@ -![IFo Hancroft ErgoDox EZ Layout Image](https://i.imgur.com/BlH0ZdE.png) +![IFo Hancroft ErgoDox EZ Layout Image](https://i.imgur.com/bSWyBCV.png) # IFo Hancroft's ErgoDox EZ Layout -- Layer 0: A Standard ANSI QWERTY Layer. It adds some additional keys from the right half in-order to avoid having to lift your right hand of the mouse. -- Layer 1: A Gaming Layer. It replaces the Backspace with a Space, and the Dash with a 6, so you can play CS:GO without needing to lift your right hand of the mouse. -- Layer 2: A Left Hand Layer. It is basically a left hand version of the right half, so you can have access to a full-sized keyboard without needing to lift your right hand from the the mouse. -- Layer 3: A Function Layer. It contains the F1-F12 keys, PgUp, PgDn, Numpad, and arrows on HJKL. -- Layer 4: A Layer Switching Layer. The keys in this layer turn on a specific layer while disabling the rest. Basically, you come here to switch between the QWERTY and Gaming layers. - +- Layer 0: A QWERTY Layer. +- Layer 1: A Function Layer. +- Layer 2: Empty Layer. +- Layer 3: Empty Layer. This keymap also does the following: -- Sets the polling rate of the keyboard to 1ms - Forces NKRO on - Enables: - - Command + - Via + - The Swap Hands feature - Disables: - Mouse Key - Extra Key diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk b/keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk index 775ecbd12b..3b18c2b9d2 100644 --- a/keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/rules.mk @@ -1,3 +1,4 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = no -COMMAND_ENABLE = yes +SWAP_HANDS_ENABLE = yes +VIA_ENABLE = yes -- cgit v1.2.1 From f27b617f36d55ac5469247016a1b79304f892366 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Sat, 6 Aug 2022 12:51:13 +0200 Subject: [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) --- keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c | 2 -- keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h | 1 - keyboards/ergodox_ez/keymaps/rgb_layer/config.h | 6 +----- keyboards/ergodox_ez/keymaps/rmw/config.h | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index ff9ae77bdd..93b82df8cf 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -20,8 +20,6 @@ // debounce settings // remove these after getting a new keyboard // #define DEBOUNCE 50 -// #define QMK_KEYS_PER_SCAN 4 - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h index c35963d842..acd3a44e16 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -25,7 +25,6 @@ #define LEADER_TIMEOUT 1000 #define PERMISSIVE_HOLD -#define QMK_KEYS_PER_SCAN 4 #define DANCING_TERM 175 #define ONESHOT_TAP_TOGGLE 5 diff --git a/keyboards/ergodox_ez/keymaps/rgb_layer/config.h b/keyboards/ergodox_ez/keymaps/rgb_layer/config.h index 1913a2d369..84c5adfc9e 100644 --- a/keyboards/ergodox_ez/keymaps/rgb_layer/config.h +++ b/keyboards/ergodox_ez/keymaps/rgb_layer/config.h @@ -2,13 +2,9 @@ #define KEYMAP_CONFIG_H - #define RGBLIGHT_SLEEP +#define RGBLIGHT_SLEEP -#ifndef QMK_KEYS_PER_SCAN -#define QMK_KEYS_PER_SCAN 4 -#endif // !QMK_KEYS_PER_SCAN - #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD diff --git a/keyboards/ergodox_ez/keymaps/rmw/config.h b/keyboards/ergodox_ez/keymaps/rmw/config.h index 1ecf8b8b79..1b7528a4a7 100644 --- a/keyboards/ergodox_ez/keymaps/rmw/config.h +++ b/keyboards/ergodox_ez/keymaps/rmw/config.h @@ -22,7 +22,6 @@ along with this program. If not, see . #define USB_MAX_POWER_CONSUMPTION 500 -#define QMK_KEYS_PER_SCAN 4 /* Set 0 if debouncing isn't needed */ #undef DEBOUNCE #define DEBOUNCE 5 -- cgit v1.2.1 From 51d5aad25b92a34bc051849616fcd93e3ae407fc Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 15 Aug 2022 13:30:12 +1000 Subject: Move keyboard USB IDs and strings to data driven, pass 2: D-E (#17956) --- keyboards/ergodox_ez/base/info.json | 6 ++++++ keyboards/ergodox_ez/base/rules.mk | 0 keyboards/ergodox_ez/config.h | 7 ------- keyboards/ergodox_ez/glow/config.h | 26 -------------------------- keyboards/ergodox_ez/glow/info.json | 6 ++++++ keyboards/ergodox_ez/info.json | 6 +++++- keyboards/ergodox_ez/rules.mk | 2 ++ keyboards/ergodox_ez/shine/config.h | 26 -------------------------- keyboards/ergodox_ez/shine/info.json | 6 ++++++ 9 files changed, 25 insertions(+), 60 deletions(-) create mode 100644 keyboards/ergodox_ez/base/info.json create mode 100644 keyboards/ergodox_ez/base/rules.mk delete mode 100644 keyboards/ergodox_ez/glow/config.h create mode 100644 keyboards/ergodox_ez/glow/info.json delete mode 100644 keyboards/ergodox_ez/shine/config.h create mode 100644 keyboards/ergodox_ez/shine/info.json (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/base/info.json b/keyboards/ergodox_ez/base/info.json new file mode 100644 index 0000000000..be1433ccba --- /dev/null +++ b/keyboards/ergodox_ez/base/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "ErgoDox EZ", + "usb": { + "pid": "0x4974" + } +} diff --git a/keyboards/ergodox_ez/base/rules.mk b/keyboards/ergodox_ez/base/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index f25ff162cd..8a3f4eb7dc 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -22,13 +22,6 @@ along with this program. If not, see . #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x3297 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ZSA Technology Labs -#define PRODUCT_ID 0x4974 -#define PRODUCT ErgoDox EZ - /* key matrix size */ #define MATRIX_ROWS 14 #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) diff --git a/keyboards/ergodox_ez/glow/config.h b/keyboards/ergodox_ez/glow/config.h deleted file mode 100644 index 674b7bffb0..0000000000 --- a/keyboards/ergodox_ez/glow/config.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2013 Oleg Kostyuk -Copyright 2015 ZSA Technology Labs Inc (@zsa) -Copyright 2020 Christopher Courtney (@drashna) - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#undef PRODUCT_ID -#define PRODUCT_ID 0x4976 -#undef PRODUCT -#define PRODUCT ErgoDox EZ Glow diff --git a/keyboards/ergodox_ez/glow/info.json b/keyboards/ergodox_ez/glow/info.json new file mode 100644 index 0000000000..dcbb1999ca --- /dev/null +++ b/keyboards/ergodox_ez/glow/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "ErgoDox EZ Glow", + "usb": { + "pid": "0x4976" + } +} diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index 1682f4bb45..46a0fbbacd 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -1,7 +1,11 @@ { - "keyboard_name": "ErgoDox EZ", + "manufacturer": "ZSA Technology Labs", "url": "ergodox-ez.com", "maintainer": "ZSA via Drashna", + "usb": { + "vid": "0x3297", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_ergodox": { "layout": [ diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index 1b4ace5ee5..021ea0f130 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -38,3 +38,5 @@ AUDIO_SUPPORTED = no BACKLIGHT_SUPPORTED = no MOUSE_SHARED_EP = no + +DEFAULT_FOLDER = ergodox_ez/base diff --git a/keyboards/ergodox_ez/shine/config.h b/keyboards/ergodox_ez/shine/config.h deleted file mode 100644 index cf4f59f3b8..0000000000 --- a/keyboards/ergodox_ez/shine/config.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2013 Oleg Kostyuk -Copyright 2015 ZSA Technology Labs Inc (@zsa) -Copyright 2020 Christopher Courtney (@drashna) - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#undef PRODUCT_ID -#define PRODUCT_ID 0x4975 -#undef PRODUCT -#define PRODUCT ErgoDox EZ Shine diff --git a/keyboards/ergodox_ez/shine/info.json b/keyboards/ergodox_ez/shine/info.json new file mode 100644 index 0000000000..11c3a8b209 --- /dev/null +++ b/keyboards/ergodox_ez/shine/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "ErgoDox EZ Shine", + "usb": { + "pid": "0x4975" + } +} -- cgit v1.2.1 From 5a1a0e71de55ef5bb080553e2423c48ddfd43a46 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 17 Aug 2022 11:37:29 +0900 Subject: [Keymap] toshi0383 keymaps update (#18073) --- keyboards/ergodox_ez/keymaps/toshi0383/keymap.c | 98 ------------------------- 1 file changed, 98 deletions(-) delete mode 100644 keyboards/ergodox_ez/keymaps/toshi0383/keymap.c (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c b/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c deleted file mode 100644 index 77242596d2..0000000000 --- a/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c +++ /dev/null @@ -1,98 +0,0 @@ -#include QMK_KEYBOARD_H - -enum layer_names { - _BASE, - _LOWER, - _RAISE, - _ADJUST -}; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define ADJUST MO(_ADJUST) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_ergodox( - // left hand - _______, _______, _______, _______, _______, _______, _______, - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, LGUI(KC_LCTL), - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, LGUI(KC_LALT), - _______, _______, _______, _______, LOWER, - KC_LGUI, _______, - _______, - KC_ENT, RGUI(KC_RCTL), _______, - // right hand - _______, _______, _______, _______, _______, _______, _______, - RGUI(KC_RCTL), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_H, KC_J, KC_K, KC_L, KC_RSFT, KC_RGUI, - RGUI(KC_RALT), KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), - RAISE, _______, _______, _______, _______, - _______, KC_RGUI, - _______, - _______, KC_BSPC, KC_ENT - ), - - [_LOWER] = LAYOUT_ergodox( - // left hand - _______, _______, _______, _______, _______, _______, _______, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, - _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, - KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - KC_NO, KC_NO, _______, - // right hand - _______, _______, _______, _______, _______, _______, _______, - KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, - KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, - KC_NO, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, - KC_RGUI, _______, _______, _______, _______, - _______, KC_NO, - _______, - _______, KC_NO, KC_NO - ), - - [_RAISE] = LAYOUT_ergodox( - // left hand - _______, _______, _______, _______, _______, _______, _______, - KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, _______, - KC_NO, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, KC_LGUI, - _______, _______, - _______, - KC_NO, KC_NO, _______, - // right hand - _______, _______, _______, _______, _______, _______, KC_NO, - KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_NO, - _______, ADJUST, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, KC_NO, - _______, - _______, KC_NO, KC_NO - ), - - [_ADJUST] = LAYOUT_ergodox( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, RESET, _______, - _______, _______, _______, _______, KC_LGUI, - _______, _______, - _______, - KC_NO, KC_NO, _______, - // right hand - _______, _______, _______, _______, _______, _______, _______, - KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, _______, _______, KC_LANG1, KC_LANG2, - _______, _______, _______, _______, _______, - _______, KC_NO, - _______, - _______, KC_NO, KC_NO - ) -}; -- cgit v1.2.1 From bbc3bc55f2d52b90881470695ee132f5a57bfaa3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 21 Aug 2022 23:55:30 +0100 Subject: RESET -> QK_BOOT user keymaps (#17940) --- keyboards/ergodox_ez/keymaps/danielo515/keymap.c | 2 +- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 2 +- .../keymaps/hacker_dvorak/hacker_dvorak.c | 2 +- keyboards/ergodox_ez/keymaps/nfriend/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/rishka/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/smurmann/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/stamm/keymap.c | 2 +- keyboards/ergodox_ez/keymaps/steno/keymap.c | 4 +- keyboards/ergodox_ez/keymaps/toshi0383/keymap.c | 98 ++++++++++++++++++++++ 10 files changed, 108 insertions(+), 10 deletions(-) create mode 100644 keyboards/ergodox_ez/keymaps/toshi0383/keymap.c (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/keymaps/danielo515/keymap.c b/keyboards/ergodox_ez/keymaps/danielo515/keymap.c index ee8c321352..68ddeedc22 100644 --- a/keyboards/ergodox_ez/keymaps/danielo515/keymap.c +++ b/keyboards/ergodox_ez/keymaps/danielo515/keymap.c @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_AMPR ,KC_LPRN ,KC_RPRN ,CLN_EQ ,KC_KP_PLUS ,KC_PIPE , LALT(LSFT(KC_DOWN)),KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH ,KC_BSLASH , KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , - RESET ,KC_TRANSPARENT , + QK_BOOT ,KC_TRANSPARENT , KC_TRANSPARENT , KC_TRANSPARENT ,KC_TRANSPARENT ,KC_SPACE ), diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index 93b82df8cf..48b2dec636 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -267,7 +267,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, // bottom row - RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + QK_BOOT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster KC_TRNS,KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c index 71cf1053aa..7b2076e05b 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c @@ -336,7 +336,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left thumb XXXXXXX, XXXXXXX, XXXXXXX, - RESET, XXXXXXX, XXXXXXX, + QK_BOOT, XXXXXXX, XXXXXXX, // right hand XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c index ba578dd1c5..39f2d5fe5b 100644 --- a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c @@ -918,7 +918,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*=========================================================================================================*/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ - /**/ _______, /**/ KC_F14, /**/ KC_F15, /**/ _______, /**/ _______, /**/ _______, /**/ RESET, /**/ + /**/ _______, /**/ KC_F14, /**/ KC_F15, /**/ _______, /**/ _______, /**/ _______, /**/ QK_BOOT, /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /*=========================================================================================================*/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ diff --git a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c index 595f3b4ee1..a41a21072c 100644 --- a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c +++ b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = LAYOUT_ergodox( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - RESET, KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + QK_BOOT, KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, EPRM,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, diff --git a/keyboards/ergodox_ez/keymaps/rishka/keymap.c b/keyboards/ergodox_ez/keymaps/rishka/keymap.c index 0d6ac9fe95..c39c0c476b 100644 --- a/keyboards/ergodox_ez/keymaps/rishka/keymap.c +++ b/keyboards/ergodox_ez/keymaps/rishka/keymap.c @@ -101,7 +101,7 @@ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RESET, _______, _______, + QK_BOOT, _______, _______, // right hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c index c8ddc23a8b..13ae246e85 100644 --- a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c +++ b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MDIA] = LAYOUT_ergodox( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - RESET,_______,KC_BTN1,KC_MS_U,KC_BTN2,_______,_______, + QK_BOOT,_______,KC_BTN1,KC_MS_U,KC_BTN2,_______,_______, _______,_______,KC_MS_L,KC_MS_D,KC_MS_R,_______, _______,_______,KC_ACL0,KC_ACL1,KC_ACL2,_______,_______, _______,_______,_______,_______,_______, diff --git a/keyboards/ergodox_ez/keymaps/stamm/keymap.c b/keyboards/ergodox_ez/keymaps/stamm/keymap.c index 19eecae03d..c03c6525af 100644 --- a/keyboards/ergodox_ez/keymaps/stamm/keymap.c +++ b/keyboards/ergodox_ez/keymaps/stamm/keymap.c @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RESET, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/ergodox_ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c index 96218bbe99..0e5d7e3a22 100644 --- a/keyboards/ergodox_ez/keymaps/steno/keymap.c +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 2: Media and mouse keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | RESET | | | | | | | | | | | | | | | + * | QK_BOOT | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [MDIA] = LAYOUT_ergodox( - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c b/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c new file mode 100644 index 0000000000..c419f8893f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c @@ -0,0 +1,98 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, LGUI(KC_LCTL), + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, LGUI(KC_LALT), + _______, _______, _______, _______, LOWER, + KC_LGUI, _______, + _______, + KC_ENT, RGUI(KC_RCTL), _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + RGUI(KC_RCTL), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_H, KC_J, KC_K, KC_L, KC_RSFT, KC_RGUI, + RGUI(KC_RALT), KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), + RAISE, _______, _______, _______, _______, + _______, KC_RGUI, + _______, + _______, KC_BSPC, KC_ENT + ), + + [_LOWER] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, + KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, + KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, + KC_NO, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, + KC_RGUI, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ), + + [_RAISE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, _______, + KC_NO, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_LGUI, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, KC_NO, + KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_NO, + _______, ADJUST, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ), + + [_ADJUST] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, QK_BOOT, _______, + _______, _______, _______, _______, KC_LGUI, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, KC_LANG1, KC_LANG2, + _______, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ) +}; -- cgit v1.2.1