diff options
| -rw-r--r-- | keyboards/iris/keymaps/drashna/keymap.c | 22 | ||||
| -rw-r--r-- | keyboards/iris/keymaps/drashna/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/orthodox/keymaps/drashna/config.h | 2 | ||||
| -rw-r--r-- | keyboards/orthodox/keymaps/drashna/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/viterbi/keymaps/drashna/config.h | 8 | ||||
| -rw-r--r-- | keyboards/viterbi/keymaps/drashna/keymap.c | 2 | ||||
| -rw-r--r-- | layouts/community/ergodox/drashna/config.h | 3 | ||||
| -rw-r--r-- | layouts/community/ergodox/drashna/keymap.c | 16 | ||||
| -rw-r--r-- | layouts/community/ergodox/drashna/rules.mk | 6 | ||||
| -rw-r--r-- | layouts/community/ortho_4x12/drashna/config.h | 9 | ||||
| -rw-r--r-- | layouts/community/ortho_4x12/drashna/keymap.c | 195 | ||||
| -rw-r--r-- | layouts/community/ortho_4x12/drashna/rules.mk | 14 | ||||
| -rw-r--r-- | users/drashna/config.h | 16 | ||||
| -rw-r--r-- | users/drashna/drashna.c | 75 | ||||
| -rw-r--r-- | users/drashna/drashna.h | 22 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.c | 6 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.h | 1 | ||||
| -rw-r--r-- | users/drashna/template.c | 97 | ||||
| -rw-r--r-- | users/drashna/template.h | 4 |
19 files changed, 280 insertions, 222 deletions
diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c index 70d13cac2..37c3f97f5 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/iris/keymaps/drashna/keymap.c | |||
| @@ -2,36 +2,34 @@ | |||
| 2 | #include QMK_KEYBOARD_H | 2 | #include QMK_KEYBOARD_H |
| 3 | #include "drashna.h" | 3 | #include "drashna.h" |
| 4 | 4 | ||
| 5 | #define KC_ALAP ALT_T(KC_APP) | ||
| 6 | #define KC_OSLG OSM(MOD_LGUI) | ||
| 7 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 5 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 8 | 6 | ||
| 9 | [_QWERTY] = LAYOUT_wrapper( | 7 | [_QWERTY] = LAYOUT_wrapper( |
| 10 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, | 8 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, |
| 11 | KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, | 9 | KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, |
| 12 | KC_CCCV, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, | 10 | KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, |
| 13 | KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_OSLG, _________________QWERTY_R3_________________, KC_MRSF, | 11 | KC_MLSF, _________________QWERTY_L3_________________, ALT_APP, OS_RGUI, _________________QWERTY_R3_________________, KC_MRSF, |
| 14 | LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE | 12 | LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE |
| 15 | ), | 13 | ), |
| 16 | [_COLEMAK] = LAYOUT_wrapper( | 14 | [_COLEMAK] = LAYOUT_wrapper( |
| 17 | KC_ESC , ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, | 15 | KC_ESC , ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, |
| 18 | KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS, | 16 | KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS, |
| 19 | KC_CCCV, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, | 17 | KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, |
| 20 | KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_OSLG, _________________COLEMAK_R3________________, KC_MRSF, | 18 | KC_MLSF, _________________COLEMAK_L3________________, ALT_APP, OS_RGUI, _________________COLEMAK_R3________________, KC_MRSF, |
| 21 | LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE | 19 | LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE |
| 22 | ), | 20 | ), |
| 23 | [_DVORAK] = LAYOUT_wrapper( | 21 | [_DVORAK] = LAYOUT_wrapper( |
| 24 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, | 22 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, |
| 25 | KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS, | 23 | KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS, |
| 26 | KC_CCCV, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT, | 24 | KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT, |
| 27 | KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_OSLG, _________________DVORAK_R3_________________, KC_MRSF, | 25 | KC_MLSF, _________________DVORAK_L3_________________, ALT_APP, OS_RGUI, _________________DVORAK_R3_________________, KC_MRSF, |
| 28 | LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE | 26 | LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE |
| 29 | ), | 27 | ), |
| 30 | [_WORKMAN] = LAYOUT_wrapper( | 28 | [_WORKMAN] = LAYOUT_wrapper( |
| 31 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, | 29 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, |
| 32 | KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS, | 30 | KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS, |
| 33 | KC_CCCV, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, | 31 | KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, |
| 34 | KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_OSLG, _________________WORKMAN_R3________________, KC_MRSF, | 32 | KC_MLSF, _________________WORKMAN_L3________________, ALT_APP, OS_RGUI, _________________WORKMAN_R3________________, KC_MRSF, |
| 35 | LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE | 33 | LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE |
| 36 | ), | 34 | ), |
| 37 | 35 | ||
| @@ -53,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 53 | 51 | ||
| 54 | 52 | ||
| 55 | [_LOWER] = LAYOUT_wrapper( | 53 | [_LOWER] = LAYOUT_wrapper( |
| 56 | _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, | 54 | KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, |
| 57 | KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______, | 55 | KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______, |
| 58 | _______, ___________________BLANK___________________, _________________LOWER_R2__________________, KC_PIPE, | 56 | _______, ___________________BLANK___________________, _________________LOWER_R2__________________, KC_PIPE, |
| 59 | _______, ___________________BLANK___________________, _______, _______, _________________LOWER_R3__________________, _______, | 57 | _______, ___________________BLANK___________________, _______, _______, _________________LOWER_R3__________________, _______, |
| @@ -61,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 61 | ), | 59 | ), |
| 62 | 60 | ||
| 63 | [_RAISE] = LAYOUT_wrapper( | 61 | [_RAISE] = LAYOUT_wrapper( |
| 64 | _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, | 62 | KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, |
| 65 | KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, | 63 | KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, |
| 66 | _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, | 64 | _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, |
| 67 | _______, _________________RAISE_L3__________________, _______, _______, _________________RAISE_R3__________________, _______, | 65 | _______, _________________RAISE_L3__________________, _______, _______, _________________RAISE_R3__________________, _______, |
diff --git a/keyboards/iris/keymaps/drashna/rules.mk b/keyboards/iris/keymaps/drashna/rules.mk index ccc33c06f..e8035176e 100644 --- a/keyboards/iris/keymaps/drashna/rules.mk +++ b/keyboards/iris/keymaps/drashna/rules.mk | |||
| @@ -12,6 +12,6 @@ SWAP_HANDS_ENABLE = no | |||
| 12 | 12 | ||
| 13 | INDICATOR_LIGHTS = yes | 13 | INDICATOR_LIGHTS = yes |
| 14 | MACROS_ENABLED = no | 14 | MACROS_ENABLED = no |
| 15 | RGBLIGHT_TWINKLE = yes | 15 | RGBLIGHT_TWINKLE = no |
| 16 | 16 | ||
| 17 | BOOTLOADER = qmk-dfu | 17 | BOOTLOADER = qmk-dfu |
diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index d8ff95fcb..2257b62fd 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h | |||
| @@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 58 | #define C6_AUDIO | 58 | #define C6_AUDIO |
| 59 | #ifdef RGBLIGHT_ENABLE | 59 | #ifdef RGBLIGHT_ENABLE |
| 60 | #define NO_MUSIC_MODE | 60 | #define NO_MUSIC_MODE |
| 61 | #endif //RGBLIGHT_ENABLE | 61 | #endif |
| 62 | #endif //AUDIO_ENABLE | 62 | #endif //AUDIO_ENABLE |
| 63 | 63 | ||
| 64 | #undef PRODUCT | 64 | #undef PRODUCT |
diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk index f870c3a7d..a826c664a 100644 --- a/keyboards/orthodox/keymaps/drashna/rules.mk +++ b/keyboards/orthodox/keymaps/drashna/rules.mk | |||
| @@ -10,6 +10,6 @@ NKRO_ENABLE = yes | |||
| 10 | 10 | ||
| 11 | INDICATOR_LIGHTS = yes | 11 | INDICATOR_LIGHTS = yes |
| 12 | MACROS_ENABLED = no | 12 | MACROS_ENABLED = no |
| 13 | RGBLIGHT_TWINKLE = yes | 13 | RGBLIGHT_TWINKLE = no |
| 14 | 14 | ||
| 15 | BOOTLOADER = qmk-dfu | 15 | BOOTLOADER = qmk-dfu |
diff --git a/keyboards/viterbi/keymaps/drashna/config.h b/keyboards/viterbi/keymaps/drashna/config.h index 5bc5598ee..687f80441 100644 --- a/keyboards/viterbi/keymaps/drashna/config.h +++ b/keyboards/viterbi/keymaps/drashna/config.h | |||
| @@ -35,12 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 35 | #undef LOCKING_SUPPORT_ENABLE | 35 | #undef LOCKING_SUPPORT_ENABLE |
| 36 | #undef LOCKING_RESYNC_ENABLE | 36 | #undef LOCKING_RESYNC_ENABLE |
| 37 | 37 | ||
| 38 | #ifndef NO_DEBUG | ||
| 39 | #define NO_DEBUG | ||
| 40 | #endif // !NO_DEBUG | ||
| 41 | #ifndef NO_PRINT | ||
| 42 | #define NO_PRINT | ||
| 43 | #endif // !NO_PRINT | ||
| 44 | 38 | ||
| 45 | /* disable action features */ | 39 | /* disable action features */ |
| 46 | //#define NO_ACTION_LAYER | 40 | //#define NO_ACTION_LAYER |
| @@ -59,6 +53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 59 | #define NO_MUSIC_MODE | 53 | #define NO_MUSIC_MODE |
| 60 | #endif | 54 | #endif |
| 61 | 55 | ||
| 56 | #undef PREVENT_STUCK_MODIFIERS | ||
| 57 | |||
| 62 | #define LAYOUT_ortho_5x7( \ | 58 | #define LAYOUT_ortho_5x7( \ |
| 63 | L00, L01, L02, L03, L04, L05, L06, \ | 59 | L00, L01, L02, L03, L04, L05, L06, \ |
| 64 | L10, L11, L12, L13, L14, L15, L16, \ | 60 | L10, L11, L12, L13, L14, L15, L16, \ |
diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c index 68ca593db..acda8a0d2 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/viterbi/keymaps/drashna/keymap.c | |||
| @@ -13,7 +13,7 @@ extern keymap_config_t keymap_config; | |||
| 13 | #define _______ KC_TRNS | 13 | #define _______ KC_TRNS |
| 14 | #define XXXXXXX KC_NO | 14 | #define XXXXXXX KC_NO |
| 15 | 15 | ||
| 16 | #define LMACRO TG(_MACROS) | 16 | #define LMACRO OSL(_MACROS) |
| 17 | #define DIABLO TG(_DIABLO) | 17 | #define DIABLO TG(_DIABLO) |
| 18 | #define GAMEPAD TG(_GAMEPAD) | 18 | #define GAMEPAD TG(_GAMEPAD) |
| 19 | #define MEDIA TT(_MEDIA) | 19 | #define MEDIA TT(_MEDIA) |
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 9e2bd74f3..3ced18593 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h | |||
| @@ -13,3 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | #undef PRODUCT | 14 | #undef PRODUCT |
| 15 | #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine | 15 | #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine |
| 16 | |||
| 17 | #undef DEBOUNCE | ||
| 18 | #define DEBOUNCE 5 | ||
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 27d20d928..4d7700f19 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c | |||
| @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 61 | KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS, | 61 | KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS, |
| 62 | KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, | 62 | KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, |
| 63 | KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF, | 63 | KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF, |
| 64 | KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV, | 64 | KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_NO, |
| 65 | __________________ERGODOX_THUMB_CLUSTER_____________________ | 65 | __________________ERGODOX_THUMB_CLUSTER_____________________ |
| 66 | ), | 66 | ), |
| 67 | /* Keymap 0: COLEMAK layer | 67 | /* Keymap 0: COLEMAK layer |
| @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 93 | KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS, | 93 | KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS, |
| 94 | KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, | 94 | KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, |
| 95 | KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF, | 95 | KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF, |
| 96 | KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV, | 96 | KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_NO, |
| 97 | __________________ERGODOX_THUMB_CLUSTER_____________________ | 97 | __________________ERGODOX_THUMB_CLUSTER_____________________ |
| 98 | ), | 98 | ), |
| 99 | /* Keymap 0: DVORAK Layout | 99 | /* Keymap 0: DVORAK Layout |
| @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 125 | KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH, | 125 | KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH, |
| 126 | KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_MINS, | 126 | KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_MINS, |
| 127 | KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF, | 127 | KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF, |
| 128 | KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV, | 128 | KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_NO, |
| 129 | __________________ERGODOX_THUMB_CLUSTER_____________________ | 129 | __________________ERGODOX_THUMB_CLUSTER_____________________ |
| 130 | ), | 130 | ), |
| 131 | /* Keymap 0: WORKMAN layer | 131 | /* Keymap 0: WORKMAN layer |
| @@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 157 | KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS, | 157 | KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS, |
| 158 | KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, | 158 | KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, |
| 159 | KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF, | 159 | KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF, |
| 160 | KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV, | 160 | KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_NO, |
| 161 | __________________ERGODOX_THUMB_CLUSTER_____________________ | 161 | __________________ERGODOX_THUMB_CLUSTER_____________________ |
| 162 | ), | 162 | ), |
| 163 | 163 | ||
| @@ -294,7 +294,7 @@ void matrix_init_keymap(void) { // Runs boot tasks for keyboard | |||
| 294 | 294 | ||
| 295 | 295 | ||
| 296 | void matrix_scan_keymap(void) { // runs frequently to update info | 296 | void matrix_scan_keymap(void) { // runs frequently to update info |
| 297 | uint8_t modifiders = get_mods(); | 297 | uint8_t modifiers = get_mods(); |
| 298 | uint8_t led_usb_state = host_keyboard_leds(); | 298 | uint8_t led_usb_state = host_keyboard_leds(); |
| 299 | uint8_t one_shot = get_oneshot_mods(); | 299 | uint8_t one_shot = get_oneshot_mods(); |
| 300 | 300 | ||
| @@ -307,15 +307,15 @@ void matrix_scan_keymap(void) { // runs frequently to update info | |||
| 307 | // Since we're not using the LEDs here for layer indication anymore, | 307 | // Since we're not using the LEDs here for layer indication anymore, |
| 308 | // then lets use them for modifier indicators. Shame we don't have 4... | 308 | // then lets use them for modifier indicators. Shame we don't have 4... |
| 309 | // Also, no "else", since we want to know each, independently. | 309 | // Also, no "else", since we want to know each, independently. |
| 310 | if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MODS_SHIFT_MASK) { | 310 | if (modifiers & MODS_SHIFT_MASK || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MODS_SHIFT_MASK) { |
| 311 | ergodox_right_led_2_on(); | 311 | ergodox_right_led_2_on(); |
| 312 | ergodox_right_led_2_set( 50 ); | 312 | ergodox_right_led_2_set( 50 ); |
| 313 | } | 313 | } |
| 314 | if (modifiders & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) { | 314 | if (modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) { |
| 315 | ergodox_right_led_1_on(); | 315 | ergodox_right_led_1_on(); |
| 316 | ergodox_right_led_1_set( 10 ); | 316 | ergodox_right_led_1_set( 10 ); |
| 317 | } | 317 | } |
| 318 | if (modifiders & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) { | 318 | if (modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) { |
| 319 | ergodox_right_led_3_on(); | 319 | ergodox_right_led_3_on(); |
| 320 | ergodox_right_led_3_set( 10 ); | 320 | ergodox_right_led_3_set( 10 ); |
| 321 | } | 321 | } |
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index f5d63c56f..30d513c91 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | TAP_DANCE_ENABLE = yes | 1 | TAP_DANCE_ENABLE = yes |
| 2 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 2 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 3 | COMMAND_ENABLE = yes # Commands for debug and configuration | 3 | COMMAND_ENABLE = yes # Commands for debug and configuration |
| 4 | ifeq ("$(KEYBOARD)","ergodox_ez") | 4 | ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) |
| 5 | RGBLIGHT_ENABLE = yes | 5 | RGBLIGHT_ENABLE = yes |
| 6 | RGB_MATRIX_ENABLE = no | 6 | RGB_MATRIX_ENABLE = no |
| 7 | endif | 7 | endif |
| @@ -12,7 +12,5 @@ UNICODE_ENABLE = no | |||
| 12 | UNICDOEMAP_ENABLE = yes | 12 | UNICDOEMAP_ENABLE = yes |
| 13 | 13 | ||
| 14 | MACROS_ENABLED = no | 14 | MACROS_ENABLED = no |
| 15 | RGBLIGHT_TWINKLE = no | ||
| 15 | INDICATOR_LIGHTS = no | 16 | INDICATOR_LIGHTS = no |
| 16 | ifdef RGBLIGHT_ENABLE | ||
| 17 | RGBLIGHT_TWINKLE = yes | ||
| 18 | endif | ||
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 0bb6a4f50..cbd5bb460 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h | |||
| @@ -14,6 +14,15 @@ | |||
| 14 | #define RGBLIGHT_EFFECT_BREATHE_CENTER 1 | 14 | #define RGBLIGHT_EFFECT_BREATHE_CENTER 1 |
| 15 | #endif // RGBLIGHT_ENABLE | 15 | #endif // RGBLIGHT_ENABLE |
| 16 | 16 | ||
| 17 | #ifdef RGB_MATRIX_ENABLE | ||
| 18 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) | ||
| 19 | // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) | ||
| 20 | // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | ||
| 21 | #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended | ||
| 22 | // #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 | ||
| 23 | // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 | ||
| 24 | // #define EECONFIG_RGB_MATRIX (uint32_t *)16 | ||
| 25 | #endif | ||
| 17 | 26 | ||
| 18 | #if defined(KEYBOARD_lets_split_rev2) | 27 | #if defined(KEYBOARD_lets_split_rev2) |
| 19 | #define USE_SERIAL | 28 | #define USE_SERIAL |
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index a5443939c..39f901b14 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c | |||
| @@ -17,86 +17,51 @@ | |||
| 17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 18 | #include "drashna.h" | 18 | #include "drashna.h" |
| 19 | 19 | ||
| 20 | 20 | #ifdef BACKLIGHT_ENABLE | |
| 21 | enum planck_keycodes { | 21 | enum planck_keycodes { |
| 22 | BACKLIT = NEW_SAFE_RANGE, | 22 | BACKLIT = NEW_SAFE_RANGE, |
| 23 | }; | 23 | }; |
| 24 | #else | ||
| 25 | #define BACKLIT OSM(MOD_LSFT) | ||
| 26 | #endif | ||
| 24 | 27 | ||
| 25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 26 | 29 | ||
| 27 | /* Qwerty | ||
| 28 | * ,-----------------------------------------------------------------------------------. | ||
| 29 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 30 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 31 | * | Esc | A | S | D | F | G | H | J | K | L | ; | " | | ||
| 32 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 33 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | ||
| 34 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 35 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 36 | * `-----------------------------------------------------------------------------------' | ||
| 37 | */ | ||
| 38 | [_QWERTY] = LAYOUT_ortho_4x12_wrapper( | 30 | [_QWERTY] = LAYOUT_ortho_4x12_wrapper( |
| 39 | KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, | 31 | KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, |
| 40 | KC_ESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, | 32 | KC_TAB, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, |
| 41 | KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, | 33 | KC_MLSF, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, |
| 42 | BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 34 | BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
| 43 | ), | 35 | ), |
| 44 | 36 | ||
| 45 | /* Colemak | ||
| 46 | * ,-----------------------------------------------------------------------------------. | ||
| 47 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | ||
| 48 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 49 | * | Esc | A | R | S | T | D | H | N | E | I | O | " | | ||
| 50 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 51 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | | ||
| 52 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 53 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 54 | * `-----------------------------------------------------------------------------------' | ||
| 55 | */ | ||
| 56 | [_COLEMAK] = LAYOUT_ortho_4x12_wrapper( | 37 | [_COLEMAK] = LAYOUT_ortho_4x12_wrapper( |
| 57 | KC_TAB, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, | 38 | KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, |
| 58 | KC_ESC, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, | 39 | KC_TAB, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, |
| 59 | KC_LSFT, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_ENT, | 40 | KC_MLSF, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_ENT, |
| 60 | BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 41 | BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
| 61 | ), | 42 | ), |
| 62 | 43 | ||
| 63 | /* Dvorak | ||
| 64 | * ,-----------------------------------------------------------------------------------. | ||
| 65 | * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | | ||
| 66 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 67 | * | Esc | A | O | E | U | I | D | H | T | N | S | / | | ||
| 68 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 69 | * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | | ||
| 70 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 71 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 72 | * `-----------------------------------------------------------------------------------' | ||
| 73 | */ | ||
| 74 | [_DVORAK] = LAYOUT_ortho_4x12_wrapper( | 44 | [_DVORAK] = LAYOUT_ortho_4x12_wrapper( |
| 75 | KC_TAB, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, | 45 | KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, |
| 76 | KC_ESC, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_SLSH, | 46 | KC_TAB, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_SLSH, |
| 77 | KC_LSFT, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________, KC_ENT, | 47 | KC_MLSF, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________, KC_ENT, |
| 78 | BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 48 | BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
| 79 | ), | 49 | ), |
| 80 | 50 | ||
| 81 | |||
| 82 | [_WORKMAN] = LAYOUT_ortho_4x12_wrapper( | 51 | [_WORKMAN] = LAYOUT_ortho_4x12_wrapper( |
| 83 | KC_TAB, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, | 52 | KC_TAB, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, |
| 84 | KC_ESC, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, | 53 | KC_ESC, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, |
| 85 | KC_LSFT, _________________WORKMAN_L3________________, _________________WORKMAN_R3________________, KC_ENT, | 54 | KC_MLSF, _________________WORKMAN_L3________________, _________________WORKMAN_R3________________, KC_ENT, |
| 86 | BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 55 | BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
| 56 | ), | ||
| 57 | |||
| 58 | [_MODS] = LAYOUT_ortho_4x12_wrapper( | ||
| 59 | _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 60 | _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 61 | KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 62 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 87 | ), | 63 | ), |
| 88 | 64 | ||
| 89 | /* Lower | ||
| 90 | * ,-----------------------------------------------------------------------------------. | ||
| 91 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | ||
| 92 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 93 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | ||
| 94 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 95 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | | ||
| 96 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 97 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 98 | * `-----------------------------------------------------------------------------------' | ||
| 99 | */ | ||
| 100 | [_LOWER] = LAYOUT_ortho_4x12_wrapper( | 65 | [_LOWER] = LAYOUT_ortho_4x12_wrapper( |
| 101 | KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, | 66 | KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, |
| 102 | KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, | 67 | KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, |
| @@ -104,39 +69,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 104 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 69 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
| 105 | ), | 70 | ), |
| 106 | 71 | ||
| 107 | /* Raise | ||
| 108 | * ,-----------------------------------------------------------------------------------. | ||
| 109 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 110 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 111 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
| 112 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 113 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | | ||
| 114 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 115 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 116 | * `-----------------------------------------------------------------------------------' | ||
| 117 | */ | ||
| 118 | [_RAISE] = LAYOUT_ortho_4x12_wrapper( | 72 | [_RAISE] = LAYOUT_ortho_4x12_wrapper( |
| 119 | KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, | 73 | KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, |
| 120 | KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, | 74 | KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, |
| 121 | _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, | 75 | _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, |
| 122 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 76 | _______, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________ |
| 123 | ), | 77 | ), |
| 124 | 78 | ||
| 125 | /* Adjust (Lower + Raise) | ||
| 126 | * ,-----------------------------------------------------------------------------------. | ||
| 127 | * | | Reset| | | | | | | | | | Del | | ||
| 128 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 129 | * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | | ||
| 130 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 131 | * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | | ||
| 132 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 133 | * | | | | | | | | | | | | | ||
| 134 | * `-----------------------------------------------------------------------------------' | ||
| 135 | */ | ||
| 136 | [_ADJUST] = LAYOUT_ortho_4x12_wrapper( | 79 | [_ADJUST] = LAYOUT_ortho_4x12_wrapper( |
| 137 | _______, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_DEL, | 80 | KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, |
| 138 | _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______, | 81 | VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EPRM, |
| 139 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, _______, | 82 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, |
| 140 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 83 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 141 | ) | 84 | ) |
| 142 | 85 | ||
| @@ -147,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 147 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | 90 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { |
| 148 | switch (keycode) { | 91 | switch (keycode) { |
| 149 | 92 | ||
| 150 | #ifdef KEYBOARD_planck | 93 | #ifdef BACKLIGHT_ENABLE |
| 151 | case BACKLIT: | 94 | case BACKLIT: |
| 152 | if (record->event.pressed) { | 95 | if (record->event.pressed) { |
| 153 | register_code(KC_RSFT); | 96 | register_code(KC_RSFT); |
| @@ -170,8 +113,86 @@ bool music_mask_user(uint16_t keycode) { | |||
| 170 | switch (keycode) { | 113 | switch (keycode) { |
| 171 | case RAISE: | 114 | case RAISE: |
| 172 | case LOWER: | 115 | case LOWER: |
| 116 | case BK_LWER: | ||
| 117 | case SP_LWER: | ||
| 118 | case DL_RAIS: | ||
| 119 | case ET_RAIS: | ||
| 173 | return false; | 120 | return false; |
| 174 | default: | 121 | default: |
| 175 | return true; | 122 | return true; |
| 176 | } | 123 | } |
| 177 | } | 124 | } |
| 125 | |||
| 126 | #ifdef RGB_MATRIX_ENABLE | ||
| 127 | |||
| 128 | |||
| 129 | void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { | ||
| 130 | rgb_led led; | ||
| 131 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | ||
| 132 | led = g_rgb_leds[i]; | ||
| 133 | if (led.matrix_co.raw < 0xFF) { | ||
| 134 | if (led.modifier) { | ||
| 135 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 136 | } | ||
| 137 | } | ||
| 138 | } | ||
| 139 | } | ||
| 140 | |||
| 141 | void rgb_matrix_indicators_user(void) { | ||
| 142 | uint8_t this_mod = get_mods(); | ||
| 143 | uint8_t this_led = host_keyboard_leds(); | ||
| 144 | uint8_t this_osm = get_oneshot_mods(); | ||
| 145 | |||
| 146 | switch (biton32(layer_state)) { | ||
| 147 | case _RAISE: | ||
| 148 | rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; | ||
| 149 | case _LOWER: | ||
| 150 | rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; | ||
| 151 | case _ADJUST: | ||
| 152 | rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; | ||
| 153 | default: | ||
| 154 | switch (biton32(default_layer_state)) { | ||
| 155 | case _QWERTY: | ||
| 156 | rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, true); break; | ||
| 157 | case _COLEMAK: | ||
| 158 | rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, true); break; | ||
| 159 | case _DVORAK: | ||
| 160 | rgb_matrix_layer_helper(0x00, 0xFF, 0x00, true); break; | ||
| 161 | case _WORKMAN: | ||
| 162 | rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, true); break; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | |||
| 166 | switch (biton32(default_layer_state)) { | ||
| 167 | case _QWERTY: | ||
| 168 | rgb_matrix_set_color(42, 0x00, 0xFF, 0xFF); break; | ||
| 169 | case _COLEMAK: | ||
| 170 | rgb_matrix_set_color(42, 0xFF, 0x00, 0xFF); break; | ||
| 171 | case _DVORAK: | ||
| 172 | rgb_matrix_set_color(42, 0x00, 0xFF, 0x00); break; | ||
| 173 | case _WORKMAN: | ||
| 174 | rgb_matrix_set_color(42, 0xD9, 0xA5, 0x21); break; | ||
| 175 | } | ||
| 176 | |||
| 177 | if (this_mod & MODS_SHIFT_MASK || this_led & (1<<USB_LED_CAPS_LOCK) || this_osm & MODS_SHIFT_MASK) { | ||
| 178 | rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); | ||
| 179 | rgb_matrix_set_color(36, 0x00, 0xFF, 0x00); | ||
| 180 | } | ||
| 181 | if (this_mod & MODS_CTRL_MASK || this_osm & MODS_CTRL_MASK) { | ||
| 182 | rgb_matrix_set_color(25, 0xFF, 0x00, 0x00); | ||
| 183 | rgb_matrix_set_color(34, 0xFF, 0x00, 0x00); | ||
| 184 | rgb_matrix_set_color(37, 0xFF, 0x00, 0x00); | ||
| 185 | |||
| 186 | } | ||
| 187 | if (this_mod & MODS_GUI_MASK || this_osm & MODS_GUI_MASK) { | ||
| 188 | rgb_matrix_set_color(39, 0xFF, 0xD9, 0x00); | ||
| 189 | } | ||
| 190 | if (this_mod & MODS_ALT_MASK || this_osm & MODS_ALT_MASK) { | ||
| 191 | rgb_matrix_set_color(38, 0x00, 0x00, 0xFF); | ||
| 192 | } | ||
| 193 | } | ||
| 194 | |||
| 195 | void matrix_init_keymap(void) { | ||
| 196 | rgblight_mode(RGB_MATRIX_MULTISPLASH); | ||
| 197 | } | ||
| 198 | #endif //RGB_MATRIX_INIT | ||
diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index ebd8b26b0..5e46cf112 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk | |||
| @@ -4,9 +4,16 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
| 4 | CONSOLE_ENABLE = no # Console for debug(+400) | 4 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 5 | COMMAND_ENABLE = no # Commands for debug and configuration | 5 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 6 | TAP_DANCE_ENABLE = no | 6 | TAP_DANCE_ENABLE = no |
| 7 | RGBLIGHT_ENABLE = yes | ||
| 8 | AUDIO_ENABLE = yes | 7 | AUDIO_ENABLE = yes |
| 9 | 8 | ifeq (,$(findstring planck/rev6,$(KEYBOARD))) | |
| 9 | RGBLIGHT_ENABLE = yes | ||
| 10 | INDICATOR_LIGHTS = yes | ||
| 11 | RGBLIGHT_TWINKLE = yes | ||
| 12 | endif | ||
| 13 | ifneq (,$(findstring planck/light,$(KEYBOARD))) | ||
| 14 | RGB_MATRIX_ENABLE = yes | ||
| 15 | RGBLIGHT_ENABLE = no | ||
| 16 | endif | ||
| 10 | 17 | ||
| 11 | ifeq ($(strip $(PROTOCOL)), VUSB) | 18 | ifeq ($(strip $(PROTOCOL)), VUSB) |
| 12 | NKRO_ENABLE = no | 19 | NKRO_ENABLE = no |
| @@ -15,6 +22,5 @@ NKRO_ENABLE = yes | |||
| 15 | endif | 22 | endif |
| 16 | 23 | ||
| 17 | 24 | ||
| 18 | INDICATOR_LIGHTS = yes | ||
| 19 | MACROS_ENABLED = no | 25 | MACROS_ENABLED = no |
| 20 | RGBLIGHT_TWINKLE = yes | 26 | |
diff --git a/users/drashna/config.h b/users/drashna/config.h index 87050fbcc..dd6875ceb 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -11,8 +11,10 @@ | |||
| 11 | SONG(OVERWATCH_THEME) \ | 11 | SONG(OVERWATCH_THEME) \ |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f | 14 | #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f |
| 15 | 15 | // #ifdef RGBLIGHT_ENABLE | |
| 16 | // #define NO_MUSIC_MODE | ||
| 17 | // #endif //RGBLIGHT_ENABLE | ||
| 16 | #endif | 18 | #endif |
| 17 | 19 | ||
| 18 | #ifdef RGBLIGHT_ENABLE | 20 | #ifdef RGBLIGHT_ENABLE |
| @@ -40,8 +42,8 @@ | |||
| 40 | // and when this option isn't enabled, z rapidly followed by x | 42 | // and when this option isn't enabled, z rapidly followed by x |
| 41 | // actually sends Ctrl-x. That's bad.) | 43 | // actually sends Ctrl-x. That's bad.) |
| 42 | #define IGNORE_MOD_TAP_INTERRUPT | 44 | #define IGNORE_MOD_TAP_INTERRUPT |
| 43 | #undef PERMISSIVE_HOLD | 45 | #undef PERMISSIVE_HOLD |
| 44 | #undef PREVENT_STUCK_MODIFIERS | 46 | #define PREVENT_STUCK_MODIFIERS |
| 45 | // #define TAPPING_FORCE_HOLD | 47 | // #define TAPPING_FORCE_HOLD |
| 46 | //#define RETRO_TAPPING | 48 | //#define RETRO_TAPPING |
| 47 | 49 | ||
| @@ -59,12 +61,6 @@ | |||
| 59 | 61 | ||
| 60 | // Disable action_get_macro and fn_actions, since we don't use these | 62 | // Disable action_get_macro and fn_actions, since we don't use these |
| 61 | // and it saves on space in the firmware. | 63 | // and it saves on space in the firmware. |
| 62 | #ifndef NO_DEBUG | ||
| 63 | #define NO_DEBUG | ||
| 64 | #endif // !NO_DEBUG | ||
| 65 | #if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) | ||
| 66 | #define NO_PRINT | ||
| 67 | #endif // !NO_PRINT | ||
| 68 | #define NO_ACTION_MACRO | 64 | #define NO_ACTION_MACRO |
| 69 | #define NO_ACTION_FUNCTION | 65 | #define NO_ACTION_FUNCTION |
| 70 | 66 | ||
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index f72902f0b..20df2f4de 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -16,16 +16,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "drashna.h" | 18 | #include "drashna.h" |
| 19 | #include "version.h" | ||
| 20 | #include "eeprom.h" | ||
| 21 | #include "tap_dances.h" | 19 | #include "tap_dances.h" |
| 22 | #include "rgb_stuff.h" | 20 | #include "rgb_stuff.h" |
| 23 | 21 | ||
| 24 | |||
| 25 | float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); | ||
| 26 | float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); | ||
| 27 | |||
| 28 | static uint16_t copy_paste_timer; | ||
| 29 | userspace_config_t userspace_config; | 22 | userspace_config_t userspace_config; |
| 30 | 23 | ||
| 31 | // Helper Functions | 24 | // Helper Functions |
| @@ -35,8 +28,14 @@ userspace_config_t userspace_config; | |||
| 35 | // the same thing, but with differring text sent. | 28 | // the same thing, but with differring text sent. |
| 36 | bool send_game_macro(const char *str, keyrecord_t *record, bool override) { | 29 | bool send_game_macro(const char *str, keyrecord_t *record, bool override) { |
| 37 | if (!record->event.pressed || override) { | 30 | if (!record->event.pressed || override) { |
| 31 | uint16_t keycode; | ||
| 32 | if (userspace_config.is_overwatch) { | ||
| 33 | keycode = KC_BSPC; | ||
| 34 | } else { | ||
| 35 | keycode = KC_ENTER; | ||
| 36 | } | ||
| 38 | clear_keyboard(); | 37 | clear_keyboard(); |
| 39 | tap(userspace_config.is_overwatch ? KC_BSPC : KC_ENTER); | 38 | tap(keycode); |
| 40 | wait_ms(50); | 39 | wait_ms(50); |
| 41 | send_string_with_delay(str, MACRO_TIMER); | 40 | send_string_with_delay(str, MACRO_TIMER); |
| 42 | wait_ms(50); | 41 | wait_ms(50); |
| @@ -46,8 +45,6 @@ bool send_game_macro(const char *str, keyrecord_t *record, bool override) { | |||
| 46 | return false; | 45 | return false; |
| 47 | } | 46 | } |
| 48 | 47 | ||
| 49 | void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; | ||
| 50 | |||
| 51 | bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) { | 48 | bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) { |
| 52 | static uint16_t this_timer; | 49 | static uint16_t this_timer; |
| 53 | if(pressed) { | 50 | if(pressed) { |
| @@ -94,6 +91,9 @@ __attribute__ ((weak)) | |||
| 94 | void startup_keymap(void) {} | 91 | void startup_keymap(void) {} |
| 95 | 92 | ||
| 96 | __attribute__ ((weak)) | 93 | __attribute__ ((weak)) |
| 94 | void shutdown_keymap(void) {} | ||
| 95 | |||
| 96 | __attribute__ ((weak)) | ||
| 97 | void suspend_power_down_keymap(void) {} | 97 | void suspend_power_down_keymap(void) {} |
| 98 | 98 | ||
| 99 | __attribute__ ((weak)) | 99 | __attribute__ ((weak)) |
| @@ -127,6 +127,7 @@ __attribute__ ((weak)) | |||
| 127 | void led_set_keymap(uint8_t usb_led) {} | 127 | void led_set_keymap(uint8_t usb_led) {} |
| 128 | 128 | ||
| 129 | 129 | ||
| 130 | |||
| 130 | // Call user matrix init, set default RGB colors and then | 131 | // Call user matrix init, set default RGB colors and then |
| 131 | // call the keymap's init function | 132 | // call the keymap's init function |
| 132 | void matrix_init_user(void) { | 133 | void matrix_init_user(void) { |
| @@ -158,6 +159,24 @@ void startup_user (void) { | |||
| 158 | startup_keymap(); | 159 | startup_keymap(); |
| 159 | } | 160 | } |
| 160 | 161 | ||
| 162 | void shutdown_user (void) { | ||
| 163 | #ifdef RGBLIGHT_ENABLE | ||
| 164 | rgblight_enable_noeeprom(); | ||
| 165 | rgblight_mode_noeeprom(1); | ||
| 166 | rgblight_setrgb_red(); | ||
| 167 | #endif // RGBLIGHT_ENABLE | ||
| 168 | #ifdef RGB_MATRIX_ENABLE | ||
| 169 | rgb_led led; | ||
| 170 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | ||
| 171 | led = g_rgb_leds[i]; | ||
| 172 | if (led.matrix_co.raw < 0xFF) { | ||
| 173 | rgb_matrix_set_color( i, 0xFF, 0x00, 0x00 ); | ||
| 174 | } | ||
| 175 | } | ||
| 176 | #endif //RGB_MATRIX_ENABLE | ||
| 177 | shutdown_keymap(); | ||
| 178 | } | ||
| 179 | |||
| 161 | void suspend_power_down_user(void) | 180 | void suspend_power_down_user(void) |
| 162 | { | 181 | { |
| 163 | suspend_power_down_keymap(); | 182 | suspend_power_down_keymap(); |
| @@ -246,20 +265,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 246 | return false; | 265 | return false; |
| 247 | break; | 266 | break; |
| 248 | 267 | ||
| 249 | |||
| 250 | case KC_RESET: // Custom RESET code that sets RGBLights to RED | ||
| 251 | if (!record->event.pressed) { | ||
| 252 | #ifdef RGBLIGHT_ENABLE | ||
| 253 | rgblight_enable_noeeprom(); | ||
| 254 | rgblight_mode_noeeprom(1); | ||
| 255 | rgblight_setrgb_red(); | ||
| 256 | #endif // RGBLIGHT_ENABLE | ||
| 257 | reset_keyboard(); | ||
| 258 | } | ||
| 259 | return false; | ||
| 260 | break; | ||
| 261 | |||
| 262 | |||
| 263 | case EPRM: // Resets EEPROM | 268 | case EPRM: // Resets EEPROM |
| 264 | if (record->event.pressed) { | 269 | if (record->event.pressed) { |
| 265 | eeconfig_init(); | 270 | eeconfig_init(); |
| @@ -333,28 +338,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 333 | return false; break; | 338 | return false; break; |
| 334 | 339 | ||
| 335 | 340 | ||
| 336 | case KC_CCCV: // One key copy/paste | ||
| 337 | if(record->event.pressed){ | ||
| 338 | copy_paste_timer = timer_read(); | ||
| 339 | } else { | ||
| 340 | if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy | ||
| 341 | register_code(KC_LCTL); | ||
| 342 | tap(KC_C); | ||
| 343 | unregister_code(KC_LCTL); | ||
| 344 | #ifdef AUDIO_ENABLE | ||
| 345 | PLAY_SONG(tone_copy); | ||
| 346 | #endif | ||
| 347 | } else { // Tap, paste | ||
| 348 | register_code(KC_LCTL); | ||
| 349 | tap(KC_V); | ||
| 350 | unregister_code(KC_LCTL); | ||
| 351 | #ifdef AUDIO_ENABLE | ||
| 352 | PLAY_SONG(tone_paste); | ||
| 353 | #endif | ||
| 354 | } | ||
| 355 | } | ||
| 356 | return false; | ||
| 357 | break; | ||
| 358 | case CLICKY_TOGGLE: | 341 | case CLICKY_TOGGLE: |
| 359 | #ifdef AUDIO_CLICKY | 342 | #ifdef AUDIO_CLICKY |
| 360 | userspace_config.clicky_enable = clicky_enable; | 343 | userspace_config.clicky_enable = clicky_enable; |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 3efef5704..dd0d1c0d7 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -15,11 +15,13 @@ You should have received a copy of the GNU General Public License | |||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #ifndef USERSPACE | 18 | #pragma once |
| 19 | #define USERSPACE | ||
| 20 | #include "quantum.h" | 19 | #include "quantum.h" |
| 21 | 20 | #include "version.h" | |
| 22 | 21 | #include "eeprom.h" | |
| 22 | #ifdef RGB_MATRIX_ENABLE | ||
| 23 | #include "rgb_matrix.h" | ||
| 24 | #endif | ||
| 23 | // Define layer names | 25 | // Define layer names |
| 24 | enum userspace_layers { | 26 | enum userspace_layers { |
| 25 | _QWERTY = 0, | 27 | _QWERTY = 0, |
| @@ -53,7 +55,7 @@ extern bool clicky_enable; | |||
| 53 | void rgblight_sethsv_default_helper(uint8_t index); | 55 | void rgblight_sethsv_default_helper(uint8_t index); |
| 54 | #endif // RGBLIGHT_ENABLE | 56 | #endif // RGBLIGHT_ENABLE |
| 55 | 57 | ||
| 56 | void tap(uint16_t keycode); | 58 | inline void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; |
| 57 | bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); | 59 | bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); |
| 58 | bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); | 60 | bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); |
| 59 | 61 | ||
| @@ -90,7 +92,6 @@ enum userspace_custom_keycodes { | |||
| 90 | KC_C9, | 92 | KC_C9, |
| 91 | KC_GGEZ, | 93 | KC_GGEZ, |
| 92 | KC_MAKE, // Run keyboard's customized make command | 94 | KC_MAKE, // Run keyboard's customized make command |
| 93 | KC_RESET, // Resets keyboard, with red underglow | ||
| 94 | KC_RGB_T, // Toggles RGB Layer Indication mode | 95 | KC_RGB_T, // Toggles RGB Layer Indication mode |
| 95 | KC_SECRET_1, // test1 | 96 | KC_SECRET_1, // test1 |
| 96 | KC_SECRET_2, // test2 | 97 | KC_SECRET_2, // test2 |
| @@ -123,6 +124,7 @@ enum userspace_custom_keycodes { | |||
| 123 | #define COLEMAK KC_COLEMAK | 124 | #define COLEMAK KC_COLEMAK |
| 124 | #define WORKMAN KC_WORKMAN | 125 | #define WORKMAN KC_WORKMAN |
| 125 | 126 | ||
| 127 | #define KC_RESET RESET | ||
| 126 | #define KC_RST KC_RESET | 128 | #define KC_RST KC_RESET |
| 127 | 129 | ||
| 128 | #ifdef SWAP_HANDS_ENABLE | 130 | #ifdef SWAP_HANDS_ENABLE |
| @@ -131,6 +133,11 @@ enum userspace_custom_keycodes { | |||
| 131 | #define KC_C1R3 KC_BSPC | 133 | #define KC_C1R3 KC_BSPC |
| 132 | #endif // SWAP_HANDS_ENABLE | 134 | #endif // SWAP_HANDS_ENABLE |
| 133 | 135 | ||
| 136 | #define BK_LWER LT(_LOWER, KC_BSPC) | ||
| 137 | #define SP_LWER LT(_LOWER, KC_SPC) | ||
| 138 | #define DL_RAIS LT(_RAISE, KC_DEL) | ||
| 139 | #define ET_RAIS LT(_RAISE, KC_ENTER) | ||
| 140 | |||
| 134 | // OSM keycodes, to keep things clean and easy to change | 141 | // OSM keycodes, to keep things clean and easy to change |
| 135 | #define KC_MLSF OSM(MOD_LSFT) | 142 | #define KC_MLSF OSM(MOD_LSFT) |
| 136 | #define KC_MRSF OSM(MOD_RSFT) | 143 | #define KC_MRSF OSM(MOD_RSFT) |
| @@ -325,7 +332,7 @@ enum { | |||
| 325 | 332 | ||
| 326 | 333 | ||
| 327 | #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG | 334 | #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG |
| 328 | #define _________________ADJUST_L2_________________ _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM | 335 | #define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM |
| 329 | #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T | 336 | #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T |
| 330 | 337 | ||
| 331 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 | 338 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 |
| @@ -350,4 +357,3 @@ enum { | |||
| 350 | LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER) | 357 | LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER) |
| 351 | 358 | ||
| 352 | 359 | ||
| 353 | #endif // !USERSPACE | ||
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index f2a9a47a9..03c55b132 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -267,7 +267,7 @@ void matrix_init_rgb(void) { | |||
| 267 | case _COLEMAK: | 267 | case _COLEMAK: |
| 268 | rgblight_sethsv_noeeprom_magenta(); break; | 268 | rgblight_sethsv_noeeprom_magenta(); break; |
| 269 | case _DVORAK: | 269 | case _DVORAK: |
| 270 | rgblight_sethsv_noeeprom_green(); break; | 270 | rgblight_sethsv_noeeprom_springgreen(); break; |
| 271 | case _WORKMAN: | 271 | case _WORKMAN: |
| 272 | rgblight_sethsv_noeeprom_goldenrod(); break; | 272 | rgblight_sethsv_noeeprom_goldenrod(); break; |
| 273 | default: | 273 | default: |
| @@ -313,7 +313,7 @@ uint32_t layer_state_set_rgb(uint32_t state) { | |||
| 313 | rgblight_mode_noeeprom(5); | 313 | rgblight_mode_noeeprom(5); |
| 314 | break; | 314 | break; |
| 315 | case _LOWER: | 315 | case _LOWER: |
| 316 | rgblight_sethsv_noeeprom_orange(); | 316 | rgblight_sethsv_noeeprom_green(); |
| 317 | rgblight_mode_noeeprom(5); | 317 | rgblight_mode_noeeprom(5); |
| 318 | break; | 318 | break; |
| 319 | case _ADJUST: | 319 | case _ADJUST: |
| @@ -325,7 +325,7 @@ uint32_t layer_state_set_rgb(uint32_t state) { | |||
| 325 | case _COLEMAK: | 325 | case _COLEMAK: |
| 326 | rgblight_sethsv_noeeprom_magenta(); break; | 326 | rgblight_sethsv_noeeprom_magenta(); break; |
| 327 | case _DVORAK: | 327 | case _DVORAK: |
| 328 | rgblight_sethsv_noeeprom_green(); break; | 328 | rgblight_sethsv_noeeprom_springgreen(); break; |
| 329 | case _WORKMAN: | 329 | case _WORKMAN: |
| 330 | rgblight_sethsv_noeeprom_goldenrod(); break; | 330 | rgblight_sethsv_noeeprom_goldenrod(); break; |
| 331 | default: | 331 | default: |
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 6426ea266..50c75c8c3 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h | |||
| @@ -13,4 +13,3 @@ void matrix_init_rgb(void); | |||
| 13 | void matrix_scan_rgb(void); | 13 | void matrix_scan_rgb(void); |
| 14 | uint32_t layer_state_set_rgb(uint32_t state); | 14 | uint32_t layer_state_set_rgb(uint32_t state); |
| 15 | 15 | ||
| 16 | |||
diff --git a/users/drashna/template.c b/users/drashna/template.c index 20dbb96d7..e6b50c961 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | #include "drashna.h" | 1 | #include "template.h" |
| 2 | #include "quantum.h" | 2 | |
| 3 | #include "action.h" | ||
| 4 | #include "version.h" | ||
| 5 | 3 | ||
| 6 | // Add reconfigurable functions here, for keymap customization | 4 | // Add reconfigurable functions here, for keymap customization |
| 7 | // This allows for a global, userspace functions, and continued | 5 | // This allows for a global, userspace functions, and continued |
| @@ -10,25 +8,15 @@ | |||
| 10 | __attribute__ ((weak)) | 8 | __attribute__ ((weak)) |
| 11 | void matrix_init_keymap(void) {} | 9 | void matrix_init_keymap(void) {} |
| 12 | 10 | ||
| 13 | __attribute__ ((weak)) | ||
| 14 | void matrix_scan_keymap(void) {} | ||
| 15 | |||
| 16 | __attribute__ ((weak)) | ||
| 17 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 18 | return true; | ||
| 19 | } | ||
| 20 | __attribute__ ((weak)) | ||
| 21 | uint32_t layer_state_set_keymap (uint32_t state) { | ||
| 22 | return state; | ||
| 23 | } | ||
| 24 | __attribute__ ((weak)) | ||
| 25 | void led_set_keymap(uint8_t usb_led) {} | ||
| 26 | |||
| 27 | // Call user matrix init, then call the keymap's init function | 11 | // Call user matrix init, then call the keymap's init function |
| 28 | void matrix_init_user(void) { | 12 | void matrix_init_user(void) { |
| 29 | matrix_init_keymap(); | 13 | matrix_init_keymap(); |
| 30 | } | 14 | } |
| 31 | 15 | ||
| 16 | |||
| 17 | __attribute__ ((weak)) | ||
| 18 | void matrix_scan_keymap(void) {} | ||
| 19 | |||
| 32 | // No global matrix scan code, so just run keymap's matix | 20 | // No global matrix scan code, so just run keymap's matix |
| 33 | // scan function | 21 | // scan function |
| 34 | void matrix_scan_user(void) { | 22 | void matrix_scan_user(void) { |
| @@ -36,11 +24,16 @@ void matrix_scan_user(void) { | |||
| 36 | } | 24 | } |
| 37 | 25 | ||
| 38 | 26 | ||
| 27 | __attribute__ ((weak)) | ||
| 28 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 29 | return true; | ||
| 30 | } | ||
| 31 | |||
| 39 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | 32 | // Defines actions tor my global custom keycodes. Defined in drashna.h file |
| 40 | // Then runs the _keymap's recod handier if not processed here, | 33 | // Then runs the _keymap's recod handier if not processed here, |
| 41 | // And use "NEWPLACEHOLDER" for new safe range | 34 | // And use "NEWPLACEHOLDER" for new safe range |
| 42 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 35 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 43 | 36 | ||
| 44 | switch (keycode) { | 37 | switch (keycode) { |
| 45 | case KC_MAKE: | 38 | case KC_MAKE: |
| 46 | if (!record->event.pressed) { | 39 | if (!record->event.pressed) { |
| @@ -56,12 +49,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 56 | } | 49 | } |
| 57 | return false; | 50 | return false; |
| 58 | break; | 51 | break; |
| 59 | case KC_RESET: | 52 | |
| 60 | if (!record->event.pressed) { | ||
| 61 | reset_keyboard(); | ||
| 62 | } | ||
| 63 | return false; | ||
| 64 | break; | ||
| 65 | case EPRM: | 53 | case EPRM: |
| 66 | if (record->event.pressed) { | 54 | if (record->event.pressed) { |
| 67 | eeconfig_init(); | 55 | eeconfig_init(); |
| @@ -78,13 +66,66 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 78 | return process_record_keymap(keycode, record); | 66 | return process_record_keymap(keycode, record); |
| 79 | } | 67 | } |
| 80 | 68 | ||
| 81 | // Runs state check and changes underglow color and animation | 69 | |
| 82 | // on layer change, no matter where the change was initiated | 70 | __attribute__ ((weak)) |
| 83 | // Then runs keymap's layer change check | 71 | uint32_t layer_state_set_keymap (uint32_t state) { |
| 72 | return state; | ||
| 73 | } | ||
| 74 | |||
| 84 | uint32_t layer_state_set_user (uint32_t state) { | 75 | uint32_t layer_state_set_user (uint32_t state) { |
| 85 | return layer_state_set_keymap (state); | 76 | return layer_state_set_keymap (state); |
| 86 | } | 77 | } |
| 87 | 78 | ||
| 79 | |||
| 80 | |||
| 81 | __attribute__ ((weak)) | ||
| 82 | void led_set_keymap(uint8_t usb_led) {} | ||
| 83 | |||
| 88 | void led_set_user(uint8_t usb_led) { | 84 | void led_set_user(uint8_t usb_led) { |
| 89 | led_set_keymap(usb_led); | 85 | led_set_keymap(usb_led); |
| 90 | } | 86 | } |
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | __attribute__ ((weak)) | ||
| 91 | void suspend_power_down_keymap(void) {} | ||
| 92 | |||
| 93 | void suspend_power_down_user(void) | ||
| 94 | { | ||
| 95 | suspend_power_down_keymap(); | ||
| 96 | } | ||
| 97 | |||
| 98 | |||
| 99 | |||
| 100 | __attribute__ ((weak)) | ||
| 101 | void suspend_wakeup_init_keymap(void) {} | ||
| 102 | |||
| 103 | void suspend_wakeup_init_user(void) | ||
| 104 | { | ||
| 105 | suspend_wakeup_init_keymap(); | ||
| 106 | #ifdef KEYBOARD_ergodox_ez | ||
| 107 | wait_ms(10); | ||
| 108 | #endif | ||
| 109 | } | ||
| 110 | |||
| 111 | |||
| 112 | |||
| 113 | __attribute__ ((weak)) | ||
| 114 | void startup_keymap(void) {} | ||
| 115 | |||
| 116 | void startup_user (void) { | ||
| 117 | #ifdef RGBLIGHT_ENABLE | ||
| 118 | matrix_init_rgb(); | ||
| 119 | #endif //RGBLIGHT_ENABLE | ||
| 120 | startup_keymap(); | ||
| 121 | } | ||
| 122 | |||
| 123 | |||
| 124 | |||
| 125 | __attribute__ ((weak)) | ||
| 126 | void shutdown_keymap(void) {} | ||
| 127 | |||
| 128 | void shutdown_user (void) { | ||
| 129 | shutdown_keymap(); | ||
| 130 | } | ||
| 131 | |||
diff --git a/users/drashna/template.h b/users/drashna/template.h index d1251462b..5b3a93de5 100644 --- a/users/drashna/template.h +++ b/users/drashna/template.h | |||
| @@ -2,8 +2,10 @@ | |||
| 2 | #define USERSPACE | 2 | #define USERSPACE |
| 3 | 3 | ||
| 4 | #include "quantum.h" | 4 | #include "quantum.h" |
| 5 | #include "version.h" | ||
| 6 | #include "eeprom.h" | ||
| 5 | 7 | ||
| 6 | // Define layer names | 8 | // Define layer names |
| 7 | #define BASE 0 | 9 | #define BASE 0 |
| 8 | 10 | ||
| 9 | enum custom_keycodes { | 11 | enum custom_keycodes { |
