diff options
Diffstat (limited to 'users/drashna')
| -rw-r--r-- | users/drashna/drashna.c | 36 | ||||
| -rw-r--r-- | users/drashna/drashna.h | 63 | ||||
| -rw-r--r-- | users/drashna/readme.md | 16 |
3 files changed, 90 insertions, 25 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index a07d74407..6039c7c56 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -166,7 +166,7 @@ void matrix_init_user(void) { | |||
| 166 | } | 166 | } |
| 167 | #endif | 167 | #endif |
| 168 | #ifdef AUDIO_ENABLE | 168 | #ifdef AUDIO_ENABLE |
| 169 | // _delay_ms(21); // gets rid of tick | 169 | // wait_ms(21); // gets rid of tick |
| 170 | // stop_all_notes(); | 170 | // stop_all_notes(); |
| 171 | // PLAY_SONG(tone_hackstartup); | 171 | // PLAY_SONG(tone_hackstartup); |
| 172 | #endif | 172 | #endif |
| @@ -329,7 +329,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 329 | if (!record->event.pressed) { | 329 | if (!record->event.pressed) { |
| 330 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 330 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 331 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 331 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 332 | _delay_ms(50); | 332 | wait_ms(50); |
| 333 | SEND_STRING("Salt, salt, salt..."); | 333 | SEND_STRING("Salt, salt, salt..."); |
| 334 | register_code(KC_ENTER); | 334 | register_code(KC_ENTER); |
| 335 | unregister_code(KC_ENTER); | 335 | unregister_code(KC_ENTER); |
| @@ -340,7 +340,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 340 | if (!record->event.pressed) { | 340 | if (!record->event.pressed) { |
| 341 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 341 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 342 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 342 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 343 | _delay_ms(50); | 343 | wait_ms(50); |
| 344 | SEND_STRING("Please sir, can I have some more salt?!"); | 344 | SEND_STRING("Please sir, can I have some more salt?!"); |
| 345 | register_code(KC_ENTER); | 345 | register_code(KC_ENTER); |
| 346 | unregister_code(KC_ENTER); | 346 | unregister_code(KC_ENTER); |
| @@ -351,7 +351,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 351 | if (!record->event.pressed) { | 351 | if (!record->event.pressed) { |
| 352 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 352 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 353 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 353 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 354 | _delay_ms(50); | 354 | wait_ms(50); |
| 355 | SEND_STRING("Your salt only makes me harder, and even more aggressive!"); | 355 | SEND_STRING("Your salt only makes me harder, and even more aggressive!"); |
| 356 | register_code(KC_ENTER); | 356 | register_code(KC_ENTER); |
| 357 | unregister_code(KC_ENTER); | 357 | unregister_code(KC_ENTER); |
| @@ -362,7 +362,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 362 | if (!record->event.pressed) { | 362 | if (!record->event.pressed) { |
| 363 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 363 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 364 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 364 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 365 | _delay_ms(50); | 365 | wait_ms(50); |
| 366 | SEND_STRING("Good game, everyone!"); | 366 | SEND_STRING("Good game, everyone!"); |
| 367 | register_code(KC_ENTER); | 367 | register_code(KC_ENTER); |
| 368 | unregister_code(KC_ENTER); | 368 | unregister_code(KC_ENTER); |
| @@ -373,7 +373,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 373 | if (!record->event.pressed) { | 373 | if (!record->event.pressed) { |
| 374 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 374 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 375 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 375 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 376 | _delay_ms(50); | 376 | wait_ms(50); |
| 377 | SEND_STRING("Good luck, have fun!!!"); | 377 | SEND_STRING("Good luck, have fun!!!"); |
| 378 | register_code(KC_ENTER); | 378 | register_code(KC_ENTER); |
| 379 | unregister_code(KC_ENTER); | 379 | unregister_code(KC_ENTER); |
| @@ -384,7 +384,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 384 | if (!record->event.pressed) { | 384 | if (!record->event.pressed) { |
| 385 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 385 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 386 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 386 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 387 | _delay_ms(50); | 387 | wait_ms(50); |
| 388 | SEND_STRING("Left click to win!"); | 388 | SEND_STRING("Left click to win!"); |
| 389 | register_code(KC_ENTER); | 389 | register_code(KC_ENTER); |
| 390 | unregister_code(KC_ENTER); | 390 | unregister_code(KC_ENTER); |
| @@ -395,7 +395,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 395 | if (!record->event.pressed) { | 395 | if (!record->event.pressed) { |
| 396 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 396 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 397 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 397 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 398 | _delay_ms(50); | 398 | wait_ms(50); |
| 399 | SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games."); | 399 | SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games."); |
| 400 | register_code(KC_ENTER); | 400 | register_code(KC_ENTER); |
| 401 | unregister_code(KC_ENTER); | 401 | unregister_code(KC_ENTER); |
| @@ -406,7 +406,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 406 | if (!record->event.pressed) { | 406 | if (!record->event.pressed) { |
| 407 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 407 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 408 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 408 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 409 | _delay_ms(50); | 409 | wait_ms(50); |
| 410 | SEND_STRING("That was positively riveting!"); | 410 | SEND_STRING("That was positively riveting!"); |
| 411 | register_code(KC_ENTER); | 411 | register_code(KC_ENTER); |
| 412 | unregister_code(KC_ENTER); | 412 | unregister_code(KC_ENTER); |
| @@ -417,9 +417,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 417 | if (!record->event.pressed) { | 417 | if (!record->event.pressed) { |
| 418 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 418 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 419 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 419 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 420 | _delay_ms(50); | 420 | wait_ms(50); |
| 421 | SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER)); | 421 | SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER)); |
| 422 | _delay_ms(3000); | 422 | wait_ms(3000); |
| 423 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 423 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 424 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 424 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 425 | SEND_STRING("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!" SS_TAP(X_ENTER)); | 425 | SEND_STRING("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!" SS_TAP(X_ENTER)); |
| @@ -430,7 +430,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 430 | if (!record->event.pressed) { | 430 | if (!record->event.pressed) { |
| 431 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 431 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 432 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 432 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 433 | _delay_ms(50); | 433 | wait_ms(50); |
| 434 | SEND_STRING("OMG!!! C9!!!"); | 434 | SEND_STRING("OMG!!! C9!!!"); |
| 435 | register_code(KC_ENTER); | 435 | register_code(KC_ENTER); |
| 436 | unregister_code(KC_ENTER); | 436 | unregister_code(KC_ENTER); |
| @@ -441,7 +441,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 441 | if (!record->event.pressed) { | 441 | if (!record->event.pressed) { |
| 442 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 442 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 443 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | 443 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 444 | _delay_ms(50); | 444 | wait_ms(50); |
| 445 | SEND_STRING("That was a fantastic game, though it was a bit easy. Try harder next time!"); | 445 | SEND_STRING("That was a fantastic game, though it was a bit easy. Try harder next time!"); |
| 446 | register_code(KC_ENTER); | 446 | register_code(KC_ENTER); |
| 447 | unregister_code(KC_ENTER); | 447 | unregister_code(KC_ENTER); |
| @@ -471,16 +471,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 471 | //#elif defined(BOOTLOADER_CATERINA) | 471 | //#elif defined(BOOTLOADER_CATERINA) |
| 472 | // ":avrdude" | 472 | // ":avrdude" |
| 473 | #endif | 473 | #endif |
| 474 | #ifdef RGBLIGHT_ENABLE | ||
| 475 | " RGBLIGHT_ENABLE=yes" | ||
| 476 | #else | ||
| 477 | " RGBLIGHT_ENABLE=no" | ||
| 478 | #endif | ||
| 479 | #ifdef AUDIO_ENABLE | ||
| 480 | " AUDIO_ENABLE=yes" | ||
| 481 | #else | ||
| 482 | " AUDIO_ENABLE=no" | ||
| 483 | #endif | ||
| 484 | SS_TAP(X_ENTER)); | 474 | SS_TAP(X_ENTER)); |
| 485 | } | 475 | } |
| 486 | return false; | 476 | return false; |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index aa9c83086..8354c55c9 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -26,8 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 26 | #define _COLEMAK 1 | 26 | #define _COLEMAK 1 |
| 27 | #define _DVORAK 2 | 27 | #define _DVORAK 2 |
| 28 | #define _WORKMAN 3 | 28 | #define _WORKMAN 3 |
| 29 | #define _NAV 5 | 29 | #define _MODS 4 |
| 30 | #define _COVECUBE 6 | 30 | //#define _MISC 5 |
| 31 | #define _NAV 6 | ||
| 32 | #define _COVECUBE 7 | ||
| 31 | #define _SYMB 8 | 33 | #define _SYMB 8 |
| 32 | #define _GAMEPAD 9 | 34 | #define _GAMEPAD 9 |
| 33 | #define _DIABLO 10 | 35 | #define _DIABLO 10 |
| @@ -142,4 +144,61 @@ enum { | |||
| 142 | #define AUD_OFF AU_OFF | 144 | #define AUD_OFF AU_OFF |
| 143 | #endif | 145 | #endif |
| 144 | 146 | ||
| 147 | |||
| 148 | |||
| 149 | // Since our quirky block definitions are basically a list of comma separated | ||
| 150 | // arguments, we need a wrapper in order for these definitions to be | ||
| 151 | // expanded before being used as arguments to the LAYOUT_xxx macro. | ||
| 152 | #define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) | ||
| 153 | #define KEYMAP_wrapper(...) KEYMAP(__VA_ARGS__) | ||
| 154 | |||
| 155 | // Blocks for each of the four major keyboard layouts | ||
| 156 | // Organized so we can quickly adapt and modify all of them | ||
| 157 | // at once, rather than for each keyboard, one at a time. | ||
| 158 | // And this allows wor much cleaner blocks in the keymaps. | ||
| 159 | // For instance Tap/Hold for Control on all of the layouts | ||
| 160 | |||
| 161 | #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T | ||
| 162 | #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G | ||
| 163 | #define _________________QWERTY_L3_________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B | ||
| 164 | |||
| 165 | #define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P | ||
| 166 | #define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN | ||
| 167 | #define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH) | ||
| 168 | |||
| 169 | |||
| 170 | #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G | ||
| 171 | #define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D | ||
| 172 | #define _________________COLEMAK_L3________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B | ||
| 173 | |||
| 174 | #define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN | ||
| 175 | #define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O | ||
| 176 | #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH) | ||
| 177 | |||
| 178 | |||
| 179 | #define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y | ||
| 180 | #define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I | ||
| 181 | #define _________________DVORAK_L3_________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X | ||
| 182 | |||
| 183 | #define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L | ||
| 184 | #define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S | ||
| 185 | #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z) | ||
| 186 | |||
| 187 | |||
| 188 | #define _________________WORKMAN_L1________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y | ||
| 189 | #define _________________WORKMAN_L2________________ KC_A, KC_O, KC_E, KC_U, KC_I | ||
| 190 | #define _________________WORKMAN_L3________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X | ||
| 191 | |||
| 192 | #define _________________WORKMAN_R1________________ KC_F, KC_G, KC_C, KC_R, KC_L | ||
| 193 | #define _________________WORKMAN_R2________________ KC_D, KC_H, KC_T, KC_N, KC_S | ||
| 194 | #define _________________WORKMAN_R3________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z) | ||
| 195 | |||
| 196 | |||
| 197 | |||
| 198 | // Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN), | ||
| 199 | // this allows us to quickly modify the bottom row for all of the layouts | ||
| 200 | // so we don't have to alter it 4 times and hope that we haven't missed | ||
| 201 | // anything | ||
| 202 | #define ___________ERGODOX_BOTTOM_LEFT_____________ KC_QUOT, KC_LGUI, KC_LBRC, KC_RBRC | ||
| 203 | #define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 145 | #endif | 204 | #endif |
diff --git a/users/drashna/readme.md b/users/drashna/readme.md index e77948ea9..92792fb97 100644 --- a/users/drashna/readme.md +++ b/users/drashna/readme.md | |||
| @@ -20,6 +20,22 @@ This allows for keyboard specific configuration while maintaining the ability to | |||
| 20 | My [Ergodox EZ Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/drashna/keymap.c#L399) is a good example of this, as it uses the LEDs as modifier indicators. | 20 | My [Ergodox EZ Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/drashna/keymap.c#L399) is a good example of this, as it uses the LEDs as modifier indicators. |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | Keyboard Layout Templates | ||
| 24 | ------------------------- | ||
| 25 | |||
| 26 | This borrows from @jola5's "Not quite neo" code. This allows me to maintain blocks of keymaps in the userspace, so that I can modify the userspace, and this is reflected in all of the keyboards that use it, at once. | ||
| 27 | |||
| 28 | This makes adding tap/hold mods, or other special keycodes or functions to all keyboards super easy, as it's done to all of them at once. | ||
| 29 | |||
| 30 | The caveat here is that the keymap needs a processor/wrapper, as it doesn't like the substitutions. However, this is as simple as just pushing it through a define. For instance: | ||
| 31 | |||
| 32 | `#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)` | ||
| 33 | |||
| 34 | Once that's been done and you've switched the keymaps to use the "wrapper", it will read the substitution blocks just fine. | ||
| 35 | |||
| 36 | Credit goes to @jola5 for first implementing this awesome idea. | ||
| 37 | |||
| 38 | |||
| 23 | Custom Keycodes | 39 | Custom Keycodes |
| 24 | --------------- | 40 | --------------- |
| 25 | 41 | ||
