diff options
Diffstat (limited to 'keyboards/planck')
| -rw-r--r-- | keyboards/planck/keymaps/jweickm/config.h | 69 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/jweickm/keymap.c | 1131 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/jweickm/readme.md | 154 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/jweickm/rules.mk | 5 | ||||
| -rw-r--r-- | keyboards/planck/planck.h | 20 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/chconf.h | 29 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/config.h | 128 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/halconf.h | 23 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/info.json | 262 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/matrix.c | 166 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/mcuconf.h | 44 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/readme.md | 13 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/rev6_drop.c | 44 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/rev6_drop.h | 108 | ||||
| -rw-r--r-- | keyboards/planck/rev6_drop/rules.mk | 33 |
15 files changed, 2228 insertions, 1 deletions
diff --git a/keyboards/planck/keymaps/jweickm/config.h b/keyboards/planck/keymaps/jweickm/config.h new file mode 100644 index 000000000..3b34ddf83 --- /dev/null +++ b/keyboards/planck/keymaps/jweickm/config.h | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * 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/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #ifdef AUDIO_ENABLE | ||
| 20 | #define STARTUP_SONG SONG(PLANCK_SOUND) | ||
| 21 | // #define STARTUP_SONG SONG(NO_SOUND) | ||
| 22 | |||
| 23 | #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ | ||
| 24 | SONG(COLEMAK_SOUND), \ | ||
| 25 | SONG(DVORAK_SOUND), \ | ||
| 26 | SONG(WORKMAN_SOUND), \ | ||
| 27 | SONG(PLOVER_SOUND), \ | ||
| 28 | SONG(STARTUP_SOUND), \ | ||
| 29 | SONG(PREONIC_SOUND), \ | ||
| 30 | SONG(GOODBYE_SOUND), \ | ||
| 31 | } | ||
| 32 | #endif | ||
| 33 | |||
| 34 | /* | ||
| 35 | * MIDI options | ||
| 36 | */ | ||
| 37 | |||
| 38 | /* enable basic MIDI features: | ||
| 39 | - MIDI notes can be sent when in Music mode is on | ||
| 40 | */ | ||
| 41 | |||
| 42 | #define MIDI_BASIC | ||
| 43 | |||
| 44 | /* enable advanced MIDI features: | ||
| 45 | - MIDI notes can be added to the keymap | ||
| 46 | - Octave shift and transpose | ||
| 47 | - Virtual sustain, portamento, and modulation wheel | ||
| 48 | - etc. | ||
| 49 | */ | ||
| 50 | //#define MIDI_ADVANCED | ||
| 51 | |||
| 52 | |||
| 53 | // Most tactile encoders have detents every 4 stages | ||
| 54 | #define ENCODER_RESOLUTION 4 | ||
| 55 | |||
| 56 | // settings for HOME ROW MODS | ||
| 57 | #define TAPPING_TERM 160 // 200 ms is the default value | ||
| 58 | #define TAPPING_TERM_PER_KEY | ||
| 59 | //#define PERMISSIVE_HOLD | ||
| 60 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 61 | #define TAPPING_FORCE_HOLD_PER_KEY | ||
| 62 | |||
| 63 | // settings for LEADER key | ||
| 64 | #define LEADER_PER_KEY_TIMING | ||
| 65 | #define LEADER_TIMEOUT 250 | ||
| 66 | #define LEADER_NO_TIMEOUT | ||
| 67 | |||
| 68 | #define RGBLIGHT_SLEEP // RGB lighting will switch off when the host goes to sleep | ||
| 69 | #define RGBLIGHT_LAYERS | ||
diff --git a/keyboards/planck/keymaps/jweickm/keymap.c b/keyboards/planck/keymaps/jweickm/keymap.c new file mode 100644 index 000000000..02138a876 --- /dev/null +++ b/keyboards/planck/keymaps/jweickm/keymap.c | |||
| @@ -0,0 +1,1131 @@ | |||
| 1 | /* Copyright 2015-2017 Jack Humbert | ||
| 2 | * Copyright 2021 Jakob Weickmann | ||
| 3 | * | ||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * 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/>. | ||
| 16 | */ | ||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | #include "muse.h" | ||
| 19 | |||
| 20 | enum planck_layers { | ||
| 21 | _HRWIDECOLEMAK, | ||
| 22 | _HRWIDECOLEMAK_DE, | ||
| 23 | _GAMING, | ||
| 24 | _WIDECOLEMAK, | ||
| 25 | _LOWER, | ||
| 26 | _RAISE, | ||
| 27 | _LOWER_DE, | ||
| 28 | _RAISE_DE, | ||
| 29 | _ADJUST, | ||
| 30 | _NAV, | ||
| 31 | _VIM, | ||
| 32 | _NUM, | ||
| 33 | _MOUSE, | ||
| 34 | }; | ||
| 35 | |||
| 36 | enum planck_keycodes { HRWIDECOLEMAK = SAFE_RANGE, GAMING, WIDECOLEMAK, TG_COLEMAK, VIM_O, VIM_V, KC_SVD_BD, KC_SVU_BU, KC_TAB_MPLY, ALT_TAB, CTL_TAB, DE_ae, DE_oe, DE_ue, DE_AE, DE_OE, DE_SZ, DE_EGRAVE, DE_EAIGU, KC_CURRENCY, KC_DE_SWITCH, LANG_SWITCH, DE_SLSH_QUST, DE_QUOT, DE_SCLN, DE_BSLS, M_ESCM, M_RGUI_SCLN, DE_DOT_RAB, DE_COMM_LAB }; | ||
| 37 | |||
| 38 | // Tap Dance declarations | ||
| 39 | enum tap_dance_codes { | ||
| 40 | TD_PRN, // round brackets (parentheses) | ||
| 41 | TD_PRN_DE, // round brackets (parentheses) | ||
| 42 | TD_BRC, // square brackets | ||
| 43 | TD_BRC_DE, // square brackets | ||
| 44 | TD_CBR, // curly brackets | ||
| 45 | TD_CBR_DE, // curly brackets | ||
| 46 | TD_VIM_GG // single tap to scroll down, double tap to scroll up | ||
| 47 | }; | ||
| 48 | |||
| 49 | #define LOWER MO(_LOWER) | ||
| 50 | #define RAISE MO(_RAISE) | ||
| 51 | |||
| 52 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 53 | |||
| 54 | /* _HRWIDECOLEMAK | ||
| 55 | * ,-----------------------------------------------------------------------------------. | ||
| 56 | * | G-Q | A-W | S-F | C-P |_Num-B|Vol/B+|_Num-J| C-L | S-U | A-Y | G-/ | ü | | ||
| 57 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 58 | * | A | R | S | T | G | TAB | M | N | E | I | O | ' | | ||
| 59 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 60 | * |_Mo-Z | X | C | D | V |Vol/B-| K | H | , | . |_Mo-/ | \ | | ||
| 61 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 62 | * |C-CAPS| LEAD | BSPC |_L-ESC| LSFT | _Nav-SPC |_R-ENT|S-DEL | RALT |_Mo <-|_Mo ->| | ||
| 63 | * `-----------------------------------------------------------------------------------' | ||
| 64 | */ | ||
| 65 | [_HRWIDECOLEMAK] = LAYOUT_planck_grid( | ||
| 66 | LGUI_T(KC_Q), LALT_T(KC_W), LSFT_T(KC_F), LCTL_T(KC_P), LT(_NUM, KC_B), KC_SVU_BU, LT(_NUM, KC_J), RCTL_T(KC_L), RSFT_T(KC_U), LALT_T(KC_Y), RGUI_T(KC_SCLN), DE_ue, | ||
| 67 | KC_A, KC_R, KC_S, KC_T, KC_G, KC_TAB, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | ||
| 68 | LT(_MOUSE, KC_Z), KC_X, KC_C, KC_D, KC_V, KC_SVD_BD, KC_K, KC_H, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_BSLS, | ||
| 69 | LCTL_T(KC_CAPS), KC_LEAD, KC_BSPC, LT(_LOWER, KC_ESC), OSM(MOD_LSFT), LT(_NAV, KC_SPC), LT(_NAV, KC_SPC), LT(_RAISE, KC_ENT), RSFT_T(KC_DEL), KC_RALT, LT(_MOUSE, KC_LEFT), LT(_MOUSE, KC_RIGHT) | ||
| 70 | ), | ||
| 71 | |||
| 72 | /* _HRWIDECOLEMAK_DE | ||
| 73 | * same as above, when the PC is set to German layout | ||
| 74 | * ,-----------------------------------------------------------------------------------. | ||
| 75 | * | G-Q | A-W | S-F | C-P |_Num-B|Vol/B+|_Num-J| C-L | S-U | A-Y | G-/ | ü | | ||
| 76 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 77 | * | A | R | S | T | G | TAB | M | N | E | I | O | ' | | ||
| 78 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 79 | * |_Mo-Z | X | C | D | V |Vol/B-| K | H | , | . |_Mo-/ | \ | | ||
| 80 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 81 | * |C-CAPS| LEAD | BSPC |_L-ESC| LSFT | _Nav-SPC |_R-ENT|S-DEL | RALT |_Mo <-|_Mo ->| | ||
| 82 | * `-----------------------------------------------------------------------------------' | ||
| 83 | */ | ||
| 84 | [_HRWIDECOLEMAK_DE] = LAYOUT_planck_grid( | ||
| 85 | LGUI_T(KC_Q), LALT_T(KC_W), LSFT_T(KC_F), LCTL_T(KC_P), LT(_NUM, KC_B), KC_SVU_BU, LT(_NUM, KC_J), RCTL_T(KC_L), RSFT_T(KC_U), LALT_T(KC_Z), M_RGUI_SCLN, KC_LBRC, | ||
| 86 | KC_A, KC_R, KC_S, KC_T, KC_G, KC_TAB, KC_M, KC_N, KC_E, KC_I, KC_O, DE_QUOT, | ||
| 87 | LT(_MOUSE, KC_Y), KC_X, KC_C, KC_D, KC_V, KC_SVD_BD, KC_K, KC_H, DE_COMM_LAB, DE_DOT_RAB, DE_SLSH_QUST, DE_BSLS, | ||
| 88 | LCTL_T(KC_CAPS), KC_LEAD, KC_BSPC, LT(_LOWER_DE, KC_ESC), OSM(MOD_LSFT), LT(_NAV, KC_SPC), LT(_NAV, KC_SPC), LT(_RAISE_DE, KC_ENT), RSFT_T(KC_DEL), KC_RALT, LT(_MOUSE, KC_LEFT), LT(_MOUSE, KC_RIGHT) | ||
| 89 | ), | ||
| 90 | |||
| 91 | /* _GAMING | ||
| 92 | * ,-----------------------------------------------------------------------------------. | ||
| 93 | * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | F5 | F8 | F9 |Vol/B+| | ||
| 94 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 95 | * | TAB | Q | W | E | R | T | Y | U | I | O | P |Vol/B-| | ||
| 96 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 97 | * | LSFT | A | S | D | F | G | H | J | Z | M | ; |_CM-EN| | ||
| 98 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 99 | * | LCTL | C | B | X | LALT | SPACE | ENT | RALT | ____ | ____ | !GAME| | ||
| 100 | * `-----------------------------------------------------------------------------------' | ||
| 101 | */ | ||
| 102 | [_GAMING] = LAYOUT_planck_grid( | ||
| 103 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_F5, KC_F8, KC_F9, KC_VOLU, | ||
| 104 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_VOLD, | ||
| 105 | KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_Z, KC_M, KC_SCLN, TG_COLEMAK, | ||
| 106 | KC_LCTL, KC_C, KC_B, KC_X, KC_LALT, KC_SPC, KC_SPC, KC_ENT, KC_RALT, KC_TRNS, KC_TRNS, GAMING | ||
| 107 | ), | ||
| 108 | |||
| 109 | /* WIDECOLEMAK | ||
| 110 | * no mod taps | ||
| 111 | * ,-----------------------------------------------------------------------------------. | ||
| 112 | * | Q | W | F | P | B |Vol/B+| J | L | U | Y | / | Ü | | ||
| 113 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 114 | * | A | R | S | T | G | TAB | M | N | E | I | O | ' | | ||
| 115 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 116 | * | Z | X | C | D | V |Vol/B-| K | H | , | . | / |!CM-EN| | ||
| 117 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 118 | * |C-CAPS|G-TAB |MN-ESC|_L-BSP| LSFT | _NAV-SPC |_R-ENT|S-DEL |C-TAB |_Mo <-|_Mo ->| | ||
| 119 | * `-----------------------------------------------------------------------------------' | ||
| 120 | */ | ||
| 121 | [_WIDECOLEMAK] = LAYOUT_planck_grid( | ||
| 122 | KC_Q, KC_W, KC_F, KC_P, KC_B, KC_SVU_BU, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, DE_ue, | ||
| 123 | KC_A, KC_R, KC_S, KC_T, KC_G, KC_TAB_MPLY, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | ||
| 124 | KC_Z, KC_X, KC_C, KC_D, KC_V, KC_SVD_BD, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, TG_COLEMAK, | ||
| 125 | LCTL_T(KC_CAPS), LGUI_T(KC_TAB), M_ESCM, LT(_LOWER_DE, KC_BSPC), OSM(MOD_LSFT), LT(_NAV, KC_SPC), LT(_NAV, KC_SPC), LT(_RAISE, KC_ENT), RSFT_T(KC_DEL), KC_LALT, LT(_MOUSE, KC_LEFT), LT(_MOUSE, KC_RIGHT) | ||
| 126 | ), | ||
| 127 | |||
| 128 | /* _LOWER | ||
| 129 | * ,-----------------------------------------------------------------------------------. | ||
| 130 | * | ! | @ | # | $ | % | ~ | ^ | & | * | ( | ) | Ö | | ||
| 131 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 132 | * | F1 | F2 | F3 | F4 | F5 | F6 | ß | _ | + | { | } | Ä | | ||
| 133 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 134 | * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | / | \ | | | € | è | | ||
| 135 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 136 | * |!MOUSE| ____ | ____ | ____ | ____ | ____ | ____ | Vol- | Vol+ | ↓ | ↑ | | ||
| 137 | * `-----------------------------------------------------------------------------------' | ||
| 138 | */ | ||
| 139 | [_LOWER] = LAYOUT_planck_grid( | ||
| 140 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TILD, KC_CIRC, KC_AMPR, KC_ASTR, TD(TD_PRN), KC_RPRN, DE_OE, | ||
| 141 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_SZ, KC_UNDS, KC_PLUS, TD(TD_CBR), KC_RCBR, DE_AE, | ||
| 142 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_SLSH, KC_NUBS, LSFT(KC_NUBS), KC_CURRENCY, DE_EGRAVE, | ||
| 143 | TG(_MOUSE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_DOWN, KC_UP | ||
| 144 | ), | ||
| 145 | |||
| 146 | /* _LOWER_DE | ||
| 147 | * ,-----------------------------------------------------------------------------------. | ||
| 148 | * | ! | @ | # | $ | % | ~ | ^ | & | * | ( | ) | Ö | | ||
| 149 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 150 | * | F1 | F2 | F3 | F4 | F5 | F6 | ß | _ | + | { | } | Ä | | ||
| 151 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 152 | * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | / | \ | | | € | ` | | ||
| 153 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 154 | * |!MOUSE| ____ | ____ | ____ | ____ | ____ | ____ | Vol- | Vol+ | ↓ | ↑ | | ||
| 155 | * `-----------------------------------------------------------------------------------' | ||
| 156 | */ | ||
| 157 | [_LOWER_DE] = LAYOUT_planck_grid( | ||
| 158 | KC_EXLM, RALT(KC_Q), KC_BSLS, KC_DLR, KC_PERC, RALT(KC_RBRC), KC_GRV, KC_CIRC, KC_RCBR, TD(TD_PRN_DE), KC_LPRN, LSFT(KC_SCLN), | ||
| 159 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, LSFT(KC_SLSH), KC_RBRC, TD(TD_CBR_DE), RALT(KC_0), LSFT(KC_QUOT), | ||
| 160 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, LSFT(KC_7), RALT(KC_MINS), RALT(KC_NUBS), KC_CURRENCY, KC_PLUS, | ||
| 161 | TG(_MOUSE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_DOWN, KC_UP | ||
| 162 | ), | ||
| 163 | |||
| 164 | /* _RAISE | ||
| 165 | * ,-----------------------------------------------------------------------------------. | ||
| 166 | * | 1 | 2 | 3 | 4 | 5 | ` | 6 | 7 | 8 | 9 | 0 | ö | | ||
| 167 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 168 | * | F1 | F2 | F3 | F4 | F5 | F6 | ß | - | = | [ | ] | ä | | ||
| 169 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 170 | * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | \ | , | . | / | é | | ||
| 171 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 172 | * |!MOUSE| ____ | ____ | BSPC | ____ | ____ | ____ | |<< | >>| | ↓ | ↑ | | ||
| 173 | * `-----------------------------------------------------------------------------------' | ||
| 174 | */ | ||
| 175 | [_RAISE] = LAYOUT_planck_grid( | ||
| 176 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_6, KC_7, KC_8, KC_9, KC_0, DE_oe, | ||
| 177 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_SZ, KC_MINS, KC_EQL, TD(TD_BRC), KC_RBRC, DE_ae, | ||
| 178 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_BSLS, KC_COMM, KC_DOT, KC_SLSH, DE_EAIGU, | ||
| 179 | TG(_MOUSE), KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_DOWN, KC_UP | ||
| 180 | ), | ||
| 181 | |||
| 182 | /* _RAISE_DE | ||
| 183 | * ,-----------------------------------------------------------------------------------. | ||
| 184 | * | 1 | 2 | 3 | 4 | 5 | ` | 6 | 7 | 8 | 9 | 0 | ö | | ||
| 185 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 186 | * | F1 | F2 | F3 | F4 | F5 | F6 | ß | - | = | [ | ] | ä | | ||
| 187 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 188 | * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | \ | , | . | / | ´ | | ||
| 189 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 190 | * |!MOUSE| ____ | ____ | BSPC | ____ | ____ | ____ | |<< | >>| | ↓ | ↑ | | ||
| 191 | * `-----------------------------------------------------------------------------------' | ||
| 192 | */ | ||
| 193 | [_RAISE_DE] = LAYOUT_planck_grid( | ||
| 194 | KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_GRV), KC_6, KC_7, KC_8, KC_9, KC_0, KC_SCLN, | ||
| 195 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_SLSH, LSFT(KC_0), TD(TD_BRC_DE), RALT(KC_9), KC_QUOT, | ||
| 196 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, RALT(KC_MINS), KC_COMM, KC_DOT, DE_SLSH_QUST, KC_EQL, | ||
| 197 | TG(_MOUSE), KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_DOWN, KC_UP | ||
| 198 | ), | ||
| 199 | |||
| 200 | /* _ADJUST | ||
| 201 | * ,-----------------------------------------------------------------------------------. | ||
| 202 | * | A-SFT| RESET| DEBUG|RGBTOG|RGBMOD|RGBHUI|RGBHUD|RGBSAI|RGBSAD|RGBVAI|RGBVAD| DE_SW| | ||
| 203 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 204 | * | A-GRV|EEPRST|MU_MOD| AU_ON|AU_OFF|AGNORM|AGSWAP|!HRWCM| !WCM | A-GRV| !LANG| !GAME| | ||
| 205 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 206 | * | ____ |MUV_DE|MUV_IN| MU_ON|MU_OFF| MI_ON|MI_OFF| Vol- | MPLY | Vol+ | ____ | ____ | | ||
| 207 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 208 | * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |EEPRST| | ||
| 209 | * `-----------------------------------------------------------------------------------' | ||
| 210 | */ | ||
| 211 | [_ADJUST] = LAYOUT_planck_grid( | ||
| 212 | LALT(KC_LSFT), RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DE_SWITCH, | ||
| 213 | LALT(KC_GRV), EEP_RST, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, HRWIDECOLEMAK, WIDECOLEMAK, LALT(KC_GRV), LANG_SWITCH, GAMING, | ||
| 214 | KC_TRNS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, KC_SVD_BD, KC_MPLY, KC_SVU_BU, KC_TRNS, KC_TRNS, | ||
| 215 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEPROM_RESET | ||
| 216 | ), | ||
| 217 | |||
| 218 | /* _NAV | ||
| 219 | * ,-----------------------------------------------------------------------------------. | ||
| 220 | * |A(TAB)| C(->)| !LANG|A(GRV)| C(<-)| >>| | HOME | -> | PGUP | COPY | PASTE| DE_SW| | ||
| 221 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 222 | * |C(TAB)| TAB | ESC | ENT |VIM_GG| MPLY | <- | ↓ | ↑ | -> | END | VIM_O| | ||
| 223 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 224 | * | LSFT | XXXX |S(DEL)| CAPS | VIM_V| MUTE | HOME | PGDN | LSFT | RFST | C(F) | C(F) | | ||
| 225 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 226 | * | XXXX | XXXX | ____ | BSPC | ____ | ____ | ENT | DEL | ____ | ____ | DE_SW| | ||
| 227 | * `-----------------------------------------------------------------------------------' | ||
| 228 | */ | ||
| 229 | [_NAV] = LAYOUT_planck_grid( | ||
| 230 | ALT_TAB, LCTL(KC_RGHT), LANG_SWITCH, LALT(KC_GRV), LCTL(KC_LEFT), KC_MNXT, KC_HOME, KC_RIGHT, KC_PGUP, LCTL(KC_INS), LSFT(KC_INS), KC_DE_SWITCH, | ||
| 231 | CTL_TAB, KC_TAB, KC_ESC, KC_ENT, TD(TD_VIM_GG), KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, VIM_O, | ||
| 232 | KC_LSFT, KC_NO, LSFT(KC_DEL), KC_CAPS, VIM_V, KC_MUTE, KC_HOME, KC_PGDN, KC_LSFT, KC_RSFT, LCTL(KC_F), LCTL(KC_F), | ||
| 233 | KC_NO, KC_NO, KC_TRNS, KC_BSPC, KC_TRNS, LT(_NAV, KC_SPC), LT(_NAV, KC_SPC), KC_ENT, KC_DEL, KC_TRNS, KC_TRNS, KC_DE_SWITCH | ||
| 234 | ), | ||
| 235 | |||
| 236 | /* _VIM | ||
| 237 | * ,-----------------------------------------------------------------------------------. | ||
| 238 | * |A(TAB)| C(->)| !LANG|A(GRV)| C(<-)| >>| | HOME | -> | PGUP | COPY | PASTE| DE_SW| | ||
| 239 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 240 | * |C(TAB)| TAB | ESC | ENT |VIM_GG| MPLY | <- | ↓ | ↑ | -> | END | VIM_O| | ||
| 241 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 242 | * | LSFT | XXXX |S(DEL)| CAPS | VIM_V| MUTE | HOME | PGDN | LSFT | RFST | C(F) | C(F) | | ||
| 243 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 244 | * | XXXX | XXXX | !VIM | BSPC | ____ | ____ | ENT | DEL | ____ | ↓ | ↑ | | ||
| 245 | * `-----------------------------------------------------------------------------------' | ||
| 246 | */ | ||
| 247 | [_VIM] = LAYOUT_planck_grid( | ||
| 248 | ALT_TAB, LCTL(KC_RGHT), LANG_SWITCH, LALT(KC_GRV), LCTL(KC_LEFT), KC_MNXT, KC_HOME, KC_RIGHT, KC_PGUP, LCTL(KC_INS), LSFT(KC_INS), KC_DE_SWITCH, | ||
| 249 | CTL_TAB, KC_TAB, KC_ESC, KC_ENT, TD(TD_VIM_GG), KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, VIM_O, | ||
| 250 | KC_LSFT, KC_NO, LSFT(KC_DEL), KC_CAPS, VIM_V, KC_MUTE, KC_HOME, KC_PGDN, KC_LSFT, KC_RSFT, LCTL(KC_F), LCTL(KC_F), | ||
| 251 | KC_NO, KC_NO, TG(_VIM), KC_BSPC, KC_TRNS, LT(_NAV, KC_SPC), LT(_NAV, KC_SPC), KC_ENT, KC_DEL, KC_TRNS, KC_DOWN, KC_UP | ||
| 252 | ), | ||
| 253 | |||
| 254 | /* _NUM | ||
| 255 | * ,-----------------------------------------------------------------------------------. | ||
| 256 | * | F1 | F2 | F3 | F4 | |<< |NUMLCK| >>| | 7 | 8 | 9 | - | ____ | | ||
| 257 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 258 | * | F5 | F6 | F7 | F8 | Vol+ | MPLY | * | 4 | 5 | 6 | + | . | | ||
| 259 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 260 | * | F9 | F10 | F11 | F12 | Vol- | MUTE | = | 1 | 2 | 3 | / | , | | ||
| 261 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 262 | * | ____ | ____ | ____ | ____ | ____ | ____ | 0 | . | , | = | ____ | | ||
| 263 | * `-----------------------------------------------------------------------------------' | ||
| 264 | */ | ||
| 265 | [_NUM] = LAYOUT_planck_grid( | ||
| 266 | KC_F1, KC_F2, KC_F3, KC_F4, KC_MPRV, KC_NLCK, KC_MNXT, KC_P7, KC_P8, KC_P9, KC_MINS, KC_TRNS, | ||
| 267 | KC_F5, KC_F6, KC_F7, KC_F8, KC_VOLU, KC_MPLY, KC_ASTR, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_DOT, | ||
| 268 | KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_MUTE, KC_EQL, KC_P1, KC_P2, KC_P3, KC_SLSH, KC_COMM, | ||
| 269 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_DOT, KC_COMM, KC_EQL, KC_TRNS | ||
| 270 | ), | ||
| 271 | |||
| 272 | /* _MOUSE | ||
| 273 | * ,-----------------------------------------------------------------------------------. | ||
| 274 | * | XXXX | XXXX | MBTN4| MBTN5| XXXX | Bri+ | XXXX | MWHL↑|MAUS↑ | MWHL↑| XXXX | XXXX | | ||
| 275 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 276 | * | XXXX | MBTN3| MBTN2| MBTN1| XXXX | MPLY | XXXX |MAUS<-|MAUS↓ |MAUS->| XXXX | XXXX | | ||
| 277 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 278 | * | F9 | XXXX | XXXX | XXXX | XXXX | Bri- | XXXX | MWHL↓| XXXX | XXXX | ____ | XXXX | | ||
| 279 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 280 | * |!MOUSE| XXXX | XXXX | ____ | XXXX | MAUS_ACCEL2 | ____ | XXXX | XXXX | ↓ | ↑ | | ||
| 281 | * `-----------------------------------------------------------------------------------' | ||
| 282 | */ | ||
| 283 | [_MOUSE] = LAYOUT_planck_grid( | ||
| 284 | KC_NO, KC_NO, KC_BTN4, KC_BTN5, KC_NO, KC_BRIU, KC_NO, KC_WH_U, KC_MS_U, KC_WH_U, KC_NO, KC_NO, | ||
| 285 | KC_NO, KC_BTN3, KC_BTN2, KC_BTN1, KC_NO, KC_MPLY, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, | ||
| 286 | KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_BRID, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_TRNS, KC_NO, | ||
| 287 | TG(_MOUSE), KC_NO, KC_NO, KC_TRNS, KC_NO, KC_ACL2, KC_ACL2, KC_TRNS, KC_NO, KC_NO, KC_DOWN, KC_UP | ||
| 288 | ) | ||
| 289 | |||
| 290 | }; | ||
| 291 | |||
| 292 | // define the tap dance functions | ||
| 293 | void dance_prn(qk_tap_dance_state_t *state, void *user_data) { | ||
| 294 | if (state->count == 1) { | ||
| 295 | tap_code16(KC_LPRN); | ||
| 296 | } else { | ||
| 297 | tap_code16(KC_LPRN); | ||
| 298 | tap_code16(KC_RPRN); | ||
| 299 | tap_code(KC_LEFT); | ||
| 300 | } | ||
| 301 | } | ||
| 302 | void dance_brc(qk_tap_dance_state_t *state, void *user_data) { | ||
| 303 | if (state->count == 1) { | ||
| 304 | tap_code(KC_LBRC); | ||
| 305 | } else { | ||
| 306 | tap_code(KC_LBRC); | ||
| 307 | tap_code(KC_RBRC); | ||
| 308 | tap_code(KC_LEFT); | ||
| 309 | } | ||
| 310 | } | ||
| 311 | void dance_cbr(qk_tap_dance_state_t *state, void *user_data) { | ||
| 312 | if (state->count == 1) { | ||
| 313 | tap_code16(KC_LCBR); | ||
| 314 | } else { | ||
| 315 | tap_code16(KC_LCBR); | ||
| 316 | tap_code16(KC_RCBR); | ||
| 317 | tap_code(KC_LEFT); | ||
| 318 | } | ||
| 319 | } | ||
| 320 | void dance_prn_de(qk_tap_dance_state_t *state, void *user_data) { | ||
| 321 | if (state->count == 1) { | ||
| 322 | tap_code16(KC_ASTR); | ||
| 323 | } else { | ||
| 324 | tap_code16(KC_ASTR); | ||
| 325 | tap_code16(KC_LPRN); | ||
| 326 | tap_code(KC_LEFT); | ||
| 327 | } | ||
| 328 | } | ||
| 329 | void dance_brc_de(qk_tap_dance_state_t *state, void *user_data) { | ||
| 330 | if (state->count == 1) { | ||
| 331 | tap_code16(RALT(KC_8)); | ||
| 332 | } else { | ||
| 333 | tap_code16(RALT(KC_8)); | ||
| 334 | tap_code16(RALT(KC_9)); | ||
| 335 | tap_code(KC_LEFT); | ||
| 336 | } | ||
| 337 | } | ||
| 338 | void dance_cbr_de(qk_tap_dance_state_t *state, void *user_data) { | ||
| 339 | if (state->count == 1) { | ||
| 340 | tap_code16(RALT(KC_7)); | ||
| 341 | } else { | ||
| 342 | tap_code16(RALT(KC_7)); | ||
| 343 | tap_code16(RALT(KC_0)); | ||
| 344 | tap_code(KC_LEFT); | ||
| 345 | } | ||
| 346 | } | ||
| 347 | void vim_gg(qk_tap_dance_state_t *state, void *user_data) { | ||
| 348 | if (state->count == 1) { | ||
| 349 | tap_code16(LCTL(KC_END)); | ||
| 350 | } else { | ||
| 351 | tap_code16(LCTL(KC_HOME)); | ||
| 352 | } | ||
| 353 | } | ||
| 354 | |||
| 355 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 356 | // declare tap dance actions here | ||
| 357 | [TD_PRN] = ACTION_TAP_DANCE_FN(dance_prn), [TD_BRC] = ACTION_TAP_DANCE_FN(dance_brc), [TD_CBR] = ACTION_TAP_DANCE_FN(dance_cbr), [TD_PRN_DE] = ACTION_TAP_DANCE_FN(dance_prn_de), [TD_BRC_DE] = ACTION_TAP_DANCE_FN(dance_brc_de), [TD_CBR_DE] = ACTION_TAP_DANCE_FN(dance_cbr_de), [TD_VIM_GG] = ACTION_TAP_DANCE_FN(vim_gg)}; | ||
| 358 | |||
| 359 | float thumb_factor = 0.95; | ||
| 360 | float index_factor = 1.1; | ||
| 361 | float middle_factor = 1.2; | ||
| 362 | float ring_factor = 1.25; | ||
| 363 | float pinky_factor = 1.15; | ||
| 364 | float td_factor = 1.4; | ||
| 365 | |||
| 366 | // define the per_key_tapping_term | ||
| 367 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { | ||
| 368 | switch (keycode) { | ||
| 369 | // thumb keys | ||
| 370 | case RSFT_T(KC_DEL): | ||
| 371 | return TAPPING_TERM * thumb_factor; | ||
| 372 | case RCTL_T(KC_TAB): | ||
| 373 | return TAPPING_TERM * thumb_factor; | ||
| 374 | case LT(_NAV, KC_LEFT): | ||
| 375 | return TAPPING_TERM * thumb_factor; | ||
| 376 | case LT(_NAV, KC_RIGHT): | ||
| 377 | return TAPPING_TERM * thumb_factor; | ||
| 378 | case LT(_LOWER, KC_BSPC): | ||
| 379 | return TAPPING_TERM * thumb_factor; | ||
| 380 | case LT(_LOWER_DE, KC_BSPC): | ||
| 381 | return TAPPING_TERM * thumb_factor; | ||
| 382 | case LT(_RAISE, KC_ENT): | ||
| 383 | return TAPPING_TERM * thumb_factor; | ||
| 384 | case LT(_RAISE_DE, KC_ENT): | ||
| 385 | return TAPPING_TERM * thumb_factor; | ||
| 386 | case LT(_NAV, KC_SPC): | ||
| 387 | return TAPPING_TERM * 1.0; | ||
| 388 | case LALT_T(KC_ESC): | ||
| 389 | return TAPPING_TERM * thumb_factor; | ||
| 390 | |||
| 391 | // index finger keys | ||
| 392 | case LCTL_T(KC_P): | ||
| 393 | return TAPPING_TERM * index_factor; | ||
| 394 | case RCTL_T(KC_L): | ||
| 395 | return TAPPING_TERM * (index_factor + 0.1); | ||
| 396 | case LT(_NUM, KC_B): | ||
| 397 | return TAPPING_TERM * (index_factor + 0.1); | ||
| 398 | case LT(_NUM, KC_J): | ||
| 399 | return TAPPING_TERM * index_factor; | ||
| 400 | |||
| 401 | // middle finger keys | ||
| 402 | case LSFT_T(KC_F): | ||
| 403 | return TAPPING_TERM * middle_factor; | ||
| 404 | case RSFT_T(KC_U): | ||
| 405 | return TAPPING_TERM * middle_factor; | ||
| 406 | |||
| 407 | // ring finger keys | ||
| 408 | case LALT_T(KC_W): | ||
| 409 | return TAPPING_TERM * ring_factor; | ||
| 410 | case LALT_T(KC_Y): | ||
| 411 | return TAPPING_TERM * ring_factor; | ||
| 412 | case LGUI_T(KC_TAB): | ||
| 413 | return TAPPING_TERM * ring_factor; | ||
| 414 | |||
| 415 | // pinky keys | ||
| 416 | case LGUI_T(KC_Q): | ||
| 417 | return TAPPING_TERM * pinky_factor; | ||
| 418 | case RGUI_T(KC_SCLN): | ||
| 419 | return TAPPING_TERM * pinky_factor; | ||
| 420 | case RGUI_T(KC_LBRC): | ||
| 421 | return TAPPING_TERM * pinky_factor; | ||
| 422 | case LT(_MOUSE, KC_Z): | ||
| 423 | return TAPPING_TERM * pinky_factor; | ||
| 424 | case LT(_MOUSE, KC_SLSH): | ||
| 425 | return TAPPING_TERM * pinky_factor; | ||
| 426 | case LCTL_T(KC_CAPS): | ||
| 427 | return TAPPING_TERM * pinky_factor; | ||
| 428 | |||
| 429 | // tap-dance actions | ||
| 430 | case TD(TD_PRN): | ||
| 431 | return TAPPING_TERM * td_factor; | ||
| 432 | case TD(TD_BRC): | ||
| 433 | return TAPPING_TERM * td_factor; | ||
| 434 | case TD(TD_CBR): | ||
| 435 | return TAPPING_TERM * td_factor; | ||
| 436 | case TD(TD_PRN_DE): | ||
| 437 | return TAPPING_TERM * td_factor; | ||
| 438 | case TD(TD_BRC_DE): | ||
| 439 | return TAPPING_TERM * td_factor; | ||
| 440 | case TD(TD_CBR_DE): | ||
| 441 | return TAPPING_TERM * td_factor; | ||
| 442 | case TD(TD_VIM_GG): | ||
| 443 | return TAPPING_TERM * td_factor; | ||
| 444 | |||
| 445 | default: | ||
| 446 | return TAPPING_TERM; | ||
| 447 | } | ||
| 448 | } | ||
| 449 | |||
| 450 | // alt tab function setup | ||
| 451 | bool is_alt_tab_active = false; | ||
| 452 | bool is_ctl_tab_active = false; | ||
| 453 | bool de_layout_active = false; | ||
| 454 | |||
| 455 | static uint16_t key_timer; | ||
| 456 | |||
| 457 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 458 | switch (keycode) { | ||
| 459 | case WIDECOLEMAK: | ||
| 460 | if (record->event.pressed) { | ||
| 461 | set_single_persistent_default_layer(_WIDECOLEMAK); | ||
| 462 | } | ||
| 463 | return false; | ||
| 464 | break; | ||
| 465 | case HRWIDECOLEMAK: | ||
| 466 | if (record->event.pressed) { | ||
| 467 | set_single_persistent_default_layer(_HRWIDECOLEMAK); | ||
| 468 | } | ||
| 469 | return false; | ||
| 470 | break; | ||
| 471 | case GAMING: | ||
| 472 | if (record->event.pressed) { | ||
| 473 | layer_invert(_GAMING); | ||
| 474 | } | ||
| 475 | return false; | ||
| 476 | break; | ||
| 477 | case TG_COLEMAK: | ||
| 478 | if (record->event.pressed) { | ||
| 479 | tap_code(KC_ENT); | ||
| 480 | layer_invert(_WIDECOLEMAK); | ||
| 481 | } | ||
| 482 | return false; | ||
| 483 | break; | ||
| 484 | case VIM_O: | ||
| 485 | if (record->event.pressed) { | ||
| 486 | tap_code(KC_END); | ||
| 487 | tap_code(KC_ENT); | ||
| 488 | } | ||
| 489 | return false; | ||
| 490 | break; | ||
| 491 | case VIM_V: | ||
| 492 | if (record->event.pressed) { | ||
| 493 | if (get_mods() & MOD_MASK_SHIFT) { | ||
| 494 | clear_mods(); | ||
| 495 | } else { | ||
| 496 | register_mods(MOD_LSFT); | ||
| 497 | } | ||
| 498 | } | ||
| 499 | return false; | ||
| 500 | break; | ||
| 501 | case KC_SVU_BU: // increase backlight when pressing shift and vol up | ||
| 502 | if (record->event.pressed) { | ||
| 503 | if (get_mods() & MOD_MASK_SHIFT) { | ||
| 504 | register_code(KC_BRIU); | ||
| 505 | } else if (get_mods() & MOD_MASK_CTRL) { | ||
| 506 | register_code(KC_MNXT); | ||
| 507 | } else { | ||
| 508 | register_code(KC_VOLU); | ||
| 509 | } | ||
| 510 | } else { | ||
| 511 | unregister_code(KC_BRIU); | ||
| 512 | unregister_code(KC_MNXT); | ||
| 513 | unregister_code(KC_VOLU); | ||
| 514 | } | ||
| 515 | return false; | ||
| 516 | case KC_SVD_BD: // decrease backlight when pressing shift and vol up | ||
| 517 | if (record->event.pressed) { | ||
| 518 | if (get_mods() & MOD_MASK_SHIFT) { | ||
| 519 | register_code(KC_BRID); | ||
| 520 | } else if (get_mods() & MOD_MASK_CTRL) { | ||
| 521 | register_code(KC_MPRV); | ||
| 522 | } else { | ||
| 523 | register_code(KC_VOLD); | ||
| 524 | } | ||
| 525 | } else { | ||
| 526 | unregister_code(KC_BRID); | ||
| 527 | unregister_code(KC_MPRV); | ||
| 528 | unregister_code(KC_VOLD); | ||
| 529 | } | ||
| 530 | return false; | ||
| 531 | case KC_TAB_MPLY: // press tab or play/pause when ctrl is pressed | ||
| 532 | if (record->event.pressed) { | ||
| 533 | if (get_mods() & MOD_MASK_CTRL) { | ||
| 534 | register_code(KC_MPLY); | ||
| 535 | } else { | ||
| 536 | register_code(KC_TAB); | ||
| 537 | } | ||
| 538 | } else { | ||
| 539 | unregister_code(KC_MPLY); | ||
| 540 | unregister_code(KC_TAB); | ||
| 541 | } | ||
| 542 | return false; | ||
| 543 | case ALT_TAB: | ||
| 544 | if (record->event.pressed) { | ||
| 545 | if (!is_alt_tab_active) { | ||
| 546 | is_alt_tab_active = true; | ||
| 547 | add_mods(MOD_BIT(KC_LALT)); | ||
| 548 | } | ||
| 549 | register_code(KC_TAB); | ||
| 550 | } else { | ||
| 551 | unregister_code(KC_TAB); | ||
| 552 | } | ||
| 553 | break; | ||
| 554 | case CTL_TAB: | ||
| 555 | if (record->event.pressed) { | ||
| 556 | if (!is_ctl_tab_active) { | ||
| 557 | is_ctl_tab_active = true; | ||
| 558 | add_mods(MOD_BIT(KC_LCTL)); | ||
| 559 | } | ||
| 560 | register_code(KC_TAB); | ||
| 561 | } else { | ||
| 562 | unregister_code(KC_TAB); | ||
| 563 | } | ||
| 564 | break; | ||
| 565 | // the next case allows us to use alt_tab without a timer | ||
| 566 | case LT(_NAV, KC_SPC): | ||
| 567 | if (record->event.pressed) { | ||
| 568 | } else { | ||
| 569 | unregister_mods(MOD_LALT); | ||
| 570 | unregister_mods(MOD_LCTL); | ||
| 571 | is_alt_tab_active = false; | ||
| 572 | is_ctl_tab_active = false; | ||
| 573 | } | ||
| 574 | break; | ||
| 575 | case DE_ae: | ||
| 576 | if (record->event.pressed) { | ||
| 577 | uint8_t temp_mods = get_mods(); | ||
| 578 | if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { | ||
| 579 | clear_oneshot_mods(); | ||
| 580 | clear_mods(); | ||
| 581 | add_mods(MOD_BIT(KC_LALT)); | ||
| 582 | tap_code(KC_P0); | ||
| 583 | tap_code(KC_P1); | ||
| 584 | tap_code(KC_P9); | ||
| 585 | tap_code(KC_P6); // Ä | ||
| 586 | } else { | ||
| 587 | clear_mods(); | ||
| 588 | add_mods(MOD_BIT(KC_LALT)); | ||
| 589 | tap_code(KC_P0); | ||
| 590 | tap_code(KC_P2); | ||
| 591 | tap_code(KC_P2); | ||
| 592 | tap_code(KC_P8); // ä | ||
| 593 | } | ||
| 594 | unregister_mods(MOD_LALT); | ||
| 595 | set_mods(temp_mods); | ||
| 596 | } | ||
| 597 | return false; | ||
| 598 | break; | ||
| 599 | case DE_AE: | ||
| 600 | if (record->event.pressed) { | ||
| 601 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 602 | clear_oneshot_mods(); | ||
| 603 | clear_mods(); | ||
| 604 | add_mods(MOD_BIT(KC_LALT)); | ||
| 605 | tap_code(KC_P0); | ||
| 606 | tap_code(KC_P1); | ||
| 607 | tap_code(KC_P9); | ||
| 608 | tap_code(KC_P6); // Ä | ||
| 609 | unregister_mods(MOD_LALT); | ||
| 610 | set_mods(temp_mods); | ||
| 611 | } | ||
| 612 | return false; | ||
| 613 | break; | ||
| 614 | case DE_oe: | ||
| 615 | if (record->event.pressed) { | ||
| 616 | uint8_t temp_mods = get_mods(); | ||
| 617 | if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { | ||
| 618 | clear_oneshot_mods(); | ||
| 619 | clear_mods(); | ||
| 620 | add_mods(MOD_BIT(KC_LALT)); | ||
| 621 | tap_code(KC_P0); | ||
| 622 | tap_code(KC_P2); | ||
| 623 | tap_code(KC_P1); | ||
| 624 | tap_code(KC_P4); // Ö | ||
| 625 | } else { | ||
| 626 | clear_mods(); | ||
| 627 | add_mods(MOD_BIT(KC_LALT)); | ||
| 628 | tap_code(KC_P0); | ||
| 629 | tap_code(KC_P2); | ||
| 630 | tap_code(KC_P4); | ||
| 631 | tap_code(KC_P6); // ö | ||
| 632 | } | ||
| 633 | unregister_mods(MOD_LALT); | ||
| 634 | set_mods(temp_mods); | ||
| 635 | } | ||
| 636 | return false; | ||
| 637 | break; | ||
| 638 | case DE_OE: | ||
| 639 | if (record->event.pressed) { | ||
| 640 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 641 | clear_oneshot_mods(); | ||
| 642 | clear_mods(); | ||
| 643 | add_mods(MOD_BIT(KC_LALT)); | ||
| 644 | tap_code(KC_P0); | ||
| 645 | tap_code(KC_P2); | ||
| 646 | tap_code(KC_P1); | ||
| 647 | tap_code(KC_P4); // Ö | ||
| 648 | unregister_mods(MOD_LALT); | ||
| 649 | set_mods(temp_mods); | ||
| 650 | } | ||
| 651 | return false; | ||
| 652 | break; | ||
| 653 | case DE_ue: | ||
| 654 | if (record->event.pressed) { | ||
| 655 | uint8_t temp_mods = get_mods(); | ||
| 656 | if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { | ||
| 657 | clear_oneshot_mods(); | ||
| 658 | clear_mods(); | ||
| 659 | add_mods(MOD_BIT(KC_LALT)); | ||
| 660 | tap_code(KC_P0); | ||
| 661 | tap_code(KC_P2); | ||
| 662 | tap_code(KC_P2); | ||
| 663 | tap_code(KC_P0); // Ü | ||
| 664 | } else { | ||
| 665 | clear_mods(); | ||
| 666 | add_mods(MOD_BIT(KC_LALT)); | ||
| 667 | tap_code(KC_P0); | ||
| 668 | tap_code(KC_P2); | ||
| 669 | tap_code(KC_P5); | ||
| 670 | tap_code(KC_P2); // ü | ||
| 671 | } | ||
| 672 | unregister_mods(MOD_LALT); | ||
| 673 | set_mods(temp_mods); | ||
| 674 | } | ||
| 675 | return false; | ||
| 676 | break; | ||
| 677 | case KC_DE_SWITCH: | ||
| 678 | if (record->event.pressed) { | ||
| 679 | if (de_layout_active) { | ||
| 680 | de_layout_active = false; // deactivate German overlay | ||
| 681 | set_single_persistent_default_layer(_HRWIDECOLEMAK); | ||
| 682 | } else { | ||
| 683 | de_layout_active = true; // activate German overlay | ||
| 684 | set_single_persistent_default_layer(_HRWIDECOLEMAK_DE); | ||
| 685 | } | ||
| 686 | return false; | ||
| 687 | } | ||
| 688 | break; | ||
| 689 | case LANG_SWITCH: | ||
| 690 | if (record->event.pressed) { | ||
| 691 | register_mods(MOD_LALT); | ||
| 692 | register_code(KC_LSFT); | ||
| 693 | if (de_layout_active) { | ||
| 694 | de_layout_active = false; // deactivate German overlay | ||
| 695 | set_single_persistent_default_layer(_HRWIDECOLEMAK); | ||
| 696 | } else { | ||
| 697 | de_layout_active = true; // activate German overlay | ||
| 698 | set_single_persistent_default_layer(_HRWIDECOLEMAK_DE); | ||
| 699 | } | ||
| 700 | } else { | ||
| 701 | unregister_code(KC_LSFT); | ||
| 702 | unregister_mods(MOD_LALT); | ||
| 703 | } | ||
| 704 | return false; | ||
| 705 | case DE_SZ: | ||
| 706 | if (record->event.pressed) { | ||
| 707 | uint8_t temp_mods = get_mods(); | ||
| 708 | if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { | ||
| 709 | clear_oneshot_mods(); | ||
| 710 | clear_mods(); | ||
| 711 | add_mods(MOD_BIT(KC_LALT)); | ||
| 712 | tap_code(KC_P0); | ||
| 713 | tap_code(KC_P1); | ||
| 714 | tap_code(KC_P7); | ||
| 715 | tap_code(KC_P6); // ° | ||
| 716 | } else { | ||
| 717 | clear_mods(); | ||
| 718 | add_mods(MOD_BIT(KC_LALT)); | ||
| 719 | tap_code(KC_P0); | ||
| 720 | tap_code(KC_P2); | ||
| 721 | tap_code(KC_P2); | ||
| 722 | tap_code(KC_P3); // ß | ||
| 723 | } | ||
| 724 | unregister_mods(MOD_LALT); | ||
| 725 | set_mods(temp_mods); | ||
| 726 | } | ||
| 727 | return false; | ||
| 728 | break; | ||
| 729 | case DE_EGRAVE: | ||
| 730 | if (record->event.pressed) { | ||
| 731 | uint8_t temp_mods = get_mods(); | ||
| 732 | if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { | ||
| 733 | clear_oneshot_mods(); | ||
| 734 | clear_mods(); | ||
| 735 | add_mods(MOD_BIT(KC_LALT)); | ||
| 736 | tap_code(KC_P0); | ||
| 737 | tap_code(KC_P2); | ||
| 738 | tap_code(KC_P0); | ||
| 739 | tap_code(KC_P0); // È | ||
| 740 | } else { | ||
| 741 | clear_mods(); | ||
| 742 | add_mods(MOD_BIT(KC_LALT)); | ||
| 743 | tap_code(KC_P0); | ||
| 744 | tap_code(KC_P2); | ||
| 745 | tap_code(KC_P3); | ||
| 746 | tap_code(KC_P2); // è | ||
| 747 | } | ||
| 748 | unregister_mods(MOD_LALT); | ||
| 749 | set_mods(temp_mods); | ||
| 750 | } | ||
| 751 | return false; | ||
| 752 | break; | ||
| 753 | case DE_EAIGU: | ||
| 754 | if (record->event.pressed) { | ||
| 755 | uint8_t temp_mods = get_mods(); | ||
| 756 | if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { | ||
| 757 | clear_oneshot_mods(); | ||
| 758 | clear_mods(); | ||
| 759 | add_mods(MOD_BIT(KC_LALT)); | ||
| 760 | tap_code(KC_P0); | ||
| 761 | tap_code(KC_P2); | ||
| 762 | tap_code(KC_P0); | ||
| 763 | tap_code(KC_P1); // É | ||
| 764 | } else { | ||
| 765 | clear_mods(); | ||
| 766 | add_mods(MOD_BIT(KC_LALT)); | ||
| 767 | tap_code(KC_P0); | ||
| 768 | tap_code(KC_P2); | ||
| 769 | tap_code(KC_P3); | ||
| 770 | tap_code(KC_P3); // é | ||
| 771 | } | ||
| 772 | unregister_mods(MOD_LALT); | ||
| 773 | set_mods(temp_mods); | ||
| 774 | } | ||
| 775 | return false; | ||
| 776 | break; | ||
| 777 | case KC_CURRENCY: | ||
| 778 | if (record->event.pressed) { | ||
| 779 | uint8_t temp_mods = get_mods(); | ||
| 780 | if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { | ||
| 781 | clear_oneshot_mods(); | ||
| 782 | clear_mods(); | ||
| 783 | add_mods(MOD_BIT(KC_LALT)); | ||
| 784 | tap_code(KC_P1); | ||
| 785 | tap_code(KC_P5); | ||
| 786 | tap_code(KC_P7); // ¥ | ||
| 787 | } else { | ||
| 788 | clear_mods(); | ||
| 789 | add_mods(MOD_BIT(KC_LALT)); | ||
| 790 | tap_code(KC_P0); | ||
| 791 | tap_code(KC_P1); | ||
| 792 | tap_code(KC_P2); | ||
| 793 | tap_code(KC_P8); // € | ||
| 794 | } | ||
| 795 | unregister_mods(MOD_LALT); | ||
| 796 | set_mods(temp_mods); | ||
| 797 | } | ||
| 798 | return false; | ||
| 799 | break; | ||
| 800 | case DE_SLSH_QUST: | ||
| 801 | if (record->event.pressed) { | ||
| 802 | key_timer = timer_read(); | ||
| 803 | layer_on(_MOUSE); | ||
| 804 | } else { | ||
| 805 | if (timer_elapsed(key_timer) < (TAPPING_TERM * pinky_factor)) { | ||
| 806 | layer_off(_MOUSE); | ||
| 807 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 808 | if (temp_mods & MOD_MASK_SHIFT) { | ||
| 809 | tap_code(KC_MINS); // ? | ||
| 810 | } else { | ||
| 811 | tap_code16(KC_AMPR); // / | ||
| 812 | } | ||
| 813 | } else { | ||
| 814 | layer_off(_MOUSE); | ||
| 815 | } | ||
| 816 | } | ||
| 817 | return false; | ||
| 818 | break; | ||
| 819 | case DE_QUOT: | ||
| 820 | if (record->event.pressed) { | ||
| 821 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 822 | if (temp_mods & MOD_MASK_SHIFT) { | ||
| 823 | register_code(KC_2); // \" | ||
| 824 | } else { | ||
| 825 | register_code16(KC_PIPE); // /' | ||
| 826 | } | ||
| 827 | } else { | ||
| 828 | unregister_code(KC_2); | ||
| 829 | unregister_code16(KC_PIPE); | ||
| 830 | } | ||
| 831 | return true; | ||
| 832 | case DE_DOT_RAB: | ||
| 833 | if (record->event.pressed) { | ||
| 834 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 835 | if (temp_mods & MOD_MASK_SHIFT) { | ||
| 836 | register_code16(LSFT(KC_NUBS)); // > right angle bracket | ||
| 837 | } else { | ||
| 838 | register_code(KC_DOT); // . | ||
| 839 | } | ||
| 840 | } else { | ||
| 841 | unregister_code16(LSFT(KC_NUBS)); | ||
| 842 | unregister_code(KC_DOT); | ||
| 843 | } | ||
| 844 | return true; | ||
| 845 | case DE_COMM_LAB: | ||
| 846 | if (record->event.pressed) { | ||
| 847 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 848 | if (temp_mods & MOD_MASK_SHIFT) { | ||
| 849 | clear_mods(); | ||
| 850 | clear_oneshot_mods(); | ||
| 851 | register_code16(KC_NUBS); // < left angle bracket | ||
| 852 | set_mods(temp_mods); | ||
| 853 | } else { | ||
| 854 | register_code(KC_COMM); // , | ||
| 855 | } | ||
| 856 | } else { | ||
| 857 | unregister_code16(KC_NUBS); | ||
| 858 | unregister_code(KC_COMM); | ||
| 859 | } | ||
| 860 | return true; | ||
| 861 | case DE_SCLN: | ||
| 862 | if (record->event.pressed) { | ||
| 863 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 864 | if (temp_mods & MOD_MASK_SHIFT) { | ||
| 865 | tap_code(KC_DOT); // ; | ||
| 866 | } else { | ||
| 867 | add_mods(MOD_BIT(KC_LSFT)); | ||
| 868 | tap_code(KC_COMM); // : | ||
| 869 | del_mods(MOD_BIT(KC_LSFT)); | ||
| 870 | } | ||
| 871 | return false; | ||
| 872 | } | ||
| 873 | break; | ||
| 874 | case DE_BSLS: | ||
| 875 | if (record->event.pressed) { | ||
| 876 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 877 | clear_mods(); | ||
| 878 | clear_oneshot_mods(); | ||
| 879 | add_mods(MOD_BIT(KC_RALT)); | ||
| 880 | if (temp_mods & MOD_MASK_SHIFT) { | ||
| 881 | register_code(KC_NUBS); // | Pipe | ||
| 882 | } else { | ||
| 883 | register_code(KC_MINS); // Backslash | ||
| 884 | } | ||
| 885 | set_mods(temp_mods); | ||
| 886 | } else { | ||
| 887 | unregister_code(KC_NUBS); | ||
| 888 | unregister_code(KC_MINS); | ||
| 889 | } | ||
| 890 | return true; | ||
| 891 | // switch multiplexing for escape, short tap for escape, long press for context menu | ||
| 892 | case M_ESCM: | ||
| 893 | if (record->event.pressed) { | ||
| 894 | key_timer = timer_read(); | ||
| 895 | } else { | ||
| 896 | if (timer_elapsed(key_timer) > TAPPING_TERM) { | ||
| 897 | tap_code(KC_APP); | ||
| 898 | } else { | ||
| 899 | tap_code(KC_ESC); | ||
| 900 | } | ||
| 901 | } | ||
| 902 | return false; | ||
| 903 | case M_RGUI_SCLN: | ||
| 904 | if (record->event.pressed) { | ||
| 905 | key_timer = timer_read(); | ||
| 906 | add_mods(MOD_BIT(KC_RGUI)); | ||
| 907 | } else { | ||
| 908 | del_mods(MOD_BIT(KC_RGUI)); | ||
| 909 | if (timer_elapsed(key_timer) < (TAPPING_TERM * pinky_factor)) { | ||
| 910 | uint8_t temp_mods = get_mods() | get_oneshot_mods(); | ||
| 911 | if (temp_mods & MOD_MASK_SHIFT) { | ||
| 912 | tap_code(KC_DOT); // ; | ||
| 913 | } else { | ||
| 914 | add_mods(MOD_BIT(KC_LSFT)); | ||
| 915 | tap_code(KC_COMM); // : | ||
| 916 | del_mods(MOD_BIT(KC_LSFT)); | ||
| 917 | } | ||
| 918 | } else { | ||
| 919 | tap_code(KC_RGUI); | ||
| 920 | } | ||
| 921 | } | ||
| 922 | return false; | ||
| 923 | break; | ||
| 924 | } | ||
| 925 | return true; | ||
| 926 | } | ||
| 927 | |||
| 928 | bool muse_mode = false; | ||
| 929 | uint8_t last_muse_note = 0; | ||
| 930 | uint16_t muse_counter = 0; | ||
| 931 | uint8_t muse_offset = 70; | ||
| 932 | uint16_t muse_tempo = 50; | ||
| 933 | |||
| 934 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 935 | if (muse_mode) { | ||
| 936 | if (IS_LAYER_ON(_RAISE)) { | ||
| 937 | if (clockwise) { | ||
| 938 | muse_offset++; | ||
| 939 | } else { | ||
| 940 | muse_offset--; | ||
| 941 | } | ||
| 942 | } else { | ||
| 943 | if (clockwise) { | ||
| 944 | muse_tempo += 1; | ||
| 945 | } else { | ||
| 946 | muse_tempo -= 1; | ||
| 947 | } | ||
| 948 | } | ||
| 949 | } else { | ||
| 950 | if (clockwise) { | ||
| 951 | #ifdef MOUSEKEY_ENABLE | ||
| 952 | tap_code(KC_MS_WH_DOWN); | ||
| 953 | #else | ||
| 954 | tap_code(KC_PGDN); | ||
| 955 | #endif | ||
| 956 | } else { | ||
| 957 | #ifdef MOUSEKEY_ENABLE | ||
| 958 | tap_code(KC_MS_WH_UP); | ||
| 959 | #else | ||
| 960 | tap_code(KC_PGUP); | ||
| 961 | #endif | ||
| 962 | } | ||
| 963 | } | ||
| 964 | return true; | ||
| 965 | } | ||
| 966 | |||
| 967 | bool dip_switch_update_user(uint8_t index, bool active) { | ||
| 968 | switch (index) { | ||
| 969 | case 0: { | ||
| 970 | if (active) { | ||
| 971 | layer_on(_ADJUST); | ||
| 972 | } else { | ||
| 973 | layer_off(_ADJUST); | ||
| 974 | } | ||
| 975 | break; | ||
| 976 | } | ||
| 977 | case 1: | ||
| 978 | if (active) { | ||
| 979 | muse_mode = true; | ||
| 980 | } else { | ||
| 981 | muse_mode = false; | ||
| 982 | } | ||
| 983 | } | ||
| 984 | return true; | ||
| 985 | } | ||
| 986 | |||
| 987 | |||
| 988 | LEADER_EXTERNS(); | ||
| 989 | |||
| 990 | void matrix_scan_user(void) { | ||
| 991 | LEADER_DICTIONARY() { | ||
| 992 | leading = false; | ||
| 993 | leader_end(); | ||
| 994 | |||
| 995 | SEQ_ONE_KEY(KC_F) { | ||
| 996 | // Anything you can do in a macro. | ||
| 997 | SEND_STRING("QMK is awesome."); | ||
| 998 | } | ||
| 999 | SEQ_TWO_KEYS(KC_D, KC_D) { | ||
| 1000 | SEND_STRING(SS_LCTL("a") SS_LCTL("c")); | ||
| 1001 | } | ||
| 1002 | SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { | ||
| 1003 | SEND_STRING("https://start.duckduckgo.com\n"); | ||
| 1004 | } | ||
| 1005 | SEQ_TWO_KEYS(KC_A, KC_S) { | ||
| 1006 | register_code(KC_LGUI); | ||
| 1007 | register_code(KC_S); | ||
| 1008 | unregister_code(KC_S); | ||
| 1009 | unregister_code(KC_LGUI); | ||
| 1010 | } | ||
| 1011 | } | ||
| 1012 | #ifdef AUDIO_ENABLE | ||
| 1013 | if (muse_mode) { | ||
| 1014 | if (muse_counter == 0) { | ||
| 1015 | uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; | ||
| 1016 | if (muse_note != last_muse_note) { | ||
| 1017 | stop_note(compute_freq_for_midi_note(last_muse_note)); | ||
| 1018 | play_note(compute_freq_for_midi_note(muse_note), 0xF); | ||
| 1019 | last_muse_note = muse_note; | ||
| 1020 | } | ||
| 1021 | } | ||
| 1022 | muse_counter = (muse_counter + 1) % muse_tempo; | ||
| 1023 | } else { | ||
| 1024 | if (muse_counter) { | ||
| 1025 | stop_all_notes(); | ||
| 1026 | muse_counter = 0; | ||
| 1027 | } | ||
| 1028 | } | ||
| 1029 | #endif | ||
| 1030 | } | ||
| 1031 | |||
| 1032 | bool music_mask_user(uint16_t keycode) { | ||
| 1033 | switch (keycode) { | ||
| 1034 | case RAISE: | ||
| 1035 | case LOWER: | ||
| 1036 | return false; | ||
| 1037 | default: | ||
| 1038 | return true; | ||
| 1039 | } | ||
| 1040 | } | ||
| 1041 | |||
| 1042 | bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { | ||
| 1043 | switch (keycode) { | ||
| 1044 | case LSFT_T(KC_S): | ||
| 1045 | return true; | ||
| 1046 | case RSFT_T(KC_E): | ||
| 1047 | return true; | ||
| 1048 | case LSFT_T(KC_D): | ||
| 1049 | return true; | ||
| 1050 | case RSFT_T(KC_K): | ||
| 1051 | return true; | ||
| 1052 | case LSFT_T(KC_F): | ||
| 1053 | return true; | ||
| 1054 | case RSFT_T(KC_U): | ||
| 1055 | return true; | ||
| 1056 | case LT(_RAISE, KC_ENT): | ||
| 1057 | return true; | ||
| 1058 | case LT(_RAISE_DE, KC_ENT): | ||
| 1059 | return true; | ||
| 1060 | case LT(_LOWER, KC_BSPC): | ||
| 1061 | return true; | ||
| 1062 | case LT(_LOWER_DE, KC_BSPC): | ||
| 1063 | return true; | ||
| 1064 | default: | ||
| 1065 | return false; | ||
| 1066 | } | ||
| 1067 | } | ||
| 1068 | |||
| 1069 | // Set RGB to change with layer changes | ||
| 1070 | #define HSV_DARKORANGE 10, 255, 255 | ||
| 1071 | #define HSV_DARKPINK 150, 100, 255 | ||
| 1072 | #define HSV_GRASS 57, 255, 255 | ||
| 1073 | #define HSV_OCEAN 148, 255, 255 | ||
| 1074 | |||
| 1075 | // Light LEDs 1 to 9 in darkorange when HRCOLEMAK is active | ||
| 1076 | const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_DARKORANGE}); | ||
| 1077 | // Light LEDs 1 to 9 in green when HRWIDECOLEMAK is active | ||
| 1078 | const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_OCEAN}); | ||
| 1079 | // Light LEDs 1 to 9 in darkorange when de_layout_active is true | ||
| 1080 | const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS({3, 4, HSV_DARKORANGE}, {0, 3, HSV_OCEAN}, {8, 3, HSV_OCEAN}); | ||
| 1081 | // Light LEDs 1 to 9 in red when GAMING layer is active | ||
| 1082 | const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_RED}); | ||
| 1083 | // Light LEDs 1 to 9 in white when WIDECOLEMAK is active | ||
| 1084 | const rgblight_segment_t PROGMEM my_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_WHITE}); | ||
| 1085 | // Light bottom LEDs in purple when ADJUST layer is active | ||
| 1086 | const rgblight_segment_t PROGMEM my_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_MAGENTA}, {7, 3, HSV_MAGENTA}); | ||
| 1087 | // Light bottom LEDs in red when caps lock is active. Hard to ignore! | ||
| 1088 | const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_GRASS}, {7, 3, HSV_GRASS}); | ||
| 1089 | // Light LEDs 1 to 9 in white when NAVIGATION is active | ||
| 1090 | const rgblight_segment_t PROGMEM my_nav_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_WHITE}); | ||
| 1091 | |||
| 1092 | // Now define the array of layers. Later layers take precedence | ||
| 1093 | const rgblight_segment_t *const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_layer0_layer, // hrcolemak | ||
| 1094 | my_layer1_layer, // hrwidecolemak | ||
| 1095 | my_layer2_layer, // de_layout | ||
| 1096 | my_layer3_layer, // gaming | ||
| 1097 | my_layer4_layer, // widecolemak | ||
| 1098 | my_layer5_layer, // adjust | ||
| 1099 | my_nav_layer, // nav | ||
| 1100 | my_capslock_layer // capslock | ||
| 1101 | ); | ||
| 1102 | |||
| 1103 | void keyboard_post_init_user(void) { | ||
| 1104 | // Enable the LED layers | ||
| 1105 | rgblight_layers = my_rgb_layers; | ||
| 1106 | } | ||
| 1107 | |||
| 1108 | bool led_update_user(led_t led_state) { | ||
| 1109 | rgblight_set_layer_state(7, led_state.caps_lock); | ||
| 1110 | return true; | ||
| 1111 | } | ||
| 1112 | |||
| 1113 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 1114 | rgblight_set_layer_state(3, layer_state_cmp(state, _GAMING)); | ||
| 1115 | rgblight_set_layer_state(4, layer_state_cmp(state, _WIDECOLEMAK)); | ||
| 1116 | if ((layer_state_cmp(state, _LOWER) && layer_state_cmp(state, _RAISE)) || (layer_state_cmp(state, _LOWER_DE) && layer_state_cmp(state, _RAISE_DE))) { | ||
| 1117 | return state | (1UL << _ADJUST); | ||
| 1118 | } else { | ||
| 1119 | return state & ~(1UL << _ADJUST); | ||
| 1120 | } | ||
| 1121 | // state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | ||
| 1122 | rgblight_set_layer_state(5, layer_state_cmp(state, _ADJUST)); | ||
| 1123 | // return state; | ||
| 1124 | } | ||
| 1125 | |||
| 1126 | layer_state_t default_layer_state_set_user(layer_state_t state) { | ||
| 1127 | rgblight_set_layer_state(4, layer_state_cmp(state, _WIDECOLEMAK)); | ||
| 1128 | rgblight_set_layer_state(1, layer_state_cmp(state, _HRWIDECOLEMAK)); | ||
| 1129 | rgblight_set_layer_state(2, layer_state_cmp(state, _HRWIDECOLEMAK_DE)); | ||
| 1130 | return state; | ||
| 1131 | } | ||
diff --git a/keyboards/planck/keymaps/jweickm/readme.md b/keyboards/planck/keymaps/jweickm/readme.md new file mode 100644 index 000000000..6628dfbdb --- /dev/null +++ b/keyboards/planck/keymaps/jweickm/readme.md | |||
| @@ -0,0 +1,154 @@ | |||
| 1 | # Semi-wide German/English MIT Planck Layout | ||
| 2 | Added keymap for my planck MIT. | ||
| 3 | It has a German and an English switching mode, so that it works the exact same with both OS languages. | ||
| 4 | It is a semi-wide layout, with the left hand all the way to the edge, and with one extra column in the middle used for media controls. | ||
| 5 | Home row mods implemented in the top row with individual tapping_terms for different fingers. | ||
| 6 | Mouse layer accessible through the pinkies. | ||
| 7 | Navigation layer on space. | ||
| 8 | |||
| 9 | ``` | ||
| 10 | /* _HRWIDECOLEMAK | ||
| 11 | * ,-----------------------------------------------------------------------------------. | ||
| 12 | * | G-Q | A-W | S-F | C-P |_Num-B|Vol/B+|_Num-J| C-L | S-U | A-Y | G-/ | ü | | ||
| 13 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 14 | * | A | R | S | T | G | TAB | M | N | E | I | O | ' | | ||
| 15 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 16 | * |_Mo-Z | X | C | D | V |Vol/B-| K | H | , | . |_Mo-/ | \ | | ||
| 17 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 18 | * |C-CAPS| LEAD |MN-ESC|_L-BSP| LSFT | _Nav-SPC |_R-ENT|S-DEL | RALT |_Mo <-|_Mo ->| | ||
| 19 | * `-----------------------------------------------------------------------------------' | ||
| 20 | */ | ||
| 21 | /* _HRWIDECOLEMAK_DE | ||
| 22 | * same as above, when the PC is set to German layout | ||
| 23 | * ,-----------------------------------------------------------------------------------. | ||
| 24 | * | G-Q | A-W | S-F | C-P |_Num-B|Vol/B+|_Num-J| C-L | S-U | A-Y | G-/ | ü | | ||
| 25 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 26 | * | A | R | S | T | G | TAB | M | N | E | I | O | ' | | ||
| 27 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 28 | * |_Mo-Z | X | C | D | V |Vol/B-| K | H | , | . |_Mo-/ | \ | | ||
| 29 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 30 | * |C-CAPS| LEAD |MN-ESC|_L-BSP| LSFT | _Nav-SPC |_R-ENT|S-DEL | RALT |_Mo <-|_Mo ->| | ||
| 31 | * `-----------------------------------------------------------------------------------' | ||
| 32 | */ | ||
| 33 | /* _GAMING | ||
| 34 | * ,-----------------------------------------------------------------------------------. | ||
| 35 | * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | F5 | F8 | F9 |Vol/B+| | ||
| 36 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 37 | * | TAB | Q | W | E | R | T | Y | U | I | O | P |Vol/B-| | ||
| 38 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 39 | * | LSFT | A | S | D | F | G | H | J | Z | M | ; |_CM-EN| | ||
| 40 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 41 | * | LCTL | C | B | X | LALT | SPACE | ENT | RALT | ____ | ____ | !GAME| | ||
| 42 | * `-----------------------------------------------------------------------------------' | ||
| 43 | */ | ||
| 44 | /* WIDECOLEMAK | ||
| 45 | * no mod taps | ||
| 46 | * ,-----------------------------------------------------------------------------------. | ||
| 47 | * | Q | W | F | P | B |Vol/B+| J | L | U | Y | / | Ü | | ||
| 48 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 49 | * | A | R | S | T | G | TAB | M | N | E | I | O | ' | | ||
| 50 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 51 | * | Z | X | C | D | V |Vol/B-| K | H | , | . | / |!CM-EN| | ||
| 52 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 53 | * |C-CAPS|G-TAB |MN-ESC|_L-BSP| LSFT | _NAV-SPC |_R-ENT|S-DEL |C-TAB |_Mo <-|_Mo ->| | ||
| 54 | * `-----------------------------------------------------------------------------------' | ||
| 55 | */ | ||
| 56 | /* _LOWER | ||
| 57 | * ,-----------------------------------------------------------------------------------. | ||
| 58 | * | ! | @ | # | $ | % | ~ | ^ | & | * | ( | ) | Ö | | ||
| 59 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 60 | * | F1 | F2 | F3 | F4 | F5 | F6 | ß | _ | + | { | } | Ä | | ||
| 61 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 62 | * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | / | \ | | | € | è | | ||
| 63 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 64 | * |!MOUSE| ____ | ____ | ____ | ____ | ____ | ____ | Vol- | Vol+ | ↓ | ↑ | | ||
| 65 | * `-----------------------------------------------------------------------------------' | ||
| 66 | */ | ||
| 67 | /* _LOWER_DE | ||
| 68 | * ,-----------------------------------------------------------------------------------. | ||
| 69 | * | ! | @ | # | $ | % | ~ | ^ | & | * | ( | ) | Ö | | ||
| 70 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 71 | * | F1 | F2 | F3 | F4 | F5 | F6 | ß | _ | + | { | } | Ä | | ||
| 72 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 73 | * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | / | \ | | | € | ` | | ||
| 74 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 75 | * |!MOUSE| ____ | ____ | ____ | ____ | ____ | ____ | Vol- | Vol+ | ↓ | ↑ | | ||
| 76 | * `-----------------------------------------------------------------------------------' | ||
| 77 | */ | ||
| 78 | /* _RAISE | ||
| 79 | * ,-----------------------------------------------------------------------------------. | ||
| 80 | * | 1 | 2 | 3 | 4 | 5 | ` | 6 | 7 | 8 | 9 | 0 | ö | | ||
| 81 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 82 | * | F1 | F2 | F3 | F4 | F5 | F6 | ß | - | = | [ | ] | ä | | ||
| 83 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 84 | * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | \ | , | . | / | é | | ||
| 85 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 86 | * |!MOUSE| ____ | ____ | BSPC | ____ | ____ | ____ | |<< | >>| | ↓ | ↑ | | ||
| 87 | * `-----------------------------------------------------------------------------------' | ||
| 88 | */ | ||
| 89 | /* _RAISE_DE | ||
| 90 | * ,-----------------------------------------------------------------------------------. | ||
| 91 | * | 1 | 2 | 3 | 4 | 5 | ` | 6 | 7 | 8 | 9 | 0 | ö | | ||
| 92 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 93 | * | F1 | F2 | F3 | F4 | F5 | F6 | ß | - | = | [ | ] | ä | | ||
| 94 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 95 | * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | \ | , | . | / | ´ | | ||
| 96 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 97 | * |!MOUSE| ____ | ____ | BSPC | ____ | ____ | ____ | |<< | >>| | ↓ | ↑ | | ||
| 98 | * `-----------------------------------------------------------------------------------' | ||
| 99 | */ | ||
| 100 | /* _ADJUST | ||
| 101 | * ,-----------------------------------------------------------------------------------. | ||
| 102 | * | A-SFT| RESET| DEBUG|RGBTOG|RGBMOD|RGBHUI|RGBHUD|RGBSAI|RGBSAD|RGBVAI|RGBVAD| DE_SW| | ||
| 103 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 104 | * | A-GRV|EEPRST|MU_MOD| AU_ON|AU_OFF|AGNORM|AGSWAP|!HRWCM| !WCM | A-GRV| !LANG| !GAME| | ||
| 105 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 106 | * | ____ |MUV_DE|MUV_IN| MU_ON|MU_OFF| MI_ON|MI_OFF| Vol- | MPLY | Vol+ | ____ | ____ | | ||
| 107 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 108 | * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |EEPRST| | ||
| 109 | * `-----------------------------------------------------------------------------------' | ||
| 110 | */ | ||
| 111 | /* _NAV | ||
| 112 | * ,-----------------------------------------------------------------------------------. | ||
| 113 | * |A(TAB)| C(->)| !LANG|A(GRV)| C(<-)| >>| | HOME | -> | PGUP | COPY | PASTE| DE_SW| | ||
| 114 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 115 | * |C(TAB)| TAB | ESC | ENT |VIM_GG| MPLY | <- | ↓ | ↑ | -> | END | VIM_O| | ||
| 116 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 117 | * | LSFT | XXXX |S(DEL)| CAPS | VIM_V| MUTE | HOME | PGDN | LSFT | RFST | C(F) | C(F) | | ||
| 118 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 119 | * | XXXX | XXXX | ____ | BSPC | ____ | ____ | ENT | DEL | ____ | ____ | DE_SW| | ||
| 120 | * `-----------------------------------------------------------------------------------' | ||
| 121 | */ | ||
| 122 | /* _VIM | ||
| 123 | * ,-----------------------------------------------------------------------------------. | ||
| 124 | * |A(TAB)| C(->)| !LANG|A(GRV)| C(<-)| >>| | HOME | -> | PGUP | COPY | PASTE| DE_SW| | ||
| 125 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 126 | * |C(TAB)| TAB | ESC | ENT |VIM_GG| MPLY | <- | ↓ | ↑ | -> | END | VIM_O| | ||
| 127 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 128 | * | LSFT | XXXX |S(DEL)| CAPS | VIM_V| MUTE | HOME | PGDN | LSFT | RFST | C(F) | C(F) | | ||
| 129 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 130 | * | XXXX | XXXX | !VIM | BSPC | ____ | ____ | ENT | DEL | ____ | ↓ | ↑ | | ||
| 131 | * `-----------------------------------------------------------------------------------' | ||
| 132 | */ | ||
| 133 | /* _NUM | ||
| 134 | * ,-----------------------------------------------------------------------------------. | ||
| 135 | * | F1 | F2 | F3 | F4 | |<< |NUMLCK| >>| | 7 | 8 | 9 | - | ____ | | ||
| 136 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 137 | * | F5 | F6 | F7 | F8 | Vol+ | MPLY | * | 4 | 5 | 6 | + | . | | ||
| 138 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 139 | * | F9 | F10 | F11 | F12 | Vol- | MUTE | = | 1 | 2 | 3 | / | , | | ||
| 140 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 141 | * | ____ | ____ | ____ | ____ | ____ | ____ | 0 | . | , | = | ____ | | ||
| 142 | * `-----------------------------------------------------------------------------------' | ||
| 143 | */ | ||
| 144 | /* _MOUSE | ||
| 145 | * ,-----------------------------------------------------------------------------------. | ||
| 146 | * | XXXX | XXXX | MBTN4| MBTN5| XXXX | Bri+ | XXXX | MWHL↑|MAUS↑ | MWHL↑| XXXX | XXXX | | ||
| 147 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 148 | * | XXXX | MBTN3| MBTN2| MBTN1| XXXX | MPLY | XXXX |MAUS<-|MAUS↓ |MAUS->| XXXX | XXXX | | ||
| 149 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 150 | * | F9 | XXXX | XXXX | XXXX | XXXX | Bri- | XXXX | MWHL↓| XXXX | XXXX | ____ | XXXX | | ||
| 151 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 152 | * |!MOUSE| XXXX | XXXX | ____ | XXXX | MAUS_ACCEL2 | ____ | XXXX | XXXX | ↓ | ↑ | | ||
| 153 | * `-----------------------------------------------------------------------------------' | ||
| 154 | */ | ||
diff --git a/keyboards/planck/keymaps/jweickm/rules.mk b/keyboards/planck/keymaps/jweickm/rules.mk new file mode 100644 index 000000000..067ac4768 --- /dev/null +++ b/keyboards/planck/keymaps/jweickm/rules.mk | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | CONSOLE_ENABLE = no # Console for debug | ||
| 2 | LEADER_ENABLE = yes | ||
| 3 | TAP_DANCE_ENABLE = yes # enable tap dance functionality | ||
| 4 | |||
| 5 | SRC += muse.c | ||
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index be33bf253..4b04dfec5 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
| 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 | |||
| 1 | #pragma once | 17 | #pragma once |
| 2 | 18 | ||
| 3 | #include "quantum.h" | 19 | #include "quantum.h" |
| @@ -20,4 +36,6 @@ | |||
| 20 | # include "rev5.h" | 36 | # include "rev5.h" |
| 21 | #elif defined(KEYBOARD_planck_rev6) | 37 | #elif defined(KEYBOARD_planck_rev6) |
| 22 | # include "rev6.h" | 38 | # include "rev6.h" |
| 23 | #endif | 39 | #elif defined(KEYBOARD_planck_rev6_drop) |
| 40 | # include "rev6_drop.h" | ||
| 41 | #endif // Planck revisions | ||
diff --git a/keyboards/planck/rev6_drop/chconf.h b/keyboards/planck/rev6_drop/chconf.h new file mode 100644 index 000000000..e1243f23e --- /dev/null +++ b/keyboards/planck/rev6_drop/chconf.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* Copyright 2020 QMK | ||
| 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 | /* | ||
| 18 | * This file was auto-generated by: | ||
| 19 | * `qmk chibios-confmigrate -i keyboards/planck/rev6/chconf.h -r platforms/chibios/QMK_PROTON_C/configs/chconf.h` | ||
| 20 | */ | ||
| 21 | |||
| 22 | #pragma once | ||
| 23 | |||
| 24 | #define CH_CFG_ST_RESOLUTION 16 | ||
| 25 | |||
| 26 | #define CH_CFG_ST_FREQUENCY 10000 | ||
| 27 | |||
| 28 | #include_next <chconf.h> | ||
| 29 | |||
diff --git a/keyboards/planck/rev6_drop/config.h b/keyboards/planck/rev6_drop/config.h new file mode 100644 index 000000000..c1baa34b7 --- /dev/null +++ b/keyboards/planck/rev6_drop/config.h | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * 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/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | /* USB Device descriptor parameter */ | ||
| 21 | #define PRODUCT_ID 0xA4F9 | ||
| 22 | #define DEVICE_VER 0x0006 | ||
| 23 | #undef MANUFACTURER | ||
| 24 | #define MANUFACTURER Drop | ||
| 25 | |||
| 26 | #undef MATRIX_ROWS | ||
| 27 | #undef MATRIX_COLS | ||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 8 | ||
| 30 | #define MATRIX_COLS 6 | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Keyboard Matrix Assignments | ||
| 34 | * | ||
| 35 | * Change this to how you wired your keyboard | ||
| 36 | * COLS: AVR pins used for columns, left to right | ||
| 37 | * ROWS: AVR pins used for rows, top to bottom | ||
| 38 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 39 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 40 | * | ||
| 41 | */ | ||
| 42 | /* Note: These are not used for arm boards. They're here purely as documentation. */ | ||
| 43 | #undef MATRIX_ROW_PINS | ||
| 44 | #undef MATRIX_COL_PINS | ||
| 45 | |||
| 46 | #define MATRIX_ROW_PINS \ | ||
| 47 | { A10, A9, A8, B15, C13, C14, C15, A2 } | ||
| 48 | #define MATRIX_COL_PINS \ | ||
| 49 | { B11, B10, B2, B1, A7, B0 } | ||
| 50 | |||
| 51 | #define UNUSED_PINS | ||
| 52 | |||
| 53 | #define ENCODERS_PAD_A \ | ||
| 54 | { B12 } | ||
| 55 | #define ENCODERS_PAD_B \ | ||
| 56 | { B13 } | ||
| 57 | |||
| 58 | #define DIP_SWITCH_PINS \ | ||
| 59 | { B14, A15, A0, B9 } | ||
| 60 | |||
| 61 | #define MUSIC_MAP | ||
| 62 | #undef AUDIO_VOICES | ||
| 63 | #undef AUDIO_PIN | ||
| 64 | #define AUDIO_PIN A5 | ||
| 65 | #define AUDIO_PIN_ALT A4 | ||
| 66 | #define AUDIO_PIN_ALT_AS_NEGATIVE | ||
| 67 | |||
| 68 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 69 | // #define DEBOUNCE 6 | ||
| 70 | |||
| 71 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 72 | //#define LOCKING_SUPPORT_ENABLE | ||
| 73 | /* Locking resynchronize hack */ | ||
| 74 | //#define LOCKING_RESYNC_ENABLE | ||
| 75 | |||
| 76 | /* | ||
| 77 | * Force NKRO | ||
| 78 | * | ||
| 79 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 80 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 81 | * makefile for this to work.) | ||
| 82 | * | ||
| 83 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 84 | * until the next keyboard reset. | ||
| 85 | * | ||
| 86 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 87 | * fully operational during normal computer usage. | ||
| 88 | * | ||
| 89 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 90 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 91 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 92 | * power-up. | ||
| 93 | * | ||
| 94 | */ | ||
| 95 | //#define FORCE_NKRO | ||
| 96 | |||
| 97 | /* | ||
| 98 | * Feature disable options | ||
| 99 | * These options are also useful to firmware size reduction. | ||
| 100 | */ | ||
| 101 | |||
| 102 | /* disable debug print */ | ||
| 103 | //#define NO_DEBUG | ||
| 104 | |||
| 105 | /* disable print */ | ||
| 106 | //#define NO_PRINT | ||
| 107 | |||
| 108 | /* disable action features */ | ||
| 109 | //#define NO_ACTION_LAYER | ||
| 110 | //#define NO_ACTION_TAPPING | ||
| 111 | //#define NO_ACTION_ONESHOT | ||
| 112 | //#define NO_ACTION_MACRO | ||
| 113 | //#define NO_ACTION_FUNCTION | ||
| 114 | |||
| 115 | /* | ||
| 116 | * WS2812 Underglow Matrix options | ||
| 117 | */ | ||
| 118 | #define RGB_DI_PIN A1 | ||
| 119 | #define RGBLED_NUM 9 | ||
| 120 | #define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 121 | |||
| 122 | #define WS2812_PWM_DRIVER PWMD2 | ||
| 123 | #define WS2812_PWM_CHANNEL 2 | ||
| 124 | #define WS2812_PWM_PAL_MODE 1 | ||
| 125 | #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 | ||
| 126 | #define WS2812_DMA_CHANNEL 2 | ||
| 127 | |||
| 128 | #define RGB_DISABLE_WHEN_USB_SUSPENDED | ||
diff --git a/keyboards/planck/rev6_drop/halconf.h b/keyboards/planck/rev6_drop/halconf.h new file mode 100644 index 000000000..153eacb21 --- /dev/null +++ b/keyboards/planck/rev6_drop/halconf.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* Copyright 2020 QMK | ||
| 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 3 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 <https://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #define HAL_USE_PWM TRUE | ||
| 19 | #define HAL_USE_GPT TRUE | ||
| 20 | #define HAL_USE_DAC TRUE | ||
| 21 | #define HAL_USE_I2C TRUE | ||
| 22 | |||
| 23 | #include_next <halconf.h> | ||
diff --git a/keyboards/planck/rev6_drop/info.json b/keyboards/planck/rev6_drop/info.json new file mode 100644 index 000000000..114a97129 --- /dev/null +++ b/keyboards/planck/rev6_drop/info.json | |||
| @@ -0,0 +1,262 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Planck rev 6", | ||
| 3 | "url": "https://olkb.com/planck", | ||
| 4 | "maintainer": "jackhumbert", | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT_ortho_4x12": { | ||
| 7 | "layout": [ | ||
| 8 | { "x": 0, "y": 0 }, | ||
| 9 | { "x": 1, "y": 0 }, | ||
| 10 | { "x": 2, "y": 0 }, | ||
| 11 | { "x": 3, "y": 0 }, | ||
| 12 | { "x": 4, "y": 0 }, | ||
| 13 | { "x": 5, "y": 0 }, | ||
| 14 | { "x": 6, "y": 0 }, | ||
| 15 | { "x": 7, "y": 0 }, | ||
| 16 | { "x": 8, "y": 0 }, | ||
| 17 | { "x": 9, "y": 0 }, | ||
| 18 | { "x": 10, "y": 0 }, | ||
| 19 | { "x": 11, "y": 0 }, | ||
| 20 | { "x": 0, "y": 1 }, | ||
| 21 | { "x": 1, "y": 1 }, | ||
| 22 | { "x": 2, "y": 1 }, | ||
| 23 | { "x": 3, "y": 1 }, | ||
| 24 | { "x": 4, "y": 1 }, | ||
| 25 | { "x": 5, "y": 1 }, | ||
| 26 | { "x": 6, "y": 1 }, | ||
| 27 | { "x": 7, "y": 1 }, | ||
| 28 | { "x": 8, "y": 1 }, | ||
| 29 | { "x": 9, "y": 1 }, | ||
| 30 | { "x": 10, "y": 1 }, | ||
| 31 | { "x": 11, "y": 1 }, | ||
| 32 | { "x": 0, "y": 2 }, | ||
| 33 | { "x": 1, "y": 2 }, | ||
| 34 | { "x": 2, "y": 2 }, | ||
| 35 | { "x": 3, "y": 2 }, | ||
| 36 | { "x": 4, "y": 2 }, | ||
| 37 | { "x": 5, "y": 2 }, | ||
| 38 | { "x": 6, "y": 2 }, | ||
| 39 | { "x": 7, "y": 2 }, | ||
| 40 | { "x": 8, "y": 2 }, | ||
| 41 | { "x": 9, "y": 2 }, | ||
| 42 | { "x": 10, "y": 2 }, | ||
| 43 | { "x": 11, "y": 2 }, | ||
| 44 | { "x": 0, "y": 3 }, | ||
| 45 | { "x": 1, "y": 3 }, | ||
| 46 | { "x": 2, "y": 3 }, | ||
| 47 | { "x": 3, "y": 3 }, | ||
| 48 | { "x": 4, "y": 3 }, | ||
| 49 | { "x": 5, "y": 3 }, | ||
| 50 | { "x": 6, "y": 3 }, | ||
| 51 | { "x": 7, "y": 3 }, | ||
| 52 | { "x": 8, "y": 3 }, | ||
| 53 | { "x": 9, "y": 3 }, | ||
| 54 | { "x": 10, "y": 3 }, | ||
| 55 | { "x": 11, "y": 3 } | ||
| 56 | ] | ||
| 57 | }, | ||
| 58 | "LAYOUT_planck_1x2uC": { | ||
| 59 | "layout": [ | ||
| 60 | { "x": 0, "y": 0 }, | ||
| 61 | { "x": 1, "y": 0 }, | ||
| 62 | { "x": 2, "y": 0 }, | ||
| 63 | { "x": 3, "y": 0 }, | ||
| 64 | { "x": 4, "y": 0 }, | ||
| 65 | { "x": 5, "y": 0 }, | ||
| 66 | { "x": 6, "y": 0 }, | ||
| 67 | { "x": 7, "y": 0 }, | ||
| 68 | { "x": 8, "y": 0 }, | ||
| 69 | { "x": 9, "y": 0 }, | ||
| 70 | { "x": 10, "y": 0 }, | ||
| 71 | { "x": 11, "y": 0 }, | ||
| 72 | { "x": 0, "y": 1 }, | ||
| 73 | { "x": 1, "y": 1 }, | ||
| 74 | { "x": 2, "y": 1 }, | ||
| 75 | { "x": 3, "y": 1 }, | ||
| 76 | { "x": 4, "y": 1 }, | ||
| 77 | { "x": 5, "y": 1 }, | ||
| 78 | { "x": 6, "y": 1 }, | ||
| 79 | { "x": 7, "y": 1 }, | ||
| 80 | { "x": 8, "y": 1 }, | ||
| 81 | { "x": 9, "y": 1 }, | ||
| 82 | { "x": 10, "y": 1 }, | ||
| 83 | { "x": 11, "y": 1 }, | ||
| 84 | { "x": 0, "y": 2 }, | ||
| 85 | { "x": 1, "y": 2 }, | ||
| 86 | { "x": 2, "y": 2 }, | ||
| 87 | { "x": 3, "y": 2 }, | ||
| 88 | { "x": 4, "y": 2 }, | ||
| 89 | { "x": 5, "y": 2 }, | ||
| 90 | { "x": 6, "y": 2 }, | ||
| 91 | { "x": 7, "y": 2 }, | ||
| 92 | { "x": 8, "y": 2 }, | ||
| 93 | { "x": 9, "y": 2 }, | ||
| 94 | { "x": 10, "y": 2 }, | ||
| 95 | { "x": 11, "y": 2 }, | ||
| 96 | { "x": 0, "y": 3 }, | ||
| 97 | { "x": 1, "y": 3 }, | ||
| 98 | { "x": 2, "y": 3 }, | ||
| 99 | { "x": 3, "y": 3 }, | ||
| 100 | { "x": 4, "y": 3 }, | ||
| 101 | { "x": 5, "y": 3, "w": 2 }, | ||
| 102 | { "x": 7, "y": 3 }, | ||
| 103 | { "x": 8, "y": 3 }, | ||
| 104 | { "x": 9, "y": 3 }, | ||
| 105 | { "x": 10, "y": 3 }, | ||
| 106 | { "x": 11, "y": 3 } | ||
| 107 | ] | ||
| 108 | }, | ||
| 109 | "LAYOUT_planck_1x2uL": { | ||
| 110 | "layout": [ | ||
| 111 | { "x": 0, "y": 0 }, | ||
| 112 | { "x": 1, "y": 0 }, | ||
| 113 | { "x": 2, "y": 0 }, | ||
| 114 | { "x": 3, "y": 0 }, | ||
| 115 | { "x": 4, "y": 0 }, | ||
| 116 | { "x": 5, "y": 0 }, | ||
| 117 | { "x": 6, "y": 0 }, | ||
| 118 | { "x": 7, "y": 0 }, | ||
| 119 | { "x": 8, "y": 0 }, | ||
| 120 | { "x": 9, "y": 0 }, | ||
| 121 | { "x": 10, "y": 0 }, | ||
| 122 | { "x": 11, "y": 0 }, | ||
| 123 | { "x": 0, "y": 1 }, | ||
| 124 | { "x": 1, "y": 1 }, | ||
| 125 | { "x": 2, "y": 1 }, | ||
| 126 | { "x": 3, "y": 1 }, | ||
| 127 | { "x": 4, "y": 1 }, | ||
| 128 | { "x": 5, "y": 1 }, | ||
| 129 | { "x": 6, "y": 1 }, | ||
| 130 | { "x": 7, "y": 1 }, | ||
| 131 | { "x": 8, "y": 1 }, | ||
| 132 | { "x": 9, "y": 1 }, | ||
| 133 | { "x": 10, "y": 1 }, | ||
| 134 | { "x": 11, "y": 1 }, | ||
| 135 | { "x": 0, "y": 2 }, | ||
| 136 | { "x": 1, "y": 2 }, | ||
| 137 | { "x": 2, "y": 2 }, | ||
| 138 | { "x": 3, "y": 2 }, | ||
| 139 | { "x": 4, "y": 2 }, | ||
| 140 | { "x": 5, "y": 2 }, | ||
| 141 | { "x": 6, "y": 2 }, | ||
| 142 | { "x": 7, "y": 2 }, | ||
| 143 | { "x": 8, "y": 2 }, | ||
| 144 | { "x": 9, "y": 2 }, | ||
| 145 | { "x": 10, "y": 2 }, | ||
| 146 | { "x": 11, "y": 2 }, | ||
| 147 | { "x": 0, "y": 3 }, | ||
| 148 | { "x": 1, "y": 3 }, | ||
| 149 | { "x": 2, "y": 3 }, | ||
| 150 | { "x": 3, "y": 3 }, | ||
| 151 | { "x": 4, "y": 3, "w": 2 }, | ||
| 152 | { "x": 6, "y": 3 }, | ||
| 153 | { "x": 7, "y": 3 }, | ||
| 154 | { "x": 8, "y": 3 }, | ||
| 155 | { "x": 9, "y": 3 }, | ||
| 156 | { "x": 10, "y": 3 }, | ||
| 157 | { "x": 11, "y": 3 } | ||
| 158 | ] | ||
| 159 | }, | ||
| 160 | "LAYOUT_planck_1x2uR": { | ||
| 161 | "layout": [ | ||
| 162 | { "x": 0, "y": 0 }, | ||
| 163 | { "x": 1, "y": 0 }, | ||
| 164 | { "x": 2, "y": 0 }, | ||
| 165 | { "x": 3, "y": 0 }, | ||
| 166 | { "x": 4, "y": 0 }, | ||
| 167 | { "x": 5, "y": 0 }, | ||
| 168 | { "x": 6, "y": 0 }, | ||
| 169 | { "x": 7, "y": 0 }, | ||
| 170 | { "x": 8, "y": 0 }, | ||
| 171 | { "x": 9, "y": 0 }, | ||
| 172 | { "x": 10, "y": 0 }, | ||
| 173 | { "x": 11, "y": 0 }, | ||
| 174 | { "x": 0, "y": 1 }, | ||
| 175 | { "x": 1, "y": 1 }, | ||
| 176 | { "x": 2, "y": 1 }, | ||
| 177 | { "x": 3, "y": 1 }, | ||
| 178 | { "x": 4, "y": 1 }, | ||
| 179 | { "x": 5, "y": 1 }, | ||
| 180 | { "x": 6, "y": 1 }, | ||
| 181 | { "x": 7, "y": 1 }, | ||
| 182 | { "x": 8, "y": 1 }, | ||
| 183 | { "x": 9, "y": 1 }, | ||
| 184 | { "x": 10, "y": 1 }, | ||
| 185 | { "x": 11, "y": 1 }, | ||
| 186 | { "x": 0, "y": 2 }, | ||
| 187 | { "x": 1, "y": 2 }, | ||
| 188 | { "x": 2, "y": 2 }, | ||
| 189 | { "x": 3, "y": 2 }, | ||
| 190 | { "x": 4, "y": 2 }, | ||
| 191 | { "x": 5, "y": 2 }, | ||
| 192 | { "x": 6, "y": 2 }, | ||
| 193 | { "x": 7, "y": 2 }, | ||
| 194 | { "x": 8, "y": 2 }, | ||
| 195 | { "x": 9, "y": 2 }, | ||
| 196 | { "x": 10, "y": 2 }, | ||
| 197 | { "x": 11, "y": 2 }, | ||
| 198 | { "x": 0, "y": 3 }, | ||
| 199 | { "x": 1, "y": 3 }, | ||
| 200 | { "x": 2, "y": 3 }, | ||
| 201 | { "x": 3, "y": 3 }, | ||
| 202 | { "x": 4, "y": 3 }, | ||
| 203 | { "x": 5, "y": 3 }, | ||
| 204 | { "x": 6, "y": 3, "w": 2 }, | ||
| 205 | { "x": 8, "y": 3 }, | ||
| 206 | { "x": 9, "y": 3 }, | ||
| 207 | { "x": 10, "y": 3 }, | ||
| 208 | { "x": 11, "y": 3 } | ||
| 209 | ] | ||
| 210 | }, | ||
| 211 | "LAYOUT_planck_2x2u": { | ||
| 212 | "layout": [ | ||
| 213 | { "x": 0, "y": 0 }, | ||
| 214 | { "x": 1, "y": 0 }, | ||
| 215 | { "x": 2, "y": 0 }, | ||
| 216 | { "x": 3, "y": 0 }, | ||
| 217 | { "x": 4, "y": 0 }, | ||
| 218 | { "x": 5, "y": 0 }, | ||
| 219 | { "x": 6, "y": 0 }, | ||
| 220 | { "x": 7, "y": 0 }, | ||
| 221 | { "x": 8, "y": 0 }, | ||
| 222 | { "x": 9, "y": 0 }, | ||
| 223 | { "x": 10, "y": 0 }, | ||
| 224 | { "x": 11, "y": 0 }, | ||
| 225 | { "x": 0, "y": 1 }, | ||
| 226 | { "x": 1, "y": 1 }, | ||
| 227 | { "x": 2, "y": 1 }, | ||
| 228 | { "x": 3, "y": 1 }, | ||
| 229 | { "x": 4, "y": 1 }, | ||
| 230 | { "x": 5, "y": 1 }, | ||
| 231 | { "x": 6, "y": 1 }, | ||
| 232 | { "x": 7, "y": 1 }, | ||
| 233 | { "x": 8, "y": 1 }, | ||
| 234 | { "x": 9, "y": 1 }, | ||
| 235 | { "x": 10, "y": 1 }, | ||
| 236 | { "x": 11, "y": 1 }, | ||
| 237 | { "x": 0, "y": 2 }, | ||
| 238 | { "x": 1, "y": 2 }, | ||
| 239 | { "x": 2, "y": 2 }, | ||
| 240 | { "x": 3, "y": 2 }, | ||
| 241 | { "x": 4, "y": 2 }, | ||
| 242 | { "x": 5, "y": 2 }, | ||
| 243 | { "x": 6, "y": 2 }, | ||
| 244 | { "x": 7, "y": 2 }, | ||
| 245 | { "x": 8, "y": 2 }, | ||
| 246 | { "x": 9, "y": 2 }, | ||
| 247 | { "x": 10, "y": 2 }, | ||
| 248 | { "x": 11, "y": 2 }, | ||
| 249 | { "x": 0, "y": 3 }, | ||
| 250 | { "x": 1, "y": 3 }, | ||
| 251 | { "x": 2, "y": 3 }, | ||
| 252 | { "x": 3, "y": 3 }, | ||
| 253 | { "x": 4, "y": 3, "w": 2 }, | ||
| 254 | { "x": 6, "y": 3, "w": 2 }, | ||
| 255 | { "x": 8, "y": 3 }, | ||
| 256 | { "x": 9, "y": 3 }, | ||
| 257 | { "x": 10, "y": 3 }, | ||
| 258 | { "x": 11, "y": 3 } | ||
| 259 | ] | ||
| 260 | } | ||
| 261 | } | ||
| 262 | } | ||
diff --git a/keyboards/planck/rev6_drop/matrix.c b/keyboards/planck/rev6_drop/matrix.c new file mode 100644 index 000000000..49e115d02 --- /dev/null +++ b/keyboards/planck/rev6_drop/matrix.c | |||
| @@ -0,0 +1,166 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * 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/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <stdint.h> | ||
| 19 | #include <stdbool.h> | ||
| 20 | #include <string.h> | ||
| 21 | #include "hal.h" | ||
| 22 | #include "timer.h" | ||
| 23 | #include "wait.h" | ||
| 24 | #include "debug.h" | ||
| 25 | #include "matrix.h" | ||
| 26 | |||
| 27 | /* | ||
| 28 | * col: { B11, B10, B2, B1, A7, B0 } | ||
| 29 | * row: { A10, A9, A8, B15, C13, C14, C15, A2 } | ||
| 30 | */ | ||
| 31 | /* matrix state(1:on, 0:off) */ | ||
| 32 | static matrix_row_t matrix[MATRIX_ROWS]; | ||
| 33 | static matrix_row_t matrix_debouncing[MATRIX_COLS]; | ||
| 34 | static bool debouncing = false; | ||
| 35 | static uint16_t debouncing_time = 0; | ||
| 36 | |||
| 37 | __attribute__((weak)) void matrix_init_user(void) {} | ||
| 38 | |||
| 39 | __attribute__((weak)) void matrix_scan_user(void) {} | ||
| 40 | |||
| 41 | __attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } | ||
| 42 | |||
| 43 | __attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } | ||
| 44 | |||
| 45 | void matrix_init(void) { | ||
| 46 | dprintf("matrix init\n"); | ||
| 47 | // debug_matrix = true; | ||
| 48 | |||
| 49 | // actual matrix setup | ||
| 50 | palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 51 | palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 52 | palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 53 | palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 54 | palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 55 | palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 56 | |||
| 57 | palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); | ||
| 58 | palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN); | ||
| 59 | palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN); | ||
| 60 | palSetPadMode(GPIOB, 15, PAL_MODE_INPUT_PULLDOWN); | ||
| 61 | palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLDOWN); | ||
| 62 | palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN); | ||
| 63 | palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN); | ||
| 64 | palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN); | ||
| 65 | |||
| 66 | memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); | ||
| 67 | memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); | ||
| 68 | |||
| 69 | matrix_init_quantum(); | ||
| 70 | } | ||
| 71 | |||
| 72 | uint8_t matrix_scan(void) { | ||
| 73 | // actual matrix | ||
| 74 | for (int col = 0; col < MATRIX_COLS; col++) { | ||
| 75 | matrix_row_t data = 0; | ||
| 76 | |||
| 77 | // strobe col { B11, B10, B2, B1, A7, B0 } | ||
| 78 | switch (col) { | ||
| 79 | case 0: | ||
| 80 | palSetPad(GPIOB, 11); | ||
| 81 | break; | ||
| 82 | case 1: | ||
| 83 | palSetPad(GPIOB, 10); | ||
| 84 | break; | ||
| 85 | case 2: | ||
| 86 | palSetPad(GPIOB, 2); | ||
| 87 | break; | ||
| 88 | case 3: | ||
| 89 | palSetPad(GPIOB, 1); | ||
| 90 | break; | ||
| 91 | case 4: | ||
| 92 | palSetPad(GPIOA, 7); | ||
| 93 | break; | ||
| 94 | case 5: | ||
| 95 | palSetPad(GPIOB, 0); | ||
| 96 | break; | ||
| 97 | } | ||
| 98 | |||
| 99 | // need wait to settle pin state | ||
| 100 | wait_us(20); | ||
| 101 | |||
| 102 | // read row data { A10, A9, A8, B15, C13, C14, C15, A2 } | ||
| 103 | data = ((palReadPad(GPIOA, 10) << 0) | (palReadPad(GPIOA, 9) << 1) | (palReadPad(GPIOA, 8) << 2) | (palReadPad(GPIOB, 15) << 3) | (palReadPad(GPIOC, 13) << 4) | (palReadPad(GPIOC, 14) << 5) | (palReadPad(GPIOC, 15) << 6) | (palReadPad(GPIOA, 2) << 7)); | ||
| 104 | |||
| 105 | // unstrobe col { B11, B10, B2, B1, A7, B0 } | ||
| 106 | switch (col) { | ||
| 107 | case 0: | ||
| 108 | palClearPad(GPIOB, 11); | ||
| 109 | break; | ||
| 110 | case 1: | ||
| 111 | palClearPad(GPIOB, 10); | ||
| 112 | break; | ||
| 113 | case 2: | ||
| 114 | palClearPad(GPIOB, 2); | ||
| 115 | break; | ||
| 116 | case 3: | ||
| 117 | palClearPad(GPIOB, 1); | ||
| 118 | break; | ||
| 119 | case 4: | ||
| 120 | palClearPad(GPIOA, 7); | ||
| 121 | break; | ||
| 122 | case 5: | ||
| 123 | palClearPad(GPIOB, 0); | ||
| 124 | break; | ||
| 125 | } | ||
| 126 | |||
| 127 | if (matrix_debouncing[col] != data) { | ||
| 128 | matrix_debouncing[col] = data; | ||
| 129 | debouncing = true; | ||
| 130 | debouncing_time = timer_read(); | ||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 134 | if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { | ||
| 135 | for (int row = 0; row < MATRIX_ROWS; row++) { | ||
| 136 | matrix[row] = 0; | ||
| 137 | for (int col = 0; col < MATRIX_COLS; col++) { | ||
| 138 | matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); | ||
| 139 | } | ||
| 140 | } | ||
| 141 | debouncing = false; | ||
| 142 | } | ||
| 143 | |||
| 144 | matrix_scan_quantum(); | ||
| 145 | |||
| 146 | return 1; | ||
| 147 | } | ||
| 148 | |||
| 149 | bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1 << col)); } | ||
| 150 | |||
| 151 | matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } | ||
| 152 | |||
| 153 | void matrix_print(void) { | ||
| 154 | dprintf("\nr/c 01234567\n"); | ||
| 155 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
| 156 | dprintf("%X0: ", row); | ||
| 157 | matrix_row_t data = matrix_get_row(row); | ||
| 158 | for (int col = 0; col < MATRIX_COLS; col++) { | ||
| 159 | if (data & (1 << col)) | ||
| 160 | dprintf("1"); | ||
| 161 | else | ||
| 162 | dprintf("0"); | ||
| 163 | } | ||
| 164 | dprintf("\n"); | ||
| 165 | } | ||
| 166 | } | ||
diff --git a/keyboards/planck/rev6_drop/mcuconf.h b/keyboards/planck/rev6_drop/mcuconf.h new file mode 100644 index 000000000..d7c29fcf6 --- /dev/null +++ b/keyboards/planck/rev6_drop/mcuconf.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* Copyright 2020 QMK Contributors | ||
| 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 3 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 | #include_next "mcuconf.h" | ||
| 18 | |||
| 19 | // The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used | ||
| 20 | // on the Planck requires the use of TIM2 to run PWM -- rework which timers are | ||
| 21 | // allocated for PWM usage. | ||
| 22 | #undef STM32_PWM_USE_TIM2 | ||
| 23 | #define STM32_PWM_USE_TIM2 TRUE | ||
| 24 | |||
| 25 | #undef STM32_DAC_USE_DAC1_CH1 | ||
| 26 | #define STM32_DAC_USE_DAC1_CH1 TRUE | ||
| 27 | #undef STM32_DAC_USE_DAC1_CH2 | ||
| 28 | #define STM32_DAC_USE_DAC1_CH2 TRUE | ||
| 29 | #undef STM32_GPT_USE_TIM6 | ||
| 30 | #define STM32_GPT_USE_TIM6 TRUE | ||
| 31 | #undef STM32_GPT_USE_TIM7 | ||
| 32 | #define STM32_GPT_USE_TIM7 TRUE | ||
| 33 | #undef STM32_GPT_USE_TIM8 | ||
| 34 | #define STM32_GPT_USE_TIM8 TRUE | ||
| 35 | |||
| 36 | // As mentioned above, we need to reallocate the SysTick timer used from | ||
| 37 | // TIM2 to TIM3. | ||
| 38 | #undef STM32_ST_USE_TIMER | ||
| 39 | #define STM32_ST_USE_TIMER 3 | ||
| 40 | |||
| 41 | // enable i2c | ||
| 42 | #undef STM32_I2C_USE_I2C1 | ||
| 43 | #define STM32_I2C_USE_I2C1 TRUE | ||
| 44 | |||
diff --git a/keyboards/planck/rev6_drop/readme.md b/keyboards/planck/rev6_drop/readme.md new file mode 100644 index 000000000..0ea2619ac --- /dev/null +++ b/keyboards/planck/rev6_drop/readme.md | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # Planck | ||
| 2 | |||
| 3 | A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. A complete hardware rework of the Planck, sporting a faster and more powerful STM32 ARM Cortex-M4 microcontroller, with support for rotary encoders and three additional layouts. [More info on qmk.fm](http://qmk.fm/planck/) | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) | ||
| 6 | * Hardware Supported: Planck PCB rev6 | ||
| 7 | * Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make planck/rev6_drop:default | ||
| 12 | |||
| 13 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/planck/rev6_drop/rev6_drop.c b/keyboards/planck/rev6_drop/rev6_drop.c new file mode 100644 index 000000000..4c41af380 --- /dev/null +++ b/keyboards/planck/rev6_drop/rev6_drop.c | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
| 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 | #include "rev6_drop.h" | ||
| 17 | |||
| 18 | #ifdef RGB_MATRIX_ENABLE | ||
| 19 | // clang-format off | ||
| 20 | led_config_t g_led_config = { { | ||
| 21 | // Key Matrix to LED Index | ||
| 22 | { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, | ||
| 23 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, | ||
| 24 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, | ||
| 25 | { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED }, | ||
| 26 | { NO_LED, 4, NO_LED, NO_LED, 3, NO_LED }, | ||
| 27 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, | ||
| 28 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, | ||
| 29 | { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED }, | ||
| 30 | }, { | ||
| 31 | // LED Index to Physical Position | ||
| 32 | {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} | ||
| 33 | }, { | ||
| 34 | // LED Index to Flag | ||
| 35 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, | ||
| 36 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL | ||
| 37 | } }; | ||
| 38 | |||
| 39 | // LED physical location index | ||
| 40 | // 6 5 4 3 | ||
| 41 | // 0 | ||
| 42 | // 7 8 1 2 | ||
| 43 | |||
| 44 | #endif | ||
diff --git a/keyboards/planck/rev6_drop/rev6_drop.h b/keyboards/planck/rev6_drop/rev6_drop.h new file mode 100644 index 000000000..bc9434a02 --- /dev/null +++ b/keyboards/planck/rev6_drop/rev6_drop.h | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include "planck.h" | ||
| 19 | |||
| 20 | #define LAYOUT_planck_1x2uC( \ | ||
| 21 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
| 22 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
| 23 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
| 24 | k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ | ||
| 25 | ) \ | ||
| 26 | { \ | ||
| 27 | { k00, k01, k02, k03, k04, k05 }, \ | ||
| 28 | { k10, k11, k12, k13, k14, k15 }, \ | ||
| 29 | { k20, k21, k22, k23, k24, k25 }, \ | ||
| 30 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
| 31 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
| 32 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
| 33 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
| 34 | { k36, k37, k38, k33, k34, KC_NO } \ | ||
| 35 | } | ||
| 36 | |||
| 37 | #define LAYOUT_planck_1x2uR( \ | ||
| 38 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
| 39 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
| 40 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
| 41 | k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ | ||
| 42 | ) \ | ||
| 43 | { \ | ||
| 44 | { k00, k01, k02, k03, k04, k05 }, \ | ||
| 45 | { k10, k11, k12, k13, k14, k15 }, \ | ||
| 46 | { k20, k21, k22, k23, k24, k25 }, \ | ||
| 47 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
| 48 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
| 49 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
| 50 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
| 51 | { KC_NO, k37, k38, k33, k34, k35 } \ | ||
| 52 | } | ||
| 53 | |||
| 54 | #define LAYOUT_planck_1x2uL( \ | ||
| 55 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
| 56 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
| 57 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
| 58 | k30, k31, k32, k33, k35, k36, k37, k38, k39, k3a, k3b \ | ||
| 59 | ) \ | ||
| 60 | { \ | ||
| 61 | { k00, k01, k02, k03, k04, k05 }, \ | ||
| 62 | { k10, k11, k12, k13, k14, k15 }, \ | ||
| 63 | { k20, k21, k22, k23, k24, k25 }, \ | ||
| 64 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
| 65 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
| 66 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
| 67 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
| 68 | { k36, k37, k38, k33, KC_NO, k35 } \ | ||
| 69 | } | ||
| 70 | |||
| 71 | #define LAYOUT_planck_2x2u( \ | ||
| 72 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
| 73 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
| 74 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
| 75 | k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ | ||
| 76 | ) \ | ||
| 77 | { \ | ||
| 78 | { k00, k01, k02, k03, k04, k05 }, \ | ||
| 79 | { k10, k11, k12, k13, k14, k15 }, \ | ||
| 80 | { k20, k21, k22, k23, k24, k25 }, \ | ||
| 81 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
| 82 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
| 83 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
| 84 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
| 85 | { KC_NO, k37, k38, k33, KC_NO, k35 } \ | ||
| 86 | } | ||
| 87 | |||
| 88 | #define LAYOUT_ortho_4x12( \ | ||
| 89 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
| 90 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
| 91 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
| 92 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ | ||
| 93 | ) \ | ||
| 94 | { \ | ||
| 95 | { k00, k01, k02, k03, k04, k05 }, \ | ||
| 96 | { k10, k11, k12, k13, k14, k15 }, \ | ||
| 97 | { k20, k21, k22, k23, k24, k25 }, \ | ||
| 98 | { k30, k31, k32, k39, k3a, k3b }, \ | ||
| 99 | { k06, k07, k08, k09, k0a, k0b }, \ | ||
| 100 | { k16, k17, k18, k19, k1a, k1b }, \ | ||
| 101 | { k26, k27, k28, k29, k2a, k2b }, \ | ||
| 102 | { k36, k37, k38, k33, k34, k35 } \ | ||
| 103 | } | ||
| 104 | |||
| 105 | |||
| 106 | #define LAYOUT LAYOUT_ortho_4x12 | ||
| 107 | #define LAYOUT_planck_mit LAYOUT_planck_1x2uC | ||
| 108 | #define LAYOUT_planck_grid LAYOUT_ortho_4x12 | ||
diff --git a/keyboards/planck/rev6_drop/rules.mk b/keyboards/planck/rev6_drop/rules.mk new file mode 100644 index 000000000..c35de3d74 --- /dev/null +++ b/keyboards/planck/rev6_drop/rules.mk | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F303 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = stm32-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = yes # Console for debug | ||
| 14 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | AUDIO_ENABLE = yes # Audio output | ||
| 22 | WS2812_DRIVER = pwm | ||
| 23 | CUSTOM_MATRIX = yes | ||
| 24 | # Do not enable RGB_MATRIX_ENABLE together with RGBLIGHT_ENABLE | ||
| 25 | RGB_MATRIX_ENABLE = no | ||
| 26 | RGB_MATRIX_DRIVER = WS2812 | ||
| 27 | ENCODER_ENABLE = yes | ||
| 28 | DIP_SWITCH_ENABLE = yes | ||
| 29 | |||
| 30 | SRC += matrix.c | ||
| 31 | |||
| 32 | LAYOUTS = ortho_4x12 planck_mit | ||
| 33 | LAYOUTS_HAS_RGB = no | ||
