summaryrefslogtreecommitdiff
path: root/keyboards/planck
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2021-09-20 16:58:29 +1000
committerfauxpark <fauxpark@gmail.com>2021-09-20 16:58:29 +1000
commitc38a7308054f2072d234ee0d44d3bea9f809a63d (patch)
treef84f46444812526c63c3892ca1783834e91599d9 /keyboards/planck
parent28b8b578b055bf76b28f47f9fd02db351cacfa09 (diff)
parent574b6734afb6ec7073f6fb816dd454f03b7eb26f (diff)
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'keyboards/planck')
-rw-r--r--keyboards/planck/keymaps/jweickm/config.h69
-rw-r--r--keyboards/planck/keymaps/jweickm/keymap.c1131
-rw-r--r--keyboards/planck/keymaps/jweickm/readme.md154
-rw-r--r--keyboards/planck/keymaps/jweickm/rules.mk5
-rw-r--r--keyboards/planck/planck.h20
-rw-r--r--keyboards/planck/rev6_drop/chconf.h29
-rw-r--r--keyboards/planck/rev6_drop/config.h128
-rw-r--r--keyboards/planck/rev6_drop/halconf.h23
-rw-r--r--keyboards/planck/rev6_drop/info.json262
-rw-r--r--keyboards/planck/rev6_drop/matrix.c166
-rw-r--r--keyboards/planck/rev6_drop/mcuconf.h44
-rw-r--r--keyboards/planck/rev6_drop/readme.md13
-rw-r--r--keyboards/planck/rev6_drop/rev6_drop.c44
-rw-r--r--keyboards/planck/rev6_drop/rev6_drop.h108
-rw-r--r--keyboards/planck/rev6_drop/rules.mk33
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 0000000000..3b34ddf832
--- /dev/null
+++ b/keyboards/planck/keymaps/jweickm/config.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PLANCK_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND), \
+ SONG(WORKMAN_SOUND), \
+ SONG(PLOVER_SOUND), \
+ SONG(STARTUP_SOUND), \
+ SONG(PREONIC_SOUND), \
+ SONG(GOODBYE_SOUND), \
+ }
+#endif
+
+/*
+ * MIDI options
+ */
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+
+// Most tactile encoders have detents every 4 stages
+#define ENCODER_RESOLUTION 4
+
+// settings for HOME ROW MODS
+#define TAPPING_TERM 160 // 200 ms is the default value
+#define TAPPING_TERM_PER_KEY
+//#define PERMISSIVE_HOLD
+#define IGNORE_MOD_TAP_INTERRUPT
+#define TAPPING_FORCE_HOLD_PER_KEY
+
+// settings for LEADER key
+#define LEADER_PER_KEY_TIMING
+#define LEADER_TIMEOUT 250
+#define LEADER_NO_TIMEOUT
+
+#define RGBLIGHT_SLEEP // RGB lighting will switch off when the host goes to sleep
+#define RGBLIGHT_LAYERS
diff --git a/keyboards/planck/keymaps/jweickm/keymap.c b/keyboards/planck/keymaps/jweickm/keymap.c
new file mode 100644
index 0000000000..02138a876c
--- /dev/null
+++ b/keyboards/planck/keymaps/jweickm/keymap.c
@@ -0,0 +1,1131 @@
+/* Copyright 2015-2017 Jack Humbert
+ * Copyright 2021 Jakob Weickmann
+ *
+ This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+#include "muse.h"
+
+enum planck_layers {
+ _HRWIDECOLEMAK,
+ _HRWIDECOLEMAK_DE,
+ _GAMING,
+ _WIDECOLEMAK,
+ _LOWER,
+ _RAISE,
+ _LOWER_DE,
+ _RAISE_DE,
+ _ADJUST,
+ _NAV,
+ _VIM,
+ _NUM,
+ _MOUSE,
+};
+
+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 };
+
+// Tap Dance declarations
+enum tap_dance_codes {
+ TD_PRN, // round brackets (parentheses)
+ TD_PRN_DE, // round brackets (parentheses)
+ TD_BRC, // square brackets
+ TD_BRC_DE, // square brackets
+ TD_CBR, // curly brackets
+ TD_CBR_DE, // curly brackets
+ TD_VIM_GG // single tap to scroll down, double tap to scroll up
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* _HRWIDECOLEMAK
+ * ,-----------------------------------------------------------------------------------.
+ * | G-Q | A-W | S-F | C-P |_Num-B|Vol/B+|_Num-J| C-L | S-U | A-Y | G-/ | ü |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | A | R | S | T | G | TAB | M | N | E | I | O | ' |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |_Mo-Z | X | C | D | V |Vol/B-| K | H | , | . |_Mo-/ | \ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |C-CAPS| LEAD | BSPC |_L-ESC| LSFT | _Nav-SPC |_R-ENT|S-DEL | RALT |_Mo <-|_Mo ->|
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_HRWIDECOLEMAK] = LAYOUT_planck_grid(
+ 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,
+ KC_A, KC_R, KC_S, KC_T, KC_G, KC_TAB, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ 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,
+ 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)
+ ),
+
+ /* _HRWIDECOLEMAK_DE
+ * same as above, when the PC is set to German layout
+ * ,-----------------------------------------------------------------------------------.
+ * | G-Q | A-W | S-F | C-P |_Num-B|Vol/B+|_Num-J| C-L | S-U | A-Y | G-/ | ü |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | A | R | S | T | G | TAB | M | N | E | I | O | ' |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |_Mo-Z | X | C | D | V |Vol/B-| K | H | , | . |_Mo-/ | \ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |C-CAPS| LEAD | BSPC |_L-ESC| LSFT | _Nav-SPC |_R-ENT|S-DEL | RALT |_Mo <-|_Mo ->|
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_HRWIDECOLEMAK_DE] = LAYOUT_planck_grid(
+ 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,
+ KC_A, KC_R, KC_S, KC_T, KC_G, KC_TAB, KC_M, KC_N, KC_E, KC_I, KC_O, DE_QUOT,
+ 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,
+ 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)
+ ),
+
+ /* _GAMING
+ * ,-----------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | F5 | F8 | F9 |Vol/B+|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | TAB | Q | W | E | R | T | Y | U | I | O | P |Vol/B-|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | LSFT | A | S | D | F | G | H | J | Z | M | ; |_CM-EN|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | LCTL | C | B | X | LALT | SPACE | ENT | RALT | ____ | ____ | !GAME|
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_GAMING] = LAYOUT_planck_grid(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_F5, KC_F8, KC_F9, KC_VOLU,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_VOLD,
+ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_Z, KC_M, KC_SCLN, TG_COLEMAK,
+ KC_LCTL, KC_C, KC_B, KC_X, KC_LALT, KC_SPC, KC_SPC, KC_ENT, KC_RALT, KC_TRNS, KC_TRNS, GAMING
+ ),
+
+ /* WIDECOLEMAK
+ * no mod taps
+ * ,-----------------------------------------------------------------------------------.
+ * | Q | W | F | P | B |Vol/B+| J | L | U | Y | / | Ü |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | A | R | S | T | G | TAB | M | N | E | I | O | ' |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Z | X | C | D | V |Vol/B-| K | H | , | . | / |!CM-EN|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |C-CAPS|G-TAB |MN-ESC|_L-BSP| LSFT | _NAV-SPC |_R-ENT|S-DEL |C-TAB |_Mo <-|_Mo ->|
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_WIDECOLEMAK] = LAYOUT_planck_grid(
+ 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,
+ 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,
+ 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,
+ 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)
+ ),
+
+ /* _LOWER
+ * ,-----------------------------------------------------------------------------------.
+ * | ! | @ | # | $ | % | ~ | ^ | & | * | ( | ) | Ö |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F1 | F2 | F3 | F4 | F5 | F6 | ß | _ | + | { | } | Ä |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | / | \ | | | € | è |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |!MOUSE| ____ | ____ | ____ | ____ | ____ | ____ | Vol- | Vol+ | ↓ | ↑ |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_LOWER] = LAYOUT_planck_grid(
+ 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,
+ 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,
+ 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,
+ TG(_MOUSE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_DOWN, KC_UP
+ ),
+
+ /* _LOWER_DE
+ * ,-----------------------------------------------------------------------------------.
+ * | ! | @ | # | $ | % | ~ | ^ | & | * | ( | ) | Ö |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F1 | F2 | F3 | F4 | F5 | F6 | ß | _ | + | { | } | Ä |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | / | \ | | | € | ` |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |!MOUSE| ____ | ____ | ____ | ____ | ____ | ____ | Vol- | Vol+ | ↓ | ↑ |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_LOWER_DE] = LAYOUT_planck_grid(
+ 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),
+ 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),
+ 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,
+ TG(_MOUSE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_DOWN, KC_UP
+ ),
+
+ /* _RAISE
+ * ,-----------------------------------------------------------------------------------.
+ * | 1 | 2 | 3 | 4 | 5 | ` | 6 | 7 | 8 | 9 | 0 | ö |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F1 | F2 | F3 | F4 | F5 | F6 | ß | - | = | [ | ] | ä |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | \ | , | . | / | é |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |!MOUSE| ____ | ____ | BSPC | ____ | ____ | ____ | |<< | >>| | ↓ | ↑ |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_RAISE] = LAYOUT_planck_grid(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_6, KC_7, KC_8, KC_9, KC_0, DE_oe,
+ 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,
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_BSLS, KC_COMM, KC_DOT, KC_SLSH, DE_EAIGU,
+ TG(_MOUSE), KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_DOWN, KC_UP
+ ),
+
+ /* _RAISE_DE
+ * ,-----------------------------------------------------------------------------------.
+ * | 1 | 2 | 3 | 4 | 5 | ` | 6 | 7 | 8 | 9 | 0 | ö |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F1 | F2 | F3 | F4 | F5 | F6 | ß | - | = | [ | ] | ä |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | \ | , | . | / | ´ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |!MOUSE| ____ | ____ | BSPC | ____ | ____ | ____ | |<< | >>| | ↓ | ↑ |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_RAISE_DE] = LAYOUT_planck_grid(
+ 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,
+ 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,
+ 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,
+ TG(_MOUSE), KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_DOWN, KC_UP
+ ),
+
+ /* _ADJUST
+ * ,-----------------------------------------------------------------------------------.
+ * | A-SFT| RESET| DEBUG|RGBTOG|RGBMOD|RGBHUI|RGBHUD|RGBSAI|RGBSAD|RGBVAI|RGBVAD| DE_SW|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | A-GRV|EEPRST|MU_MOD| AU_ON|AU_OFF|AGNORM|AGSWAP|!HRWCM| !WCM | A-GRV| !LANG| !GAME|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | ____ |MUV_DE|MUV_IN| MU_ON|MU_OFF| MI_ON|MI_OFF| Vol- | MPLY | Vol+ | ____ | ____ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |EEPRST|
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_ADJUST] = LAYOUT_planck_grid(
+ LALT(KC_LSFT), RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DE_SWITCH,
+ LALT(KC_GRV), EEP_RST, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, HRWIDECOLEMAK, WIDECOLEMAK, LALT(KC_GRV), LANG_SWITCH, GAMING,
+ 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,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEPROM_RESET
+ ),
+
+ /* _NAV
+ * ,-----------------------------------------------------------------------------------.
+ * |A(TAB)| C(->)| !LANG|A(GRV)| C(<-)| >>| | HOME | -> | PGUP | COPY | PASTE| DE_SW|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |C(TAB)| TAB | ESC | ENT |VIM_GG| MPLY | <- | ↓ | ↑ | -> | END | VIM_O|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | LSFT | XXXX |S(DEL)| CAPS | VIM_V| MUTE | HOME | PGDN | LSFT | RFST | C(F) | C(F) |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | XXXX | XXXX | ____ | BSPC | ____ | ____ | ENT | DEL | ____ | ____ | DE_SW|
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_NAV] = LAYOUT_planck_grid(
+ 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,
+ 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,
+ 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),
+ 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
+ ),
+
+ /* _VIM
+ * ,-----------------------------------------------------------------------------------.
+ * |A(TAB)| C(->)| !LANG|A(GRV)| C(<-)| >>| | HOME | -> | PGUP | COPY | PASTE| DE_SW|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |C(TAB)| TAB | ESC | ENT |VIM_GG| MPLY | <- | ↓ | ↑ | -> | END | VIM_O|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | LSFT | XXXX |S(DEL)| CAPS | VIM_V| MUTE | HOME | PGDN | LSFT | RFST | C(F) | C(F) |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | XXXX | XXXX | !VIM | BSPC | ____ | ____ | ENT | DEL | ____ | ↓ | ↑ |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_VIM] = LAYOUT_planck_grid(
+ 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,
+ 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,
+ 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),
+ 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
+ ),
+
+ /* _NUM
+ * ,-----------------------------------------------------------------------------------.
+ * | F1 | F2 | F3 | F4 | |<< |NUMLCK| >>| | 7 | 8 | 9 | - | ____ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F5 | F6 | F7 | F8 | Vol+ | MPLY | * | 4 | 5 | 6 | + | . |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F9 | F10 | F11 | F12 | Vol- | MUTE | = | 1 | 2 | 3 | / | , |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | ____ | ____ | ____ | ____ | ____ | ____ | 0 | . | , | = | ____ |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_NUM] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_MPRV, KC_NLCK, KC_MNXT, KC_P7, KC_P8, KC_P9, KC_MINS, KC_TRNS,
+ KC_F5, KC_F6, KC_F7, KC_F8, KC_VOLU, KC_MPLY, KC_ASTR, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_DOT,
+ KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_MUTE, KC_EQL, KC_P1, KC_P2, KC_P3, KC_SLSH, KC_COMM,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_DOT, KC_COMM, KC_EQL, KC_TRNS
+ ),
+
+ /* _MOUSE
+ * ,-----------------------------------------------------------------------------------.
+ * | XXXX | XXXX | MBTN4| MBTN5| XXXX | Bri+ | XXXX | MWHL↑|MAUS↑ | MWHL↑| XXXX | XXXX |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | XXXX | MBTN3| MBTN2| MBTN1| XXXX | MPLY | XXXX |MAUS<-|MAUS↓ |MAUS->| XXXX | XXXX |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | F9 | XXXX | XXXX | XXXX | XXXX | Bri- | XXXX | MWHL↓| XXXX | XXXX | ____ | XXXX |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |!MOUSE| XXXX | XXXX | ____ | XXXX | MAUS_ACCEL2 | ____ | XXXX | XXXX | ↓ | ↑ |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_MOUSE] = LAYOUT_planck_grid(
+ 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,
+ 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,
+ 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,
+ TG(_MOUSE), KC_NO, KC_NO, KC_TRNS, KC_NO, KC_ACL2, KC_ACL2, KC_TRNS, KC_NO, KC_NO, KC_DOWN, KC_UP
+ )
+
+};
+
+// define the tap dance functions
+void dance_prn(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ tap_code16(KC_LPRN);
+ } else {
+ tap_code16(KC_LPRN);
+ tap_code16(KC_RPRN);
+ tap_code(KC_LEFT);
+ }
+}
+void dance_brc(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ tap_code(KC_LBRC);
+ } else {
+ tap_code(KC_LBRC);
+ tap_code(KC_RBRC);
+ tap_code(KC_LEFT);
+ }
+}
+void dance_cbr(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ tap_code16(KC_LCBR);
+ } else {
+ tap_code16(KC_LCBR);
+ tap_code16(KC_RCBR);
+ tap_code(KC_LEFT);
+ }
+}
+void dance_prn_de(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ tap_code16(KC_ASTR);
+ } else {
+ tap_code16(KC_ASTR);
+ tap_code16(KC_LPRN);
+ tap_code(KC_LEFT);
+ }
+}
+void dance_brc_de(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ tap_code16(RALT(KC_8));
+ } else {
+ tap_code16(RALT(KC_8));
+ tap_code16(RALT(KC_9));
+ tap_code(KC_LEFT);
+ }
+}
+void dance_cbr_de(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ tap_code16(RALT(KC_7));
+ } else {
+ tap_code16(RALT(KC_7));
+ tap_code16(RALT(KC_0));
+ tap_code(KC_LEFT);
+ }
+}
+void vim_gg(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ tap_code16(LCTL(KC_END));
+ } else {
+ tap_code16(LCTL(KC_HOME));
+ }
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ // declare tap dance actions here
+ [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)};
+
+float thumb_factor = 0.95;
+float index_factor = 1.1;
+float middle_factor = 1.2;
+float ring_factor = 1.25;
+float pinky_factor = 1.15;
+float td_factor = 1.4;
+
+// define the per_key_tapping_term
+uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ // thumb keys
+ case RSFT_T(KC_DEL):
+ return TAPPING_TERM * thumb_factor;
+ case RCTL_T(KC_TAB):
+ return TAPPING_TERM * thumb_factor;
+ case LT(_NAV, KC_LEFT):
+ return TAPPING_TERM * thumb_factor;
+ case LT(_NAV, KC_RIGHT):
+ return TAPPING_TERM * thumb_factor;
+ case LT(_LOWER, KC_BSPC):
+ return TAPPING_TERM * thumb_factor;
+ case LT(_LOWER_DE, KC_BSPC):
+ return TAPPING_TERM * thumb_factor;
+ case LT(_RAISE, KC_ENT):
+ return TAPPING_TERM * thumb_factor;
+ case LT(_RAISE_DE, KC_ENT):
+ return TAPPING_TERM * thumb_factor;
+ case LT(_NAV, KC_SPC):
+ return TAPPING_TERM * 1.0;
+ case LALT_T(KC_ESC):
+ return TAPPING_TERM * thumb_factor;
+
+ // index finger keys
+ case LCTL_T(KC_P):
+ return TAPPING_TERM * index_factor;
+ case RCTL_T(KC_L):
+ return TAPPING_TERM * (index_factor + 0.1);
+ case LT(_NUM, KC_B):
+ return TAPPING_TERM * (index_factor + 0.1);
+ case LT(_NUM, KC_J):
+ return TAPPING_TERM * index_factor;
+
+ // middle finger keys
+ case LSFT_T(KC_F):
+ return TAPPING_TERM * middle_factor;
+ case RSFT_T(KC_U):
+ return TAPPING_TERM * middle_factor;
+
+ // ring finger keys
+ case LALT_T(KC_W):
+ return TAPPING_TERM * ring_factor;
+ case LALT_T(KC_Y):
+ return TAPPING_TERM * ring_factor;
+ case LGUI_T(KC_TAB):
+ return TAPPING_TERM * ring_factor;
+
+ // pinky keys
+ case LGUI_T(KC_Q):
+ return TAPPING_TERM * pinky_factor;
+ case RGUI_T(KC_SCLN):
+ return TAPPING_TERM * pinky_factor;
+ case RGUI_T(KC_LBRC):
+ return TAPPING_TERM * pinky_factor;
+ case LT(_MOUSE, KC_Z):
+ return TAPPING_TERM * pinky_factor;
+ case LT(_MOUSE, KC_SLSH):
+ return TAPPING_TERM * pinky_factor;
+ case LCTL_T(KC_CAPS):
+ return TAPPING_TERM * pinky_factor;
+
+ // tap-dance actions
+ case TD(TD_PRN):
+ return TAPPING_TERM * td_factor;
+ case TD(TD_BRC):
+ return TAPPING_TERM * td_factor;
+ case TD(TD_CBR):
+ return TAPPING_TERM * td_factor;
+ case TD(TD_PRN_DE):
+ return TAPPING_TERM * td_factor;
+ case TD(TD_BRC_DE):
+ return TAPPING_TERM * td_factor;
+ case TD(TD_CBR_DE):
+ return TAPPING_TERM * td_factor;
+ case TD(TD_VIM_GG):
+ return TAPPING_TERM * td_factor;
+
+ default:
+ return TAPPING_TERM;
+ }
+}
+
+// alt tab function setup
+bool is_alt_tab_active = false;
+bool is_ctl_tab_active = false;
+bool de_layout_active = false;
+
+static uint16_t key_timer;
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case WIDECOLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_WIDECOLEMAK);
+ }
+ return false;
+ break;
+ case HRWIDECOLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_HRWIDECOLEMAK);
+ }
+ return false;
+ break;
+ case GAMING:
+ if (record->event.pressed) {
+ layer_invert(_GAMING);
+ }
+ return false;
+ break;
+ case TG_COLEMAK:
+ if (record->event.pressed) {
+ tap_code(KC_ENT);
+ layer_invert(_WIDECOLEMAK);
+ }
+ return false;
+ break;
+ case VIM_O:
+ if (record->event.pressed) {
+ tap_code(KC_END);
+ tap_code(KC_ENT);
+ }
+ return false;
+ break;
+ case VIM_V:
+ if (record->event.pressed) {
+ if (get_mods() & MOD_MASK_SHIFT) {
+ clear_mods();
+ } else {
+ register_mods(MOD_LSFT);
+ }
+ }
+ return false;
+ break;
+ case KC_SVU_BU: // increase backlight when pressing shift and vol up
+ if (record->event.pressed) {
+ if (get_mods() & MOD_MASK_SHIFT) {
+ register_code(KC_BRIU);
+ } else if (get_mods() & MOD_MASK_CTRL) {
+ register_code(KC_MNXT);
+ } else {
+ register_code(KC_VOLU);
+ }
+ } else {
+ unregister_code(KC_BRIU);
+ unregister_code(KC_MNXT);
+ unregister_code(KC_VOLU);
+ }
+ return false;
+ case KC_SVD_BD: // decrease backlight when pressing shift and vol up
+ if (record->event.pressed) {
+ if (get_mods() & MOD_MASK_SHIFT) {
+ register_code(KC_BRID);
+ } else if (get_mods() & MOD_MASK_CTRL) {
+ register_code(KC_MPRV);
+ } else {
+ register_code(KC_VOLD);
+ }
+ } else {
+ unregister_code(KC_BRID);
+ unregister_code(KC_MPRV);
+ unregister_code(KC_VOLD);
+ }
+ return false;
+ case KC_TAB_MPLY: // press tab or play/pause when ctrl is pressed
+ if (record->event.pressed) {
+ if (get_mods() & MOD_MASK_CTRL) {
+ register_code(KC_MPLY);
+ } else {
+ register_code(KC_TAB);
+ }
+ } else {
+ unregister_code(KC_MPLY);
+ unregister_code(KC_TAB);
+ }
+ return false;
+ case ALT_TAB:
+ if (record->event.pressed) {
+ if (!is_alt_tab_active) {
+ is_alt_tab_active = true;
+ add_mods(MOD_BIT(KC_LALT));
+ }
+ register_code(KC_TAB);
+ } else {
+ unregister_code(KC_TAB);
+ }
+ break;
+ case CTL_TAB:
+ if (record->event.pressed) {
+ if (!is_ctl_tab_active) {
+ is_ctl_tab_active = true;
+ add_mods(MOD_BIT(KC_LCTL));
+ }
+ register_code(KC_TAB);
+ } else {
+ unregister_code(KC_TAB);
+ }
+ break;
+ // the next case allows us to use alt_tab without a timer
+ case LT(_NAV, KC_SPC):
+ if (record->event.pressed) {
+ } else {
+ unregister_mods(MOD_LALT);
+ unregister_mods(MOD_LCTL);
+ is_alt_tab_active = false;
+ is_ctl_tab_active = false;
+ }
+ break;
+ case DE_ae:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods();
+ if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P1);
+ tap_code(KC_P9);
+ tap_code(KC_P6); // Ä
+ } else {
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P2);
+ tap_code(KC_P8); // ä
+ }
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case DE_AE:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P1);
+ tap_code(KC_P9);
+ tap_code(KC_P6); // Ä
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case DE_oe:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods();
+ if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P1);
+ tap_code(KC_P4); // Ö
+ } else {
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P4);
+ tap_code(KC_P6); // ö
+ }
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case DE_OE:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P1);
+ tap_code(KC_P4); // Ö
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case DE_ue:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods();
+ if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P2);
+ tap_code(KC_P0); // Ü
+ } else {
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P5);
+ tap_code(KC_P2); // ü
+ }
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case KC_DE_SWITCH:
+ if (record->event.pressed) {
+ if (de_layout_active) {
+ de_layout_active = false; // deactivate German overlay
+ set_single_persistent_default_layer(_HRWIDECOLEMAK);
+ } else {
+ de_layout_active = true; // activate German overlay
+ set_single_persistent_default_layer(_HRWIDECOLEMAK_DE);
+ }
+ return false;
+ }
+ break;
+ case LANG_SWITCH:
+ if (record->event.pressed) {
+ register_mods(MOD_LALT);
+ register_code(KC_LSFT);
+ if (de_layout_active) {
+ de_layout_active = false; // deactivate German overlay
+ set_single_persistent_default_layer(_HRWIDECOLEMAK);
+ } else {
+ de_layout_active = true; // activate German overlay
+ set_single_persistent_default_layer(_HRWIDECOLEMAK_DE);
+ }
+ } else {
+ unregister_code(KC_LSFT);
+ unregister_mods(MOD_LALT);
+ }
+ return false;
+ case DE_SZ:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods();
+ if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P1);
+ tap_code(KC_P7);
+ tap_code(KC_P6); // °
+ } else {
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P2);
+ tap_code(KC_P3); // ß
+ }
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case DE_EGRAVE:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods();
+ if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P0);
+ tap_code(KC_P0); // È
+ } else {
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P3);
+ tap_code(KC_P2); // è
+ }
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case DE_EAIGU:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods();
+ if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P0);
+ tap_code(KC_P1); // É
+ } else {
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P2);
+ tap_code(KC_P3);
+ tap_code(KC_P3); // é
+ }
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case KC_CURRENCY:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods();
+ if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
+ clear_oneshot_mods();
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P1);
+ tap_code(KC_P5);
+ tap_code(KC_P7); // ¥
+ } else {
+ clear_mods();
+ add_mods(MOD_BIT(KC_LALT));
+ tap_code(KC_P0);
+ tap_code(KC_P1);
+ tap_code(KC_P2);
+ tap_code(KC_P8); // €
+ }
+ unregister_mods(MOD_LALT);
+ set_mods(temp_mods);
+ }
+ return false;
+ break;
+ case DE_SLSH_QUST:
+ if (record->event.pressed) {
+ key_timer = timer_read();
+ layer_on(_MOUSE);
+ } else {
+ if (timer_elapsed(key_timer) < (TAPPING_TERM * pinky_factor)) {
+ layer_off(_MOUSE);
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ if (temp_mods & MOD_MASK_SHIFT) {
+ tap_code(KC_MINS); // ?
+ } else {
+ tap_code16(KC_AMPR); // /
+ }
+ } else {
+ layer_off(_MOUSE);
+ }
+ }
+ return false;
+ break;
+ case DE_QUOT:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ if (temp_mods & MOD_MASK_SHIFT) {
+ register_code(KC_2); // \"
+ } else {
+ register_code16(KC_PIPE); // /'
+ }
+ } else {
+ unregister_code(KC_2);
+ unregister_code16(KC_PIPE);
+ }
+ return true;
+ case DE_DOT_RAB:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ if (temp_mods & MOD_MASK_SHIFT) {
+ register_code16(LSFT(KC_NUBS)); // > right angle bracket
+ } else {
+ register_code(KC_DOT); // .
+ }
+ } else {
+ unregister_code16(LSFT(KC_NUBS));
+ unregister_code(KC_DOT);
+ }
+ return true;
+ case DE_COMM_LAB:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ if (temp_mods & MOD_MASK_SHIFT) {
+ clear_mods();
+ clear_oneshot_mods();
+ register_code16(KC_NUBS); // < left angle bracket
+ set_mods(temp_mods);
+ } else {
+ register_code(KC_COMM); // ,
+ }
+ } else {
+ unregister_code16(KC_NUBS);
+ unregister_code(KC_COMM);
+ }
+ return true;
+ case DE_SCLN:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ if (temp_mods & MOD_MASK_SHIFT) {
+ tap_code(KC_DOT); // ;
+ } else {
+ add_mods(MOD_BIT(KC_LSFT));
+ tap_code(KC_COMM); // :
+ del_mods(MOD_BIT(KC_LSFT));
+ }
+ return false;
+ }
+ break;
+ case DE_BSLS:
+ if (record->event.pressed) {
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ clear_mods();
+ clear_oneshot_mods();
+ add_mods(MOD_BIT(KC_RALT));
+ if (temp_mods & MOD_MASK_SHIFT) {
+ register_code(KC_NUBS); // | Pipe
+ } else {
+ register_code(KC_MINS); // Backslash
+ }
+ set_mods(temp_mods);
+ } else {
+ unregister_code(KC_NUBS);
+ unregister_code(KC_MINS);
+ }
+ return true;
+ // switch multiplexing for escape, short tap for escape, long press for context menu
+ case M_ESCM:
+ if (record->event.pressed) {
+ key_timer = timer_read();
+ } else {
+ if (timer_elapsed(key_timer) > TAPPING_TERM) {
+ tap_code(KC_APP);
+ } else {
+ tap_code(KC_ESC);
+ }
+ }
+ return false;
+ case M_RGUI_SCLN:
+ if (record->event.pressed) {
+ key_timer = timer_read();
+ add_mods(MOD_BIT(KC_RGUI));
+ } else {
+ del_mods(MOD_BIT(KC_RGUI));
+ if (timer_elapsed(key_timer) < (TAPPING_TERM * pinky_factor)) {
+ uint8_t temp_mods = get_mods() | get_oneshot_mods();
+ if (temp_mods & MOD_MASK_SHIFT) {
+ tap_code(KC_DOT); // ;
+ } else {
+ add_mods(MOD_BIT(KC_LSFT));
+ tap_code(KC_COMM); // :
+ del_mods(MOD_BIT(KC_LSFT));
+ }
+ } else {
+ tap_code(KC_RGUI);
+ }
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+bool muse_mode = false;
+uint8_t last_muse_note = 0;
+uint16_t muse_counter = 0;
+uint8_t muse_offset = 70;
+uint16_t muse_tempo = 50;
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (muse_mode) {
+ if (IS_LAYER_ON(_RAISE)) {
+ if (clockwise) {
+ muse_offset++;
+ } else {
+ muse_offset--;
+ }
+ } else {
+ if (clockwise) {
+ muse_tempo += 1;
+ } else {
+ muse_tempo -= 1;
+ }
+ }
+ } else {
+ if (clockwise) {
+#ifdef MOUSEKEY_ENABLE
+ tap_code(KC_MS_WH_DOWN);
+#else
+ tap_code(KC_PGDN);
+#endif
+ } else {
+#ifdef MOUSEKEY_ENABLE
+ tap_code(KC_MS_WH_UP);
+#else
+ tap_code(KC_PGUP);
+#endif
+ }
+ }
+ return true;
+}
+
+bool dip_switch_update_user(uint8_t index, bool active) {
+ switch (index) {
+ case 0: {
+ if (active) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ break;
+ }
+ case 1:
+ if (active) {
+ muse_mode = true;
+ } else {
+ muse_mode = false;
+ }
+ }
+ return true;
+}
+
+
+LEADER_EXTERNS();
+
+void matrix_scan_user(void) {
+ LEADER_DICTIONARY() {
+ leading = false;
+ leader_end();
+
+ SEQ_ONE_KEY(KC_F) {
+ // Anything you can do in a macro.
+ SEND_STRING("QMK is awesome.");
+ }
+ SEQ_TWO_KEYS(KC_D, KC_D) {
+ SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
+ }
+ SEQ_THREE_KEYS(KC_D, KC_D, KC_S) {
+ SEND_STRING("https://start.duckduckgo.com\n");
+ }
+ SEQ_TWO_KEYS(KC_A, KC_S) {
+ register_code(KC_LGUI);
+ register_code(KC_S);
+ unregister_code(KC_S);
+ unregister_code(KC_LGUI);
+ }
+ }
+#ifdef AUDIO_ENABLE
+ if (muse_mode) {
+ if (muse_counter == 0) {
+ uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
+ if (muse_note != last_muse_note) {
+ stop_note(compute_freq_for_midi_note(last_muse_note));
+ play_note(compute_freq_for_midi_note(muse_note), 0xF);
+ last_muse_note = muse_note;
+ }
+ }
+ muse_counter = (muse_counter + 1) % muse_tempo;
+ } else {
+ if (muse_counter) {
+ stop_all_notes();
+ muse_counter = 0;
+ }
+ }
+#endif
+}
+
+bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
+ }
+}
+
+bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LSFT_T(KC_S):
+ return true;
+ case RSFT_T(KC_E):
+ return true;
+ case LSFT_T(KC_D):
+ return true;
+ case RSFT_T(KC_K):
+ return true;
+ case LSFT_T(KC_F):
+ return true;
+ case RSFT_T(KC_U):
+ return true;
+ case LT(_RAISE, KC_ENT):
+ return true;
+ case LT(_RAISE_DE, KC_ENT):
+ return true;
+ case LT(_LOWER, KC_BSPC):
+ return true;
+ case LT(_LOWER_DE, KC_BSPC):
+ return true;
+ default:
+ return false;
+ }
+}
+
+// Set RGB to change with layer changes
+#define HSV_DARKORANGE 10, 255, 255
+#define HSV_DARKPINK 150, 100, 255
+#define HSV_GRASS 57, 255, 255
+#define HSV_OCEAN 148, 255, 255
+
+// Light LEDs 1 to 9 in darkorange when HRCOLEMAK is active
+const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_DARKORANGE});
+// Light LEDs 1 to 9 in green when HRWIDECOLEMAK is active
+const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_OCEAN});
+// Light LEDs 1 to 9 in darkorange when de_layout_active is true
+const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS({3, 4, HSV_DARKORANGE}, {0, 3, HSV_OCEAN}, {8, 3, HSV_OCEAN});
+// Light LEDs 1 to 9 in red when GAMING layer is active
+const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_RED});
+// Light LEDs 1 to 9 in white when WIDECOLEMAK is active
+const rgblight_segment_t PROGMEM my_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_WHITE});
+// Light bottom LEDs in purple when ADJUST layer is active
+const rgblight_segment_t PROGMEM my_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_MAGENTA}, {7, 3, HSV_MAGENTA});
+// Light bottom LEDs in red when caps lock is active. Hard to ignore!
+const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_GRASS}, {7, 3, HSV_GRASS});
+// Light LEDs 1 to 9 in white when NAVIGATION is active
+const rgblight_segment_t PROGMEM my_nav_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 10, HSV_WHITE});
+
+// Now define the array of layers. Later layers take precedence
+const rgblight_segment_t *const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_layer0_layer, // hrcolemak
+ my_layer1_layer, // hrwidecolemak
+ my_layer2_layer, // de_layout
+ my_layer3_layer, // gaming
+ my_layer4_layer, // widecolemak
+ my_layer5_layer, // adjust
+ my_nav_layer, // nav
+ my_capslock_layer // capslock
+);
+
+void keyboard_post_init_user(void) {
+ // Enable the LED layers
+ rgblight_layers = my_rgb_layers;
+}
+
+bool led_update_user(led_t led_state) {
+ rgblight_set_layer_state(7, led_state.caps_lock);
+ return true;
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ rgblight_set_layer_state(3, layer_state_cmp(state, _GAMING));
+ rgblight_set_layer_state(4, layer_state_cmp(state, _WIDECOLEMAK));
+ if ((layer_state_cmp(state, _LOWER) && layer_state_cmp(state, _RAISE)) || (layer_state_cmp(state, _LOWER_DE) && layer_state_cmp(state, _RAISE_DE))) {
+ return state | (1UL << _ADJUST);
+ } else {
+ return state & ~(1UL << _ADJUST);
+ }
+ // state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+ rgblight_set_layer_state(5, layer_state_cmp(state, _ADJUST));
+ // return state;
+}
+
+layer_state_t default_layer_state_set_user(layer_state_t state) {
+ rgblight_set_layer_state(4, layer_state_cmp(state, _WIDECOLEMAK));
+ rgblight_set_layer_state(1, layer_state_cmp(state, _HRWIDECOLEMAK));
+ rgblight_set_layer_state(2, layer_state_cmp(state, _HRWIDECOLEMAK_DE));
+ return state;
+}
diff --git a/keyboards/planck/keymaps/jweickm/readme.md b/keyboards/planck/keymaps/jweickm/readme.md
new file mode 100644
index 0000000000..6628dfbdbf
--- /dev/null
+++ b/keyboards/planck/keymaps/jweickm/readme.md
@@ -0,0 +1,154 @@
+# Semi-wide German/English MIT Planck Layout
+Added keymap for my planck MIT.
+It has a German and an English switching mode, so that it works the exact same with both OS languages.
+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.
+Home row mods implemented in the top row with individual tapping_terms for different fingers.
+Mouse layer accessible through the pinkies.
+Navigation layer on space.
+
+```
+/* _HRWIDECOLEMAK
+* ,-----------------------------------------------------------------------------------.
+* | G-Q | A-W | S-F | C-P |_Num-B|Vol/B+|_Num-J| C-L | S-U | A-Y | G-/ | ü |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | A | R | S | T | G | TAB | M | N | E | I | O | ' |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |_Mo-Z | X | C | D | V |Vol/B-| K | H | , | . |_Mo-/ | \ |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |C-CAPS| LEAD |MN-ESC|_L-BSP| LSFT | _Nav-SPC |_R-ENT|S-DEL | RALT |_Mo <-|_Mo ->|
+* `-----------------------------------------------------------------------------------'
+*/
+/* _HRWIDECOLEMAK_DE
+* same as above, when the PC is set to German layout
+* ,-----------------------------------------------------------------------------------.
+* | G-Q | A-W | S-F | C-P |_Num-B|Vol/B+|_Num-J| C-L | S-U | A-Y | G-/ | ü |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | A | R | S | T | G | TAB | M | N | E | I | O | ' |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |_Mo-Z | X | C | D | V |Vol/B-| K | H | , | . |_Mo-/ | \ |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |C-CAPS| LEAD |MN-ESC|_L-BSP| LSFT | _Nav-SPC |_R-ENT|S-DEL | RALT |_Mo <-|_Mo ->|
+* `-----------------------------------------------------------------------------------'
+*/
+/* _GAMING
+* ,-----------------------------------------------------------------------------------.
+* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | F5 | F8 | F9 |Vol/B+|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | TAB | Q | W | E | R | T | Y | U | I | O | P |Vol/B-|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | LSFT | A | S | D | F | G | H | J | Z | M | ; |_CM-EN|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | LCTL | C | B | X | LALT | SPACE | ENT | RALT | ____ | ____ | !GAME|
+* `-----------------------------------------------------------------------------------'
+*/
+/* WIDECOLEMAK
+* no mod taps
+* ,-----------------------------------------------------------------------------------.
+* | Q | W | F | P | B |Vol/B+| J | L | U | Y | / | Ü |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | A | R | S | T | G | TAB | M | N | E | I | O | ' |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | Z | X | C | D | V |Vol/B-| K | H | , | . | / |!CM-EN|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |C-CAPS|G-TAB |MN-ESC|_L-BSP| LSFT | _NAV-SPC |_R-ENT|S-DEL |C-TAB |_Mo <-|_Mo ->|
+* `-----------------------------------------------------------------------------------'
+*/
+/* _LOWER
+* ,-----------------------------------------------------------------------------------.
+* | ! | @ | # | $ | % | ~ | ^ | & | * | ( | ) | Ö |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F1 | F2 | F3 | F4 | F5 | F6 | ß | _ | + | { | } | Ä |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | / | \ | | | € | è |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |!MOUSE| ____ | ____ | ____ | ____ | ____ | ____ | Vol- | Vol+ | ↓ | ↑ |
+* `-----------------------------------------------------------------------------------'
+*/
+/* _LOWER_DE
+* ,-----------------------------------------------------------------------------------.
+* | ! | @ | # | $ | % | ~ | ^ | & | * | ( | ) | Ö |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F1 | F2 | F3 | F4 | F5 | F6 | ß | _ | + | { | } | Ä |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | / | \ | | | € | ` |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |!MOUSE| ____ | ____ | ____ | ____ | ____ | ____ | Vol- | Vol+ | ↓ | ↑ |
+* `-----------------------------------------------------------------------------------'
+*/
+/* _RAISE
+* ,-----------------------------------------------------------------------------------.
+* | 1 | 2 | 3 | 4 | 5 | ` | 6 | 7 | 8 | 9 | 0 | ö |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F1 | F2 | F3 | F4 | F5 | F6 | ß | - | = | [ | ] | ä |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | \ | , | . | / | é |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |!MOUSE| ____ | ____ | BSPC | ____ | ____ | ____ | |<< | >>| | ↓ | ↑ |
+* `-----------------------------------------------------------------------------------'
+*/
+/* _RAISE_DE
+* ,-----------------------------------------------------------------------------------.
+* | 1 | 2 | 3 | 4 | 5 | ` | 6 | 7 | 8 | 9 | 0 | ö |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F1 | F2 | F3 | F4 | F5 | F6 | ß | - | = | [ | ] | ä |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F7 | F8 | F9 | F10 | F11 | F12 | MPLY | \ | , | . | / | ´ |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |!MOUSE| ____ | ____ | BSPC | ____ | ____ | ____ | |<< | >>| | ↓ | ↑ |
+* `-----------------------------------------------------------------------------------'
+*/
+/* _ADJUST
+* ,-----------------------------------------------------------------------------------.
+* | A-SFT| RESET| DEBUG|RGBTOG|RGBMOD|RGBHUI|RGBHUD|RGBSAI|RGBSAD|RGBVAI|RGBVAD| DE_SW|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | A-GRV|EEPRST|MU_MOD| AU_ON|AU_OFF|AGNORM|AGSWAP|!HRWCM| !WCM | A-GRV| !LANG| !GAME|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | ____ |MUV_DE|MUV_IN| MU_ON|MU_OFF| MI_ON|MI_OFF| Vol- | MPLY | Vol+ | ____ | ____ |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |EEPRST|
+* `-----------------------------------------------------------------------------------'
+*/
+/* _NAV
+* ,-----------------------------------------------------------------------------------.
+* |A(TAB)| C(->)| !LANG|A(GRV)| C(<-)| >>| | HOME | -> | PGUP | COPY | PASTE| DE_SW|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |C(TAB)| TAB | ESC | ENT |VIM_GG| MPLY | <- | ↓ | ↑ | -> | END | VIM_O|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | LSFT | XXXX |S(DEL)| CAPS | VIM_V| MUTE | HOME | PGDN | LSFT | RFST | C(F) | C(F) |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | XXXX | XXXX | ____ | BSPC | ____ | ____ | ENT | DEL | ____ | ____ | DE_SW|
+* `-----------------------------------------------------------------------------------'
+*/
+/* _VIM
+* ,-----------------------------------------------------------------------------------.
+* |A(TAB)| C(->)| !LANG|A(GRV)| C(<-)| >>| | HOME | -> | PGUP | COPY | PASTE| DE_SW|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |C(TAB)| TAB | ESC | ENT |VIM_GG| MPLY | <- | ↓ | ↑ | -> | END | VIM_O|
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | LSFT | XXXX |S(DEL)| CAPS | VIM_V| MUTE | HOME | PGDN | LSFT | RFST | C(F) | C(F) |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | XXXX | XXXX | !VIM | BSPC | ____ | ____ | ENT | DEL | ____ | ↓ | ↑ |
+* `-----------------------------------------------------------------------------------'
+*/
+/* _NUM
+* ,-----------------------------------------------------------------------------------.
+* | F1 | F2 | F3 | F4 | |<< |NUMLCK| >>| | 7 | 8 | 9 | - | ____ |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F5 | F6 | F7 | F8 | Vol+ | MPLY | * | 4 | 5 | 6 | + | . |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F9 | F10 | F11 | F12 | Vol- | MUTE | = | 1 | 2 | 3 | / | , |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | ____ | ____ | ____ | ____ | ____ | ____ | 0 | . | , | = | ____ |
+* `-----------------------------------------------------------------------------------'
+*/
+/* _MOUSE
+* ,-----------------------------------------------------------------------------------.
+* | XXXX | XXXX | MBTN4| MBTN5| XXXX | Bri+ | XXXX | MWHL↑|MAUS↑ | MWHL↑| XXXX | XXXX |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | XXXX | MBTN3| MBTN2| MBTN1| XXXX | MPLY | XXXX |MAUS<-|MAUS↓ |MAUS->| XXXX | XXXX |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* | F9 | XXXX | XXXX | XXXX | XXXX | Bri- | XXXX | MWHL↓| XXXX | XXXX | ____ | XXXX |
+* |------+------+------+------+------+------+------+------+------+------+------+------|
+* |!MOUSE| XXXX | XXXX | ____ | XXXX | MAUS_ACCEL2 | ____ | XXXX | XXXX | ↓ | ↑ |
+* `-----------------------------------------------------------------------------------'
+ */
diff --git a/keyboards/planck/keymaps/jweickm/rules.mk b/keyboards/planck/keymaps/jweickm/rules.mk
new file mode 100644
index 0000000000..067ac4768c
--- /dev/null
+++ b/keyboards/planck/keymaps/jweickm/rules.mk
@@ -0,0 +1,5 @@
+CONSOLE_ENABLE = no # Console for debug
+LEADER_ENABLE = yes
+TAP_DANCE_ENABLE = yes # enable tap dance functionality
+
+SRC += muse.c
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h
index be33bf253b..4b04dfec51 100644
--- a/keyboards/planck/planck.h
+++ b/keyboards/planck/planck.h
@@ -1,3 +1,19 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#pragma once
#include "quantum.h"
@@ -20,4 +36,6 @@
# include "rev5.h"
#elif defined(KEYBOARD_planck_rev6)
# include "rev6.h"
-#endif
+#elif defined(KEYBOARD_planck_rev6_drop)
+# include "rev6_drop.h"
+#endif // Planck revisions
diff --git a/keyboards/planck/rev6_drop/chconf.h b/keyboards/planck/rev6_drop/chconf.h
new file mode 100644
index 0000000000..e1243f23ec
--- /dev/null
+++ b/keyboards/planck/rev6_drop/chconf.h
@@ -0,0 +1,29 @@
+/* Copyright 2020 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This file was auto-generated by:
+ * `qmk chibios-confmigrate -i keyboards/planck/rev6/chconf.h -r platforms/chibios/QMK_PROTON_C/configs/chconf.h`
+ */
+
+#pragma once
+
+#define CH_CFG_ST_RESOLUTION 16
+
+#define CH_CFG_ST_FREQUENCY 10000
+
+#include_next <chconf.h>
+
diff --git a/keyboards/planck/rev6_drop/config.h b/keyboards/planck/rev6_drop/config.h
new file mode 100644
index 0000000000..c1baa34b72
--- /dev/null
+++ b/keyboards/planck/rev6_drop/config.h
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define PRODUCT_ID 0xA4F9
+#define DEVICE_VER 0x0006
+#undef MANUFACTURER
+#define MANUFACTURER Drop
+
+#undef MATRIX_ROWS
+#undef MATRIX_COLS
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 6
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+/* Note: These are not used for arm boards. They're here purely as documentation. */
+#undef MATRIX_ROW_PINS
+#undef MATRIX_COL_PINS
+
+#define MATRIX_ROW_PINS \
+ { A10, A9, A8, B15, C13, C14, C15, A2 }
+#define MATRIX_COL_PINS \
+ { B11, B10, B2, B1, A7, B0 }
+
+#define UNUSED_PINS
+
+#define ENCODERS_PAD_A \
+ { B12 }
+#define ENCODERS_PAD_B \
+ { B13 }
+
+#define DIP_SWITCH_PINS \
+ { B14, A15, A0, B9 }
+
+#define MUSIC_MAP
+#undef AUDIO_VOICES
+#undef AUDIO_PIN
+#define AUDIO_PIN A5
+#define AUDIO_PIN_ALT A4
+#define AUDIO_PIN_ALT_AS_NEGATIVE
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+// #define DEBOUNCE 6
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+//#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * WS2812 Underglow Matrix options
+ */
+#define RGB_DI_PIN A1
+#define RGBLED_NUM 9
+#define DRIVER_LED_TOTAL RGBLED_NUM
+
+#define WS2812_PWM_DRIVER PWMD2
+#define WS2812_PWM_CHANNEL 2
+#define WS2812_PWM_PAL_MODE 1
+#define WS2812_DMA_STREAM STM32_DMA1_STREAM2
+#define WS2812_DMA_CHANNEL 2
+
+#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 0000000000..153eacb212
--- /dev/null
+++ b/keyboards/planck/rev6_drop/halconf.h
@@ -0,0 +1,23 @@
+/* Copyright 2020 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#define HAL_USE_PWM TRUE
+#define HAL_USE_GPT TRUE
+#define HAL_USE_DAC TRUE
+#define HAL_USE_I2C TRUE
+
+#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 0000000000..114a971294
--- /dev/null
+++ b/keyboards/planck/rev6_drop/info.json
@@ -0,0 +1,262 @@
+{
+ "keyboard_name": "Planck rev 6",
+ "url": "https://olkb.com/planck",
+ "maintainer": "jackhumbert",
+ "layouts": {
+ "LAYOUT_ortho_4x12": {
+ "layout": [
+ { "x": 0, "y": 0 },
+ { "x": 1, "y": 0 },
+ { "x": 2, "y": 0 },
+ { "x": 3, "y": 0 },
+ { "x": 4, "y": 0 },
+ { "x": 5, "y": 0 },
+ { "x": 6, "y": 0 },
+ { "x": 7, "y": 0 },
+ { "x": 8, "y": 0 },
+ { "x": 9, "y": 0 },
+ { "x": 10, "y": 0 },
+ { "x": 11, "y": 0 },
+ { "x": 0, "y": 1 },
+ { "x": 1, "y": 1 },
+ { "x": 2, "y": 1 },
+ { "x": 3, "y": 1 },
+ { "x": 4, "y": 1 },
+ { "x": 5, "y": 1 },
+ { "x": 6, "y": 1 },
+ { "x": 7, "y": 1 },
+ { "x": 8, "y": 1 },
+ { "x": 9, "y": 1 },
+ { "x": 10, "y": 1 },
+ { "x": 11, "y": 1 },
+ { "x": 0, "y": 2 },
+ { "x": 1, "y": 2 },
+ { "x": 2, "y": 2 },
+ { "x": 3, "y": 2 },
+ { "x": 4, "y": 2 },
+ { "x": 5, "y": 2 },
+ { "x": 6, "y": 2 },
+ { "x": 7, "y": 2 },
+ { "x": 8, "y": 2 },
+ { "x": 9, "y": 2 },
+ { "x": 10, "y": 2 },
+ { "x": 11, "y": 2 },
+ { "x": 0, "y": 3 },
+ { "x": 1, "y": 3 },
+ { "x": 2, "y": 3 },
+ { "x": 3, "y": 3 },
+ { "x": 4, "y": 3 },
+ { "x": 5, "y": 3 },
+ { "x": 6, "y": 3 },
+ { "x": 7, "y": 3 },
+ { "x": 8, "y": 3 },
+ { "x": 9, "y": 3 },
+ { "x": 10, "y": 3 },
+ { "x": 11, "y": 3 }
+ ]
+ },
+ "LAYOUT_planck_1x2uC": {
+ "layout": [
+ { "x": 0, "y": 0 },
+ { "x": 1, "y": 0 },
+ { "x": 2, "y": 0 },
+ { "x": 3, "y": 0 },
+ { "x": 4, "y": 0 },
+ { "x": 5, "y": 0 },
+ { "x": 6, "y": 0 },
+ { "x": 7, "y": 0 },
+ { "x": 8, "y": 0 },
+ { "x": 9, "y": 0 },
+ { "x": 10, "y": 0 },
+ { "x": 11, "y": 0 },
+ { "x": 0, "y": 1 },
+ { "x": 1, "y": 1 },
+ { "x": 2, "y": 1 },
+ { "x": 3, "y": 1 },
+ { "x": 4, "y": 1 },
+ { "x": 5, "y": 1 },
+ { "x": 6, "y": 1 },
+ { "x": 7, "y": 1 },
+ { "x": 8, "y": 1 },
+ { "x": 9, "y": 1 },
+ { "x": 10, "y": 1 },
+ { "x": 11, "y": 1 },
+ { "x": 0, "y": 2 },
+ { "x": 1, "y": 2 },
+ { "x": 2, "y": 2 },
+ { "x": 3, "y": 2 },
+ { "x": 4, "y": 2 },
+ { "x": 5, "y": 2 },
+ { "x": 6, "y": 2 },
+ { "x": 7, "y": 2 },
+ { "x": 8, "y": 2 },
+ { "x": 9, "y": 2 },
+ { "x": 10, "y": 2 },
+ { "x": 11, "y": 2 },
+ { "x": 0, "y": 3 },
+ { "x": 1, "y": 3 },
+ { "x": 2, "y": 3 },
+ { "x": 3, "y": 3 },
+ { "x": 4, "y": 3 },
+ { "x": 5, "y": 3, "w": 2 },
+ { "x": 7, "y": 3 },
+ { "x": 8, "y": 3 },
+ { "x": 9, "y": 3 },
+ { "x": 10, "y": 3 },
+ { "x": 11, "y": 3 }
+ ]
+ },
+ "LAYOUT_planck_1x2uL": {
+ "layout": [
+ { "x": 0, "y": 0 },
+ { "x": 1, "y": 0 },
+ { "x": 2, "y": 0 },
+ { "x": 3, "y": 0 },
+ { "x": 4, "y": 0 },
+ { "x": 5, "y": 0 },
+ { "x": 6, "y": 0 },
+ { "x": 7, "y": 0 },
+ { "x": 8, "y": 0 },
+ { "x": 9, "y": 0 },
+ { "x": 10, "y": 0 },
+ { "x": 11, "y": 0 },
+ { "x": 0, "y": 1 },
+ { "x": 1, "y": 1 },
+ { "x": 2, "y": 1 },
+ { "x": 3, "y": 1 },
+ { "x": 4, "y": 1 },
+ { "x": 5, "y": 1 },
+ { "x": 6, "y": 1 },
+ { "x": 7, "y": 1 },
+ { "x": 8, "y": 1 },
+ { "x": 9, "y": 1 },
+ { "x": 10, "y": 1 },
+ { "x": 11, "y": 1 },
+ { "x": 0, "y": 2 },
+ { "x": 1, "y": 2 },
+ { "x": 2, "y": 2 },
+ { "x": 3, "y": 2 },
+ { "x": 4, "y": 2 },
+ { "x": 5, "y": 2 },
+ { "x": 6, "y": 2 },
+ { "x": 7, "y": 2 },
+ { "x": 8, "y": 2 },
+ { "x": 9, "y": 2 },
+ { "x": 10, "y": 2 },
+ { "x": 11, "y": 2 },
+ { "x": 0, "y": 3 },
+ { "x": 1, "y": 3 },
+ { "x": 2, "y": 3 },
+ { "x": 3, "y": 3 },
+ { "x": 4, "y": 3, "w": 2 },
+ { "x": 6, "y": 3 },
+ { "x": 7, "y": 3 },
+ { "x": 8, "y": 3 },
+ { "x": 9, "y": 3 },
+ { "x": 10, "y": 3 },
+ { "x": 11, "y": 3 }
+ ]
+ },
+ "LAYOUT_planck_1x2uR": {
+ "layout": [
+ { "x": 0, "y": 0 },
+ { "x": 1, "y": 0 },
+ { "x": 2, "y": 0 },
+ { "x": 3, "y": 0 },
+ { "x": 4, "y": 0 },
+ { "x": 5, "y": 0 },
+ { "x": 6, "y": 0 },
+ { "x": 7, "y": 0 },
+ { "x": 8, "y": 0 },
+ { "x": 9, "y": 0 },
+ { "x": 10, "y": 0 },
+ { "x": 11, "y": 0 },
+ { "x": 0, "y": 1 },
+ { "x": 1, "y": 1 },
+ { "x": 2, "y": 1 },
+ { "x": 3, "y": 1 },
+ { "x": 4, "y": 1 },
+ { "x": 5, "y": 1 },
+ { "x": 6, "y": 1 },
+ { "x": 7, "y": 1 },
+ { "x": 8, "y": 1 },
+ { "x": 9, "y": 1 },
+ { "x": 10, "y": 1 },
+ { "x": 11, "y": 1 },
+ { "x": 0, "y": 2 },
+ { "x": 1, "y": 2 },
+ { "x": 2, "y": 2 },
+ { "x": 3, "y": 2 },
+ { "x": 4, "y": 2 },
+ { "x": 5, "y": 2 },
+ { "x": 6, "y": 2 },
+ { "x": 7, "y": 2 },
+ { "x": 8, "y": 2 },
+ { "x": 9, "y": 2 },
+ { "x": 10, "y": 2 },
+ { "x": 11, "y": 2 },
+ { "x": 0, "y": 3 },
+ { "x": 1, "y": 3 },
+ { "x": 2, "y": 3 },
+ { "x": 3, "y": 3 },
+ { "x": 4, "y": 3 },
+ { "x": 5, "y": 3 },
+ { "x": 6, "y": 3, "w": 2 },
+ { "x": 8, "y": 3 },
+ { "x": 9, "y": 3 },
+ { "x": 10, "y": 3 },
+ { "x": 11, "y": 3 }
+ ]
+ },
+ "LAYOUT_planck_2x2u": {
+ "layout": [
+ { "x": 0, "y": 0 },
+ { "x": 1, "y": 0 },
+ { "x": 2, "y": 0 },
+ { "x": 3, "y": 0 },
+ { "x": 4, "y": 0 },
+ { "x": 5, "y": 0 },
+ { "x": 6, "y": 0 },
+ { "x": 7, "y": 0 },
+ { "x": 8, "y": 0 },
+ { "x": 9, "y": 0 },
+ { "x": 10, "y": 0 },
+ { "x": 11, "y": 0 },
+ { "x": 0, "y": 1 },
+ { "x": 1, "y": 1 },
+ { "x": 2, "y": 1 },
+ { "x": 3, "y": 1 },
+ { "x": 4, "y": 1 },
+ { "x": 5, "y": 1 },
+ { "x": 6, "y": 1 },
+ { "x": 7, "y": 1 },
+ { "x": 8, "y": 1 },
+ { "x": 9, "y": 1 },
+ { "x": 10, "y": 1 },
+ { "x": 11, "y": 1 },
+ { "x": 0, "y": 2 },
+ { "x": 1, "y": 2 },
+ { "x": 2, "y": 2 },
+ { "x": 3, "y": 2 },
+ { "x": 4, "y": 2 },
+ { "x": 5, "y": 2 },
+ { "x": 6, "y": 2 },
+ { "x": 7, "y": 2 },
+ { "x": 8, "y": 2 },
+ { "x": 9, "y": 2 },
+ { "x": 10, "y": 2 },
+ { "x": 11, "y": 2 },
+ { "x": 0, "y": 3 },
+ { "x": 1, "y": 3 },
+ { "x": 2, "y": 3 },
+ { "x": 3, "y": 3 },
+ { "x": 4, "y": 3, "w": 2 },
+ { "x": 6, "y": 3, "w": 2 },
+ { "x": 8, "y": 3 },
+ { "x": 9, "y": 3 },
+ { "x": 10, "y": 3 },
+ { "x": 11, "y": 3 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/planck/rev6_drop/matrix.c b/keyboards/planck/rev6_drop/matrix.c
new file mode 100644
index 0000000000..49e115d029
--- /dev/null
+++ b/keyboards/planck/rev6_drop/matrix.c
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include "hal.h"
+#include "timer.h"
+#include "wait.h"
+#include "debug.h"
+#include "matrix.h"
+
+/*
+ * col: { B11, B10, B2, B1, A7, B0 }
+ * row: { A10, A9, A8, B15, C13, C14, C15, A2 }
+ */
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_COLS];
+static bool debouncing = false;
+static uint16_t debouncing_time = 0;
+
+__attribute__((weak)) void matrix_init_user(void) {}
+
+__attribute__((weak)) void matrix_scan_user(void) {}
+
+__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
+
+__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
+
+void matrix_init(void) {
+ dprintf("matrix init\n");
+ // debug_matrix = true;
+
+ // actual matrix setup
+ palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
+
+ palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
+ palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN);
+ palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN);
+ palSetPadMode(GPIOB, 15, PAL_MODE_INPUT_PULLDOWN);
+ palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLDOWN);
+ palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN);
+ palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN);
+ palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN);
+
+ memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
+ memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
+
+ matrix_init_quantum();
+}
+
+uint8_t matrix_scan(void) {
+ // actual matrix
+ for (int col = 0; col < MATRIX_COLS; col++) {
+ matrix_row_t data = 0;
+
+ // strobe col { B11, B10, B2, B1, A7, B0 }
+ switch (col) {
+ case 0:
+ palSetPad(GPIOB, 11);
+ break;
+ case 1:
+ palSetPad(GPIOB, 10);
+ break;
+ case 2:
+ palSetPad(GPIOB, 2);
+ break;
+ case 3:
+ palSetPad(GPIOB, 1);
+ break;
+ case 4:
+ palSetPad(GPIOA, 7);
+ break;
+ case 5:
+ palSetPad(GPIOB, 0);
+ break;
+ }
+
+ // need wait to settle pin state
+ wait_us(20);
+
+ // read row data { A10, A9, A8, B15, C13, C14, C15, A2 }
+ 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));
+
+ // unstrobe col { B11, B10, B2, B1, A7, B0 }
+ switch (col) {
+ case 0:
+ palClearPad(GPIOB, 11);
+ break;
+ case 1:
+ palClearPad(GPIOB, 10);
+ break;
+ case 2:
+ palClearPad(GPIOB, 2);
+ break;
+ case 3:
+ palClearPad(GPIOB, 1);
+ break;
+ case 4:
+ palClearPad(GPIOA, 7);
+ break;
+ case 5:
+ palClearPad(GPIOB, 0);
+ break;
+ }
+
+ if (matrix_debouncing[col] != data) {
+ matrix_debouncing[col] = data;
+ debouncing = true;
+ debouncing_time = timer_read();
+ }
+ }
+
+ if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
+ for (int row = 0; row < MATRIX_ROWS; row++) {
+ matrix[row] = 0;
+ for (int col = 0; col < MATRIX_COLS; col++) {
+ matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col);
+ }
+ }
+ debouncing = false;
+ }
+
+ matrix_scan_quantum();
+
+ return 1;
+}
+
+bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1 << col)); }
+
+matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {
+ dprintf("\nr/c 01234567\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ dprintf("%X0: ", row);
+ matrix_row_t data = matrix_get_row(row);
+ for (int col = 0; col < MATRIX_COLS; col++) {
+ if (data & (1 << col))
+ dprintf("1");
+ else
+ dprintf("0");
+ }
+ dprintf("\n");
+ }
+}
diff --git a/keyboards/planck/rev6_drop/mcuconf.h b/keyboards/planck/rev6_drop/mcuconf.h
new file mode 100644
index 0000000000..d7c29fcf65
--- /dev/null
+++ b/keyboards/planck/rev6_drop/mcuconf.h
@@ -0,0 +1,44 @@
+/* Copyright 2020 QMK Contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include_next "mcuconf.h"
+
+// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
+// on the Planck requires the use of TIM2 to run PWM -- rework which timers are
+// allocated for PWM usage.
+#undef STM32_PWM_USE_TIM2
+#define STM32_PWM_USE_TIM2 TRUE
+
+#undef STM32_DAC_USE_DAC1_CH1
+#define STM32_DAC_USE_DAC1_CH1 TRUE
+#undef STM32_DAC_USE_DAC1_CH2
+#define STM32_DAC_USE_DAC1_CH2 TRUE
+#undef STM32_GPT_USE_TIM6
+#define STM32_GPT_USE_TIM6 TRUE
+#undef STM32_GPT_USE_TIM7
+#define STM32_GPT_USE_TIM7 TRUE
+#undef STM32_GPT_USE_TIM8
+#define STM32_GPT_USE_TIM8 TRUE
+
+// As mentioned above, we need to reallocate the SysTick timer used from
+// TIM2 to TIM3.
+#undef STM32_ST_USE_TIMER
+#define STM32_ST_USE_TIMER 3
+
+// enable i2c
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
diff --git a/keyboards/planck/rev6_drop/readme.md b/keyboards/planck/rev6_drop/readme.md
new file mode 100644
index 0000000000..0ea2619acb
--- /dev/null
+++ b/keyboards/planck/rev6_drop/readme.md
@@ -0,0 +1,13 @@
+# Planck
+
+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/)
+
+* Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
+* Hardware Supported: Planck PCB rev6
+* Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make planck/rev6_drop:default
+
+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 0000000000..4c41af3806
--- /dev/null
+++ b/keyboards/planck/rev6_drop/rev6_drop.c
@@ -0,0 +1,44 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "rev6_drop.h"
+
+#ifdef RGB_MATRIX_ENABLE
+// clang-format off
+led_config_t g_led_config = { {
+ // Key Matrix to LED Index
+ { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 },
+ { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED },
+ { NO_LED, 4, NO_LED, NO_LED, 3, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED },
+}, {
+ // LED Index to Physical Position
+ {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60}
+}, {
+ // LED Index to Flag
+ LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
+ LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL
+} };
+
+// LED physical location index
+// 6 5 4 3
+// 0
+// 7 8 1 2
+
+#endif
diff --git a/keyboards/planck/rev6_drop/rev6_drop.h b/keyboards/planck/rev6_drop/rev6_drop.h
new file mode 100644
index 0000000000..bc9434a026
--- /dev/null
+++ b/keyboards/planck/rev6_drop/rev6_drop.h
@@ -0,0 +1,108 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "planck.h"
+
+#define LAYOUT_planck_1x2uC( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k36, k37, k38, k33, k34, KC_NO } \
+}
+
+#define LAYOUT_planck_1x2uR( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { KC_NO, k37, k38, k33, k34, k35 } \
+}
+
+#define LAYOUT_planck_1x2uL( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k36, k37, k38, k33, KC_NO, k35 } \
+}
+
+#define LAYOUT_planck_2x2u( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { KC_NO, k37, k38, k33, KC_NO, k35 } \
+}
+
+#define LAYOUT_ortho_4x12( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k36, k37, k38, k33, k34, k35 } \
+}
+
+
+#define LAYOUT LAYOUT_ortho_4x12
+#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
+#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 0000000000..c35de3d74b
--- /dev/null
+++ b/keyboards/planck/rev6_drop/rules.mk
@@ -0,0 +1,33 @@
+# MCU name
+MCU = STM32F303
+
+# Bootloader selection
+BOOTLOADER = stm32-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+AUDIO_ENABLE = yes # Audio output
+WS2812_DRIVER = pwm
+CUSTOM_MATRIX = yes
+# Do not enable RGB_MATRIX_ENABLE together with RGBLIGHT_ENABLE
+RGB_MATRIX_ENABLE = no
+RGB_MATRIX_DRIVER = WS2812
+ENCODER_ENABLE = yes
+DIP_SWITCH_ENABLE = yes
+
+SRC += matrix.c
+
+LAYOUTS = ortho_4x12 planck_mit
+LAYOUTS_HAS_RGB = no