diff options
Diffstat (limited to 'layouts/community/ergodox/drashna/keymap.c')
-rw-r--r-- | layouts/community/ergodox/drashna/keymap.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 6ed4558e27..8308bfdaa1 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -1,20 +1,3 @@ -/* -This is the keymap for the keyboard -Copyright 2012 Jun Wako <wakojun@gmail.com> -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger -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 <http://www.gnu.org/licenses/>. -*/ -#include QMK_KEYBOARD_H #include "drashna.h" #ifdef UNICODEMAP_ENABLE @@ -32,6 +15,13 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; // define layer change stuff for underglow indicator bool skip_leds = false; +/* + * The `LAYOUT_ergodox_pretty_base` macro is a template to allow the use of + * identical modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, + * etc), so that there is no need to set them up for each layout, and modify + * all of them if I want to change them. This helps to keep consistency and + * ease of use. K## is a placeholder to pass through the individual keycodes + */ // clang-format off #define LAYOUT_ergodox_pretty_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ @@ -40,8 +30,8 @@ bool skip_leds = false; ) \ LAYOUT_ergodox_pretty_wrapper( \ KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ - KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ - KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ @@ -402,7 +392,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_config.enable # endif ) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q @@ -432,7 +422,7 @@ void rgb_matrix_indicators_user(void) { break; default: { bool mods_enabled = IS_LAYER_ON(_MODS); - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY: rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); break; @@ -466,7 +456,6 @@ void rgb_matrix_indicators_user(void) { #endif // RGB_MATRIX_INIT - uint16_t get_tapping_term(uint16_t keycode) { if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { |