diff options
| author | Drashna Jaelre <drashna@live.com> | 2017-12-05 18:45:42 -0800 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-12-05 21:45:42 -0500 |
| commit | d5a76e899d1d4f91dc7d348075a08e42047fc8d1 (patch) | |
| tree | 55fc36a57b7d658814d7df7d71c7daf207b4053e /users/drashna/drashna.c | |
| parent | dd05bf0d9602820bb9ba3bb1a8586b14c5504312 (diff) | |
| download | qmk_firmware-d5a76e899d1d4f91dc7d348075a08e42047fc8d1.tar.gz qmk_firmware-d5a76e899d1d4f91dc7d348075a08e42047fc8d1.zip | |
Updates to drashna keymaps and userspace (#2093)
* Add "secret" macor
* Updating secret macros
* Re-add RGB to Ergodox
* Fixed issue when RGB was disabled
* Consistency changes
* Updated bootloader macro
* Fixing audio setup
* Fix bootloader typo
* Update to full list of stings (for completeness)
* Template fix
* Finally got woodpad to force numlock
* Fix for new RGB mode
Diffstat (limited to 'users/drashna/drashna.c')
| -rw-r--r-- | users/drashna/drashna.c | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 1bf029163..b7ca84faf 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 19 | #include "quantum.h" | 19 | #include "quantum.h" |
| 20 | #include "action.h" | 20 | #include "action.h" |
| 21 | #include "version.h" | 21 | #include "version.h" |
| 22 | #include "sensitive.h" | ||
| 22 | 23 | ||
| 23 | #ifdef TAP_DANCE_ENABLE | 24 | #ifdef TAP_DANCE_ENABLE |
| 24 | //define diablo macro timer variables | 25 | //define diablo macro timer variables |
| @@ -78,6 +79,14 @@ qk_tap_dance_action_t tap_dance_actions[] = { | |||
| 78 | }; | 79 | }; |
| 79 | #endif | 80 | #endif |
| 80 | 81 | ||
| 82 | #ifdef AUDIO_ENABLE | ||
| 83 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
| 84 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
| 85 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
| 86 | float tone_workman[][2] = SONG(PLOVER_SOUND); | ||
| 87 | float tone_hackstartup[][2] = SONG(ONE_UP_SOUND); | ||
| 88 | #endif | ||
| 89 | |||
| 81 | 90 | ||
| 82 | // Add reconfigurable functions here, for keymap customization | 91 | // Add reconfigurable functions here, for keymap customization |
| 83 | // This allows for a global, userspace functions, and continued | 92 | // This allows for a global, userspace functions, and continued |
| @@ -138,6 +147,11 @@ void matrix_init_user(void) { | |||
| 138 | rgblight_mode(5); | 147 | rgblight_mode(5); |
| 139 | } | 148 | } |
| 140 | #endif | 149 | #endif |
| 150 | #ifdef AUDIO_ENABLE | ||
| 151 | // _delay_ms(21); // gets rid of tick | ||
| 152 | // stop_all_notes(); | ||
| 153 | // PLAY_SONG(tone_hackstartup); | ||
| 154 | #endif | ||
| 141 | matrix_init_keymap(); | 155 | matrix_init_keymap(); |
| 142 | } | 156 | } |
| 143 | #ifdef TAP_DANCE_ENABLE | 157 | #ifdef TAP_DANCE_ENABLE |
| @@ -190,13 +204,6 @@ void led_set_user(uint8_t usb_led) { | |||
| 190 | } | 204 | } |
| 191 | 205 | ||
| 192 | 206 | ||
| 193 | #ifdef AUDIO_ENABLE | ||
| 194 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
| 195 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
| 196 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
| 197 | float tone_workman[][2] = SONG(PLOVER_SOUND); | ||
| 198 | #endif | ||
| 199 | |||
| 200 | 207 | ||
| 201 | void persistent_default_layer_set(uint16_t default_layer) { | 208 | void persistent_default_layer_set(uint16_t default_layer) { |
| 202 | eeconfig_update_default_layer(default_layer); | 209 | eeconfig_update_default_layer(default_layer); |
| @@ -427,28 +434,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 427 | #endif | 434 | #endif |
| 428 | case KC_MAKE: | 435 | case KC_MAKE: |
| 429 | if (!record->event.pressed) { | 436 | if (!record->event.pressed) { |
| 430 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); | 437 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP |
| 431 | #ifndef BOOTLOADER_CATERINA | 438 | #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) |
| 432 | SEND_STRING(":teensy "); | 439 | ":dfu" |
| 433 | #else | 440 | #elif defined(BOOTLOADER_HALFKAY) |
| 434 | SEND_STRING(" "); | 441 | ":teensy" |
| 442 | #elif defined(BOOTLOADER_CATERINA) | ||
| 443 | ":avrdude" | ||
| 435 | #endif | 444 | #endif |
| 436 | #ifdef RGBLIGHT_ENABLE | 445 | #ifdef RGBLIGHT_ENABLE |
| 437 | SEND_STRING("RGBLIGHT_ENABLE=yes "); | 446 | " RGBLIGHT_ENABLE=yes" |
| 438 | #else | 447 | #else |
| 439 | SEND_STRING("RGBLIGHT_ENABLE=no "); | 448 | " RGBLIGHT_ENABLE=no" |
| 440 | #endif | 449 | #endif |
| 441 | #ifdef AUDIO_ENABLE | 450 | #ifdef AUDIO_ENABLE |
| 442 | SEND_STRING("AUDIO_ENABLE=yes "); | 451 | " AUDIO_ENABLE=yes" |
| 443 | #else | 452 | #else |
| 444 | SEND_STRING("AUDIO_ENABLE=no "); | 453 | " AUDIO_ENABLE=no" |
| 445 | #endif | 454 | #endif |
| 446 | #ifdef FAUXCLICKY_ENABLE | 455 | #ifdef FAUXCLICKY_ENABLE |
| 447 | SEND_STRING("FAUXCLICKY_ENABLE=yes "); | 456 | " FAUXCLICKY_ENABLE=yes" |
| 448 | #else | 457 | #else |
| 449 | SEND_STRING("FAUXCLICKY_ENABLE=no "); | 458 | " FAUXCLICKY_ENABLE=no" |
| 450 | #endif | 459 | #endif |
| 451 | SEND_STRING(SS_TAP(X_ENTER)); | 460 | SS_TAP(X_ENTER)); |
| 452 | } | 461 | } |
| 453 | return false; | 462 | return false; |
| 454 | break; | 463 | break; |
| @@ -475,33 +484,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 475 | } | 484 | } |
| 476 | return false; | 485 | return false; |
| 477 | break; | 486 | break; |
| 487 | case KC_SECRET_1 ... KC_SECRET_5: | ||
| 488 | if (!record->event.pressed) { | ||
| 489 | send_string(secret[keycode - KC_SECRET_1]); | ||
| 490 | } | ||
| 491 | return false; | ||
| 492 | break; | ||
| 478 | case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication | 493 | case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication |
| 494 | #ifdef RGBLIGHT_ENABLE | ||
| 479 | if (record->event.pressed) { | 495 | if (record->event.pressed) { |
| 480 | rgb_layer_change = !rgb_layer_change; | 496 | rgb_layer_change = !rgb_layer_change; |
| 481 | } | 497 | } |
| 498 | #endif | ||
| 482 | return false; | 499 | return false; |
| 483 | break; | 500 | break; |
| 484 | case RGB_MOD: | 501 | #ifdef RGBLIGHT_ENABLE |
| 485 | case RGB_SMOD: | 502 | case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions |
| 486 | case RGB_HUI: | 503 | if (record->event.pressed) { //This disrables layer indication, as it's assumed that if you're changing this ... you want that disabled |
| 487 | case RGB_HUD: | ||
| 488 | case RGB_SAI: | ||
| 489 | case RGB_SAD: | ||
| 490 | case RGB_VAI: | ||
| 491 | case RGB_VAD: | ||
| 492 | case RGB_MODE_PLAIN: | ||
| 493 | case RGB_MODE_BREATHE: | ||
| 494 | case RGB_MODE_RAINBOW: | ||
| 495 | case RGB_MODE_SWIRL: | ||
| 496 | case RGB_MODE_SNAKE: | ||
| 497 | case RGB_MODE_KNIGHT: | ||
| 498 | case RGB_MODE_XMAS: | ||
| 499 | case RGB_MODE_GRADIENT: | ||
| 500 | if (record->event.pressed) { | ||
| 501 | rgb_layer_change = false; | 504 | rgb_layer_change = false; |
| 502 | } | 505 | } |
| 503 | return true; | 506 | return true; |
| 504 | break; | 507 | break; |
| 508 | #endif | ||
| 505 | } | 509 | } |
| 506 | return process_record_keymap(keycode, record); | 510 | return process_record_keymap(keycode, record); |
| 507 | } | 511 | } |
