diff options
| author | FearlessSpiff <fearless.spiff@me.com> | 2022-01-11 00:01:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-10 15:01:32 -0800 |
| commit | 8f630c17b9a6bc6286cbe4435c66033720182803 (patch) | |
| tree | b750ddf3d3ee0dfaa71f47faf019c0782864a882 | |
| parent | 9bcb33f0daec233d02dddaea566442a825e5e307 (diff) | |
| download | qmk_firmware-8f630c17b9a6bc6286cbe4435c66033720182803.tar.gz qmk_firmware-8f630c17b9a6bc6286cbe4435c66033720182803.zip | |
[Keymap] Add Fearless Spiff keymap for Mechwild Mercutio based on Bongocat and Jonavin (#15802)
4 files changed, 343 insertions, 0 deletions
diff --git a/keyboards/mechwild/mercutio/keymaps/fearless_spiff/config.h b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/config.h new file mode 100644 index 000000000..9d588ed8c --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2022 Fearless Spiff | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #define TAPPING_TERM 180 | ||
diff --git a/keyboards/mechwild/mercutio/keymaps/fearless_spiff/keymap.c b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/keymap.c new file mode 100644 index 000000000..ada92103c --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/keymap.c | |||
| @@ -0,0 +1,293 @@ | |||
| 1 | /* Copyright 2021 Kyle McCreery | ||
| 2 | * Copyright 2021 Jonavin Eng | ||
| 3 | * Copyright 2022 Fearless Spiff | ||
| 4 | * | ||
| 5 | * This program is free software: you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation, either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include QMK_KEYBOARD_H | ||
| 20 | #include "keymap_german.h" | ||
| 21 | |||
| 22 | // OLED setup for bongocat | ||
| 23 | #define IDLE_FRAMES 5 | ||
| 24 | #define IDLE_SPEED 30 | ||
| 25 | #define TAP_FRAMES 2 | ||
| 26 | #define TAP_SPEED 40 | ||
| 27 | #define ANIM_FRAME_DURATION 200 | ||
| 28 | #define ANIM_SIZE 512 | ||
| 29 | |||
| 30 | #define LABEL_LENGTH 8 | ||
| 31 | |||
| 32 | #define KC_CAD LALT(LCTL(KC_DEL)) | ||
| 33 | #define KC_TEAMS_CAM C(S(KC_O)) | ||
| 34 | #define KC_TEAMS_MUTE C(S(KC_M)) | ||
| 35 | |||
| 36 | enum layers { | ||
| 37 | QWERT, | ||
| 38 | FN_1, | ||
| 39 | FN_2 | ||
| 40 | }; | ||
| 41 | |||
| 42 | enum custom_user_keycodes { | ||
| 43 | KC_ENC = SAFE_RANGE | ||
| 44 | }; | ||
| 45 | |||
| 46 | static long int oled_timeout = 1800000; // 30 minutes | ||
| 47 | bool gui_on = true; | ||
| 48 | char wpm_str[10]; | ||
| 49 | uint32_t anim_timer = 0; | ||
| 50 | uint32_t anim_sleep = 0; | ||
| 51 | uint8_t current_idle_frame = 0; | ||
| 52 | uint8_t current_tap_frame = 0; | ||
| 53 | |||
| 54 | // Tap Dance declarations | ||
| 55 | enum { | ||
| 56 | TD_TAB_ESC, | ||
| 57 | }; | ||
| 58 | |||
| 59 | // Tap Dance definitions | ||
| 60 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 61 | // Tap once for Tab, twice for Esc | ||
| 62 | [TD_TAB_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, KC_ESC), | ||
| 63 | }; | ||
| 64 | |||
| 65 | typedef struct { | ||
| 66 | char label_top[LABEL_LENGTH]; | ||
| 67 | char label_mid[LABEL_LENGTH]; | ||
| 68 | char label_bottom[LABEL_LENGTH]; | ||
| 69 | uint16_t keycode; | ||
| 70 | } encoder_key; | ||
| 71 | |||
| 72 | static const encoder_key PROGMEM encoder_keys[] = { | ||
| 73 | // list of key codes that will be scrolled through by encoder and description | ||
| 74 | // Be aware that it only works when using one char less than defined. In this case 7 max. No idea why? | ||
| 75 | {"Teams", "Toggle", "Mic", KC_TEAMS_MUTE}, | ||
| 76 | {"Teams", "Toggle", "Cam", KC_TEAMS_CAM}, | ||
| 77 | {"Ctrl", "Alt", "Del", KC_CAD}, | ||
| 78 | {"Caps", "Lock", "", KC_CAPSLOCK}, | ||
| 79 | {"Pause", "", "", KC_PAUSE}, | ||
| 80 | {"PrtScr", "", "", KC_PSCR}, | ||
| 81 | {"Insert", "", "", KC_INS}, | ||
| 82 | {"Play", "", "", KC_MEDIA_PLAY_PAUSE} | ||
| 83 | }; | ||
| 84 | |||
| 85 | #define NUMBER_OF_ENCODER_KEYS sizeof(encoder_keys)/sizeof(encoder_keys[0]) | ||
| 86 | |||
| 87 | static uint8_t selected_encoder_key_id = 0; | ||
| 88 | static encoder_key selected_encoder_key; | ||
| 89 | |||
| 90 | static void set_selected_encoder_key(uint8_t idx) { | ||
| 91 | // make a copy from PROGMEM | ||
| 92 | memcpy_P (&selected_encoder_key, &encoder_keys[idx], sizeof selected_encoder_key); | ||
| 93 | } | ||
| 94 | |||
| 95 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 96 | switch (keycode) { | ||
| 97 | case KC_ENC: | ||
| 98 | if (record->event.pressed) { | ||
| 99 | tap_code16(selected_encoder_key.keycode); | ||
| 100 | } | ||
| 101 | break; | ||
| 102 | } | ||
| 103 | return true; | ||
| 104 | } | ||
| 105 | |||
| 106 | |||
| 107 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 108 | [QWERT] = LAYOUT_all( | ||
| 109 | KC_ENC, | ||
| 110 | TD(TD_TAB_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
| 111 | MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT, | ||
| 112 | KC_LSFT, DE_LABK, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, | ||
| 113 | KC_LCTL, KC_LGUI, KC_LALT, LT(2,KC_SPC), LT(2,KC_SPC), LT(2,KC_SPC), KC_RALT, DE_MINS, KC_RCTL ), | ||
| 114 | |||
| 115 | [FN_1] = LAYOUT_all( | ||
| 116 | KC_MUTE, | ||
| 117 | KC_GESC, _______, _______, _______, DE_LCBR, DE_RCBR, _______, DE_UDIA, KC_UP, DE_ODIA, DE_QUES, KC_DEL, | ||
| 118 | _______, DE_ADIA, DE_SS, _______, DE_LPRN, DE_RPRN, _______, KC_LEFT, KC_DOWN, KC_RIGHT, DE_HASH, _______, | ||
| 119 | _______, DE_CIRC, DE_ACUT, _______, _______, DE_LBRC, DE_RBRC, KC_HOME, KC_END, DE_QUOT, DE_DQUO, DE_EQL, | ||
| 120 | _______, _______, _______, _______, _______, _______, DE_BSLS, DE_SLSH, DE_TILD ), | ||
| 121 | |||
| 122 | [FN_2] = LAYOUT_all( | ||
| 123 | _______, | ||
| 124 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_BSPC, | ||
| 125 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, | ||
| 126 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, | ||
| 127 | _______, _______, _______, _______, _______, _______, _______, _______, _______ ) | ||
| 128 | }; | ||
| 129 | |||
| 130 | #ifdef ENCODER_ENABLE | ||
| 131 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 132 | if (clockwise) { | ||
| 133 | if (IS_LAYER_ON(QWERT) && selected_encoder_key_id < NUMBER_OF_ENCODER_KEYS-1) { | ||
| 134 | selected_encoder_key_id ++; | ||
| 135 | set_selected_encoder_key(selected_encoder_key_id); | ||
| 136 | } | ||
| 137 | if (IS_LAYER_ON(FN_1)) { | ||
| 138 | tap_code16(KC_PGDOWN); | ||
| 139 | } | ||
| 140 | if (IS_LAYER_ON(FN_2)) { | ||
| 141 | tap_code(KC_VOLU); | ||
| 142 | } | ||
| 143 | } else { | ||
| 144 | if (IS_LAYER_ON(QWERT) && selected_encoder_key_id > 0) { | ||
| 145 | selected_encoder_key_id --; | ||
| 146 | set_selected_encoder_key(selected_encoder_key_id); | ||
| 147 | } | ||
| 148 | if (IS_LAYER_ON(FN_1)) { | ||
| 149 | tap_code16(KC_PGUP); | ||
| 150 | } | ||
| 151 | if (IS_LAYER_ON(FN_2)) { | ||
| 152 | tap_code(KC_VOLD); | ||
| 153 | } | ||
| 154 | } | ||
| 155 | return true; | ||
| 156 | } | ||
| 157 | #endif | ||
| 158 | |||
| 159 | #ifdef OLED_ENABLE | ||
| 160 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 161 | set_selected_encoder_key(selected_encoder_key_id); | ||
| 162 | |||
| 163 | return OLED_ROTATION_180; // flips the display 180 degrees | ||
| 164 | } | ||
| 165 | |||
| 166 | static void render_anim(void) { | ||
| 167 | |||
| 168 | // Idle animation | ||
| 169 | static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { | ||
| 170 | |||
| 171 | { | ||
| 172 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, | ||
| 173 | 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7, | ||
| 174 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
| 175 | }, | ||
| 176 | |||
| 177 | { | ||
| 178 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, | ||
| 179 | 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8, | ||
| 180 | 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
| 181 | }, | ||
| 182 | |||
| 183 | { | ||
| 184 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,32,32,32,32,16,8,4,2,2,4,24,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,194,1,1,2,2,4,4,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,0,129,130,130,132,8,16,32,64,128,0,0,0,0,128,128,128,128,64,64,64,64,32, | ||
| 185 | 32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,25,6,0,0,0,0,0,0,0,24,24,24,27,3,0,64,160,34,36,20,18,18,18,11,8,8,8,8,5,5,9,9,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0, | ||
| 186 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
| 187 | }, | ||
| 188 | |||
| 189 | { | ||
| 190 | 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, | ||
| 191 | 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8, | ||
| 192 | 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
| 193 | }, | ||
| 194 | |||
| 195 | { | ||
| 196 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,8,4,2,2,2,4,56,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,226,1,1,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64, | ||
| 197 | 32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0, | ||
| 198 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
| 199 | } | ||
| 200 | |||
| 201 | }; | ||
| 202 | |||
| 203 | // Prep animation | ||
| 204 | static const char PROGMEM prep[][ANIM_SIZE] = { | ||
| 205 | |||
| 206 | { | ||
| 207 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64, | ||
| 208 | 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,195,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0, | ||
| 209 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
| 210 | } | ||
| 211 | |||
| 212 | }; | ||
| 213 | |||
| 214 | // Typing animation | ||
| 215 | static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { | ||
| 216 | |||
| 217 | { | ||
| 218 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,248,248,248,248,0,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,1,2,4,8,16,32,67,135,7,1,0,184,188,190,159, | ||
| 219 | 95,95,79,76,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,67,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,61,124,252,252,252,252,252,60,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1, | ||
| 220 | 1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
| 221 | }, | ||
| 222 | |||
| 223 | { | ||
| 224 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,64,64,32, | ||
| 225 | 32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,0,0,0,1,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,122,122,121,121,121,121,57,49,2,2,4,4,8,8,8,136,136,135,128, | ||
| 226 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
| 227 | } | ||
| 228 | |||
| 229 | }; | ||
| 230 | |||
| 231 | void animation_phase(void) { | ||
| 232 | if (get_current_wpm() <= IDLE_SPEED) { | ||
| 233 | current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; | ||
| 234 | oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); | ||
| 235 | } | ||
| 236 | |||
| 237 | if (get_current_wpm() > IDLE_SPEED && get_current_wpm() < TAP_SPEED) { | ||
| 238 | oled_write_raw_P(prep[0], ANIM_SIZE); | ||
| 239 | } | ||
| 240 | |||
| 241 | if (get_current_wpm() >= TAP_SPEED) { | ||
| 242 | current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; | ||
| 243 | oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); | ||
| 244 | } | ||
| 245 | } | ||
| 246 | |||
| 247 | if (get_current_wpm() != 000) { | ||
| 248 | oled_on(); | ||
| 249 | |||
| 250 | if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { | ||
| 251 | anim_timer = timer_read32(); | ||
| 252 | animation_phase(); | ||
| 253 | } | ||
| 254 | |||
| 255 | anim_sleep = timer_read32(); | ||
| 256 | } else { | ||
| 257 | if (timer_elapsed32(anim_sleep) > oled_timeout) { | ||
| 258 | oled_off(); | ||
| 259 | } else { | ||
| 260 | if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { | ||
| 261 | anim_timer = timer_read32(); | ||
| 262 | animation_phase(); | ||
| 263 | } | ||
| 264 | } | ||
| 265 | } | ||
| 266 | } | ||
| 267 | |||
| 268 | bool oled_task_user(void) { | ||
| 269 | |||
| 270 | render_anim(); | ||
| 271 | |||
| 272 | oled_set_cursor(0,0); | ||
| 273 | oled_write(selected_encoder_key.label_top, false); | ||
| 274 | |||
| 275 | oled_set_cursor(0,1); | ||
| 276 | oled_write(selected_encoder_key.label_mid, false); | ||
| 277 | |||
| 278 | oled_set_cursor(0,2); | ||
| 279 | oled_write(selected_encoder_key.label_bottom, false); | ||
| 280 | |||
| 281 | /* hide wpm display for now | ||
| 282 | oled_set_cursor(13,3); | ||
| 283 | oled_write_P(PSTR("WPM: "), false); | ||
| 284 | oled_write(get_u8_str(get_current_wpm(), ' '), false); | ||
| 285 | */ | ||
| 286 | |||
| 287 | return true; | ||
| 288 | } | ||
| 289 | |||
| 290 | void suspend_power_down_user(void) { | ||
| 291 | oled_off(); | ||
| 292 | } | ||
| 293 | #endif | ||
diff --git a/keyboards/mechwild/mercutio/keymaps/fearless_spiff/readme.md b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/readme.md new file mode 100644 index 000000000..33240ffbc --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/readme.md | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | Fearless Spiff's Custom Mercutio Keymap | ||
| 2 | - "Programmer"-centric and German layout based keymap | ||
| 3 | - Based on Bongocat and Jonavin keymap | ||
| 4 | |||
| 5 | Features | ||
| 6 | - Fancy Bongocat! Yay! (borrowed from bongocat obviously) | ||
| 7 | - Encoder selectable key codes and displayed on OLED (borrowed and multi-line-enhanced from Jonavin) | ||
| 8 | - Change encoder_keys in keymap.c to assign your desired key selection | ||
| 9 | - Additional encoder functionality | ||
| 10 | - While holding FN_1, page up and down | ||
| 11 | - While holding FN_2, volume up and down | ||
| 12 | - Use my templates for your own layout overview at [Keyboard Layout Editor](http://www.keyboard-layout-editor.com) using my gist [here](https://gist.github.com/FearlessSpiff) | ||
| 13 | |||
| 14 | QWERT Layer | ||
| 15 |  | ||
| 16 | |||
| 17 | FN_1 Layer | ||
| 18 |  | ||
| 19 | |||
| 20 | FN_2 layer | ||
| 21 |  | ||
| 22 | |||
| 23 | |||
| 24 | |||
diff --git a/keyboards/mechwild/mercutio/keymaps/fearless_spiff/rules.mk b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/rules.mk new file mode 100644 index 000000000..16f26944e --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/rules.mk | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | WPM_ENABLE = yes | ||
| 2 | TAP_DANCE_ENABLE = yes | ||
| 3 | VIA_ENABLE = no | ||
| 4 | MOUSEKEY_ENABLE = no | ||
| 5 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 6 | KEY_LOCK_ENABLE = no | ||
| 7 | CONSOLE_ENABLE = no | ||
