diff options
| author | Drashna Jaelre <drashna@live.com> | 2018-04-20 17:53:19 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-20 17:53:19 -0700 |
| commit | 1bb77c087502de19fe5e403f519be321ba2c85f5 (patch) | |
| tree | 90c7e0c619bd526a0fa61313943dbacee399dea4 /users/drashna | |
| parent | 4e4101efdf1e1d954ccec4aa9be05234e2a699fa (diff) | |
| download | qmk_firmware-1bb77c087502de19fe5e403f519be321ba2c85f5.tar.gz qmk_firmware-1bb77c087502de19fe5e403f519be321ba2c85f5.zip | |
Update to drashna keymaps and userspace (#2756)
* Re-add NO_SECRETS option
* Add Thumb Clusters defines for default layout
* Minor tweaks
* More Minor tweaks
* Revert Orthodox layers and move function keys around
* Fix keymap so it will compile under the Infinity
Since I haven't added 'pretty' layouts to it yet
* Cleanup of userspace
* Cleanup keymaps
* OMG fix Workman
* Move mods layer key around
* Reduce debounce in Ergodox EZ
* Fix Infinity layers
* Add list of pins used by Ergdox EZ for easy reference
* Revert "Reduce debounce in Ergodox EZ"
This reverts commit 8a3db2673b419ef8032c40a6d29156cef632f9cd.
* Add Clicky toggle to Orthodox
* Fix Audio Clicky keycode
* Enable Faux Clicky by default
* Add Unicode stuff
Diffstat (limited to 'users/drashna')
| -rw-r--r-- | users/drashna/config.h | 7 | ||||
| -rw-r--r-- | users/drashna/drashna.c | 68 | ||||
| -rw-r--r-- | users/drashna/drashna.h | 125 | ||||
| -rw-r--r-- | users/drashna/rules.mk | 4 |
4 files changed, 171 insertions, 33 deletions
diff --git a/users/drashna/config.h b/users/drashna/config.h index f9b0d4d17..e48f72355 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #ifdef AUDIO_ENABLE | 5 | #ifdef AUDIO_ENABLE |
| 6 | #define AUDIO_CLICKY | 6 | #define AUDIO_CLICKY |
| 7 | #define AUDIO_CLICKY_ON | ||
| 7 | #define STARTUP_SONG SONG(E1M1_DOOM) | 8 | #define STARTUP_SONG SONG(E1M1_DOOM) |
| 8 | #define GOODBYE_SONG SONG(SONIC_RING) | 9 | #define GOODBYE_SONG SONG(SONIC_RING) |
| 9 | #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ | 10 | #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ |
| @@ -16,7 +17,7 @@ | |||
| 16 | #ifdef RGBLIGHT_ENABLE | 17 | #ifdef RGBLIGHT_ENABLE |
| 17 | #ifndef KEYBOARD_ergodox_ez | 18 | #ifndef KEYBOARD_ergodox_ez |
| 18 | #define RGBLIGHT_SLEEP | 19 | #define RGBLIGHT_SLEEP |
| 19 | #endif | 20 | #endif // !KEYBOARD_ergodox_ez |
| 20 | #endif // RGBLIGHT_ENABLE | 21 | #endif // RGBLIGHT_ENABLE |
| 21 | 22 | ||
| 22 | 23 | ||
| @@ -51,8 +52,8 @@ | |||
| 51 | 52 | ||
| 52 | #ifdef TAPPING_TERM | 53 | #ifdef TAPPING_TERM |
| 53 | #undef TAPPING_TERM | 54 | #undef TAPPING_TERM |
| 54 | #endif | 55 | #endif // TAPPING_TERM |
| 55 | #define TAPPING_TERM 160 | 56 | #define TAPPING_TERM 176 |
| 56 | 57 | ||
| 57 | 58 | ||
| 58 | // Disable action_get_macro and fn_actions, since we don't use these | 59 | // Disable action_get_macro and fn_actions, since we don't use these |
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 73bd249e4..d9d412b08 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -41,8 +41,13 @@ float fauxclicky_pressed[][2] = SONG(S__NOTE(_A6)); // change to you | |||
| 41 | float fauxclicky_released[][2] = SONG(S__NOTE(_A6)); // change to your tastes | 41 | float fauxclicky_released[][2] = SONG(S__NOTE(_A6)); // change to your tastes |
| 42 | #endif // FAUXCLICKY_ENABLE | 42 | #endif // FAUXCLICKY_ENABLE |
| 43 | 43 | ||
| 44 | float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); | ||
| 45 | float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); | ||
| 46 | |||
| 47 | |||
| 44 | bool faux_click_enabled = false; | 48 | bool faux_click_enabled = false; |
| 45 | bool is_overwatch = false; | 49 | bool is_overwatch = false; |
| 50 | static uint16_t copy_paste_timer; | ||
| 46 | #ifdef RGBLIGHT_ENABLE | 51 | #ifdef RGBLIGHT_ENABLE |
| 47 | bool rgb_layer_change = true; | 52 | bool rgb_layer_change = true; |
| 48 | #endif | 53 | #endif |
| @@ -198,17 +203,21 @@ void matrix_scan_user(void) { | |||
| 198 | matrix_scan_keymap(); | 203 | matrix_scan_keymap(); |
| 199 | } | 204 | } |
| 200 | 205 | ||
| 206 | void tap(uint16_t keycode){ | ||
| 207 | register_code(keycode); | ||
| 208 | unregister_code(keycode); | ||
| 209 | }; | ||
| 210 | |||
| 201 | // This block is for all of the gaming macros, as they were all doing | 211 | // This block is for all of the gaming macros, as they were all doing |
| 202 | // the same thing, but with differring text sent. | 212 | // the same thing, but with differring text sent. |
| 203 | bool send_game_macro(const char *str, keyrecord_t *record, bool override) { | 213 | bool send_game_macro(const char *str, keyrecord_t *record, bool override) { |
| 204 | if (!record->event.pressed || override) { | 214 | if (!record->event.pressed || override) { |
| 205 | clear_keyboard(); | 215 | clear_keyboard(); |
| 206 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); | 216 | tap(is_overwatch ? KC_BSPC : KC_ENTER); |
| 207 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); | ||
| 208 | wait_ms(50); | 217 | wait_ms(50); |
| 209 | send_string(str); | 218 | send_string(str); |
| 210 | register_code(KC_ENTER); | 219 | wait_ms(50); |
| 211 | unregister_code(KC_ENTER); | 220 | tap(KC_ENTER); |
| 212 | } | 221 | } |
| 213 | if (override) wait_ms(3000); | 222 | if (override) wait_ms(3000); |
| 214 | return false; | 223 | return false; |
| @@ -402,6 +411,56 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 402 | } | 411 | } |
| 403 | return true; break; | 412 | return true; break; |
| 404 | #endif // RGBLIGHT_ENABLE | 413 | #endif // RGBLIGHT_ENABLE |
| 414 | |||
| 415 | |||
| 416 | case KC_CCCV: // One key copy/paste | ||
| 417 | if(record->event.pressed){ | ||
| 418 | copy_paste_timer = timer_read(); | ||
| 419 | } else { | ||
| 420 | if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy | ||
| 421 | register_code(KC_LCTL); | ||
| 422 | tap(KC_C); | ||
| 423 | unregister_code(KC_LCTL); | ||
| 424 | #ifdef AUDIO_ENABLE | ||
| 425 | PLAY_SONG(tone_copy); | ||
| 426 | #endif | ||
| 427 | } else { // Tap, paste | ||
| 428 | register_code(KC_LCTL); | ||
| 429 | tap(KC_V); | ||
| 430 | unregister_code(KC_LCTL); | ||
| 431 | #ifdef AUDIO_ENABLE | ||
| 432 | PLAY_SONG(tone_paste); | ||
| 433 | #endif | ||
| 434 | } | ||
| 435 | } | ||
| 436 | return false; | ||
| 437 | break; | ||
| 438 | |||
| 439 | #ifdef UNICODE_ENABLE | ||
| 440 | case UC_FLIP: // (╯°□°)╯ ︵ ┻━┻ | ||
| 441 | if (record->event.pressed) { | ||
| 442 | register_code(KC_RSFT); | ||
| 443 | tap(KC_9); | ||
| 444 | unregister_code(KC_RSFT); | ||
| 445 | process_unicode((0x256F | QK_UNICODE), record); // Arm | ||
| 446 | process_unicode((0x00B0 | QK_UNICODE), record); // Eye | ||
| 447 | process_unicode((0x25A1 | QK_UNICODE), record); // Mouth | ||
| 448 | process_unicode((0x00B0 | QK_UNICODE), record); // Eye | ||
| 449 | register_code(KC_RSFT); | ||
| 450 | tap(KC_0); | ||
| 451 | unregister_code(KC_RSFT); | ||
| 452 | process_unicode((0x256F | QK_UNICODE), record); // Arm | ||
| 453 | tap(KC_SPC); | ||
| 454 | process_unicode((0x0361 | QK_UNICODE), record); // Flippy | ||
| 455 | tap(KC_SPC); | ||
| 456 | process_unicode((0x253B | QK_UNICODE), record); // Table | ||
| 457 | process_unicode((0x2501 | QK_UNICODE), record); // Table | ||
| 458 | process_unicode((0x253B | QK_UNICODE), record); // Table | ||
| 459 | } | ||
| 460 | return false; | ||
| 461 | break; | ||
| 462 | #endif // UNICODE_ENABLE | ||
| 463 | |||
| 405 | } | 464 | } |
| 406 | return process_record_keymap(keycode, record); | 465 | return process_record_keymap(keycode, record); |
| 407 | } | 466 | } |
| @@ -413,6 +472,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 413 | uint32_t layer_state_set_user(uint32_t state) { | 472 | uint32_t layer_state_set_user(uint32_t state) { |
| 414 | #ifdef RGBLIGHT_ENABLE | 473 | #ifdef RGBLIGHT_ENABLE |
| 415 | uint8_t default_layer = eeconfig_read_default_layer(); | 474 | uint8_t default_layer = eeconfig_read_default_layer(); |
| 475 | |||
| 416 | if (rgb_layer_change) { | 476 | if (rgb_layer_change) { |
| 417 | switch (biton32(state)) { | 477 | switch (biton32(state)) { |
| 418 | case _NAV: | 478 | case _NAV: |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index b7cbaa44a..746c7e20a 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -20,25 +20,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 20 | #include "quantum.h" | 20 | #include "quantum.h" |
| 21 | 21 | ||
| 22 | // Define layer names | 22 | // Define layer names |
| 23 | #define _QWERTY 0 | 23 | enum userspace_layers { |
| 24 | #define _NUMLOCK 0 | 24 | _QWERTY = 0, |
| 25 | #define _COLEMAK 1 | 25 | _NUMLOCK = 0, |
| 26 | #define _DVORAK 2 | 26 | _COLEMAK, |
| 27 | #define _WORKMAN 3 | 27 | _DVORAK, |
| 28 | #define _MODS 4 | 28 | _WORKMAN, |
| 29 | //#define _MISC 5 | 29 | _MODS, |
| 30 | #define _NAV 6 | 30 | _NAV, |
| 31 | #define _COVECUBE 7 | 31 | _COVECUBE, |
| 32 | #define _SYMB 8 | 32 | _SYMB, |
| 33 | #define _GAMEPAD 9 | 33 | _GAMEPAD, |
| 34 | #define _DIABLO 10 | 34 | _DIABLO, |
| 35 | #define _MOUS 11 | 35 | _MOUS, |
| 36 | #define _MACROS 12 | 36 | _MACROS, |
| 37 | #define _MEDIA 13 | 37 | _MEDIA, |
| 38 | #define _LOWER 14 | 38 | _LOWER, |
| 39 | #define _RAISE 15 | 39 | _RAISE, |
| 40 | #define _ADJUST 16 | 40 | _ADJUST, |
| 41 | 41 | }; | |
| 42 | 42 | ||
| 43 | //define modifiers | 43 | //define modifiers |
| 44 | #define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) | 44 | #define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) |
| @@ -83,6 +83,10 @@ enum userspace_custom_keycodes { | |||
| 83 | KC_SECRET_3, | 83 | KC_SECRET_3, |
| 84 | KC_SECRET_4, | 84 | KC_SECRET_4, |
| 85 | KC_SECRET_5, | 85 | KC_SECRET_5, |
| 86 | KC_CCCV, | ||
| 87 | #ifdef UNICODE_ENABLE | ||
| 88 | UC_FLIP, | ||
| 89 | #endif //UNICODE_ENABLE | ||
| 86 | NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes | 90 | NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes |
| 87 | }; | 91 | }; |
| 88 | 92 | ||
| @@ -107,6 +111,72 @@ enum { | |||
| 107 | }; | 111 | }; |
| 108 | #endif // TAP_DANCE_ENABLE | 112 | #endif // TAP_DANCE_ENABLE |
| 109 | 113 | ||
| 114 | #ifdef UNICODEMAP_ENABLE | ||
| 115 | |||
| 116 | /* use X(n) to call the */ | ||
| 117 | |||
| 118 | |||
| 119 | enum unicode_name { | ||
| 120 | THINK, // thinking face 🤔 | ||
| 121 | GRIN, // grinning face 😊 | ||
| 122 | SMRK, // smirk 😏 | ||
| 123 | WEARY, // good shit 😩 | ||
| 124 | UNAMU, // unamused 😒 | ||
| 125 | |||
| 126 | SNEK, // snke 🐍 | ||
| 127 | PENGUIN, // 🐧 | ||
| 128 | DRAGON, // 🐉 | ||
| 129 | MONKEY, // 🐒 | ||
| 130 | CHICK, // 🐥 | ||
| 131 | |||
| 132 | OKOK, // 👌 | ||
| 133 | EFFU, // 🖕 | ||
| 134 | INUP, // 👆 | ||
| 135 | THUP, // 👍 | ||
| 136 | THDN, // 👎 | ||
| 137 | |||
| 138 | BBB, // dat B 🅱 | ||
| 139 | POO, // poop 💩 | ||
| 140 | HUNDR, // 100 💯 | ||
| 141 | EGGPL, // EGGPLANT 🍆 | ||
| 142 | WATER, // wet 💦 | ||
| 143 | TUMBLER, // 🥃 | ||
| 144 | |||
| 145 | LIT, // fire 🔥 | ||
| 146 | IRONY, // ‽ | ||
| 147 | DEGREE, // ° | ||
| 148 | }; | ||
| 149 | |||
| 150 | |||
| 151 | const uint32_t PROGMEM unicode_map[] = { | ||
| 152 | [THINK] = 0x1F914, | ||
| 153 | [GRIN] = 0x1F600, | ||
| 154 | [BBB] = 0x1F171, | ||
| 155 | [POO] = 0x1F4A9, | ||
| 156 | [HUNDR] = 0x1F4AF, | ||
| 157 | [SMRK] = 0x1F60F, | ||
| 158 | [WEARY] = 0x1F629, | ||
| 159 | [EGGPL] = 0x1F346, | ||
| 160 | [WATER] = 0x1F4A6, | ||
| 161 | [LIT] = 0x1F525, | ||
| 162 | [UNAMU] = 0x1F612, | ||
| 163 | [SNEK] = 0x1F40D, | ||
| 164 | [PENGUIN] = 0x1F427, | ||
| 165 | [BOAR] = 0x1F417, | ||
| 166 | [MONKEY] = 0x1F412, | ||
| 167 | [CHICK] = 0x1F425, | ||
| 168 | [DRAGON] = 0x1F409, | ||
| 169 | [OKOK] = 0x1F44C, | ||
| 170 | [EFFU] = 0x1F595, | ||
| 171 | [INUP] = 0x1F446, | ||
| 172 | [THDN] = 0x1F44E, | ||
| 173 | [THUP] = 0x1F44D, | ||
| 174 | [TUMBLER] = 0x1F943, | ||
| 175 | [IRONY] = 0x0203D, | ||
| 176 | [DEGREE] = 0x000B0, | ||
| 177 | }; | ||
| 178 | |||
| 179 | #endif //UNICODEMAP_ENABLE | ||
| 110 | 180 | ||
| 111 | // Custom Keycodes for Diablo 3 layer | 181 | // Custom Keycodes for Diablo 3 layer |
| 112 | // But since TD() doesn't work when tap dance is disabled | 182 | // But since TD() doesn't work when tap dance is disabled |
| @@ -199,13 +269,13 @@ enum { | |||
| 199 | #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z) | 269 | #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z) |
| 200 | 270 | ||
| 201 | 271 | ||
| 202 | #define _________________WORKMAN_L1________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y | 272 | #define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B |
| 203 | #define _________________WORKMAN_L2________________ KC_A, KC_O, KC_E, KC_U, KC_I | 273 | #define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G |
| 204 | #define _________________WORKMAN_L3________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X | 274 | #define _________________WORKMAN_L3________________ CTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V |
| 205 | 275 | ||
| 206 | #define _________________WORKMAN_R1________________ KC_F, KC_G, KC_C, KC_R, KC_L | 276 | #define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN |
| 207 | #define _________________WORKMAN_R2________________ KC_D, KC_H, KC_T, KC_N, KC_S | 277 | #define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I |
| 208 | #define _________________WORKMAN_R3________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z) | 278 | #define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, CTL_T(KC_SLASH) |
| 209 | 279 | ||
| 210 | 280 | ||
| 211 | #define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K | 281 | #define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K |
| @@ -226,4 +296,9 @@ enum { | |||
| 226 | #define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 296 | #define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
| 227 | 297 | ||
| 228 | 298 | ||
| 299 | #define __________________ERGODOX_THUMB_CLUSTER_____________________ ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), \ | ||
| 300 | KC_HOME, KC_PGUP, \ | ||
| 301 | KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER | ||
| 302 | |||
| 303 | |||
| 229 | #endif | 304 | #endif |
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 062ecd3c4..123c0cc70 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk | |||
| @@ -2,4 +2,6 @@ | |||
| 2 | SRC += drashna.c | 2 | SRC += drashna.c |
| 3 | EXTRAFLAGS += -flto | 3 | EXTRAFLAGS += -flto |
| 4 | 4 | ||
| 5 | 5 | ifeq ($(strip $(NO_SECRETS)), yes) | |
| 6 | OPT_DEFS += -DNO_SECRETS | ||
| 7 | endif | ||
