summaryrefslogtreecommitdiff
path: root/keyboards/planck/ez
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/planck/ez')
-rw-r--r--keyboards/planck/ez/chconf.h29
-rw-r--r--keyboards/planck/ez/config.h26
-rw-r--r--keyboards/planck/ez/ez.c108
-rw-r--r--keyboards/planck/ez/ez.h20
-rw-r--r--keyboards/planck/ez/glow/keymaps/glow/config.h7
-rw-r--r--keyboards/planck/ez/glow/keymaps/glow/keymap.c348
-rw-r--r--keyboards/planck/ez/glow/keymaps/glow/readme.md2
-rw-r--r--keyboards/planck/ez/glow/keymaps/glow/rules.mk1
-rwxr-xr-x[-rw-r--r--]keyboards/planck/ez/rules.mk14
9 files changed, 493 insertions, 62 deletions
diff --git a/keyboards/planck/ez/chconf.h b/keyboards/planck/ez/chconf.h
new file mode 100644
index 0000000000..e1243f23ec
--- /dev/null
+++ b/keyboards/planck/ez/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/ez/config.h b/keyboards/planck/ez/config.h
index 5085514729..6008d24f92 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -18,6 +18,7 @@
#pragma once
+
#undef VENDOR_ID
#define VENDOR_ID 0x3297
#undef PRODUCT_ID
@@ -26,9 +27,9 @@
#define MANUFACTURER ZSA Technology Labs
#undef PRODUCT
#define PRODUCT Planck EZ
-/* USB Device descriptor parameter */
#define DEVICE_VER 0x0000
+
#undef MATRIX_ROWS
#undef MATRIX_COLS
/* key matrix size */
@@ -109,16 +110,6 @@
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-// #define WS2812_LED_N 2
-// #define RGBLED_NUM WS2812_LED_N
-// #define WS2812_TIM_N 2
-// #define WS2812_TIM_CH 2
-// #define PORT_WS2812 GPIOA
-// #define PIN_WS2812 1
-// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
-//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
-//#define WS2812_EXTERNAL_PULLUP
-
#define DRIVER_ADDR_1 0b1010000
#define DRIVER_COUNT 1
@@ -183,8 +174,11 @@
#define TAPPING_TOGGLE 1
-#define MOUSEKEY_INTERVAL 20
-#define MOUSEKEY_DELAY 0
-#define MOUSEKEY_TIME_TO_MAX 60
-#define MOUSEKEY_MAX_SPEED 7
-#define MOUSEKEY_WHEEL_DELAY 0
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_TIME_TO_MAX 60
+#define MOUSEKEY_MAX_SPEED 7
+#define MOUSEKEY_WHEEL_DELAY 400
+#define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL
+#define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED
+#define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c
index 5c68726a01..bfb2fff697 100644
--- a/keyboards/planck/ez/ez.c
+++ b/keyboards/planck/ez/ez.c
@@ -116,6 +116,10 @@ void suspend_power_down_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
+void keyboard_post_init_kb(void) {
+ rgb_matrix_enable_noeeprom();
+ keyboard_post_init_user();
+}
#endif
/* Left B9 Right B8 */
@@ -214,7 +218,7 @@ void keyboard_pre_init_kb(void) {
}
// read kb settings from eeprom
keyboard_config.raw = eeconfig_read_kb();
-#if defined(RGB_MATRIX_ENABLE) && defined(ORYX_CONFIGURATOR)
+#ifdef RGB_MATRIX_ENABLE
if (keyboard_config.rgb_matrix_enable) {
rgb_matrix_set_flags(LED_FLAG_ALL);
} else {
@@ -225,13 +229,6 @@ void keyboard_pre_init_kb(void) {
keyboard_pre_init_user();
}
-#if defined(RGB_MATRIX_ENABLE) && defined(ORYX_CONFIGURATOR)
-void keyboard_post_init_kb(void) {
- rgb_matrix_enable_noeeprom();
- keyboard_post_init_user();
-}
-#endif
-
void eeconfig_init_kb(void) { // EEPROM is getting reset!
keyboard_config.raw = 0;
keyboard_config.rgb_matrix_enable = true;
@@ -240,34 +237,19 @@ void eeconfig_init_kb(void) { // EEPROM is getting reset!
eeconfig_init_user();
}
-
-#ifdef ORYX_CONFIGURATOR
-
-#ifndef PLANCK_EZ_USER_LEDS
-
-#ifndef PLANCK_EZ_LED_LOWER
-# define PLANCK_EZ_LED_LOWER 3
-#endif
-#ifndef PLANCK_EZ_LED_RAISE
-# define PLANCK_EZ_LED_RAISE 4
-#endif
-#ifndef PLANCK_EZ_LED_ADJUST
-# define PLANCK_EZ_LED_ADJUST 6
-#endif
-
layer_state_t layer_state_set_kb(layer_state_t state) {
planck_ez_left_led_off();
planck_ez_right_led_off();
state = layer_state_set_user(state);
uint8_t layer = biton32(state);
switch (layer) {
- case PLANCK_EZ_LED_LOWER:
+ case 1:
planck_ez_left_led_on();
break;
- case PLANCK_EZ_LED_RAISE:
+ case 2:
planck_ez_right_led_on();
break;
- case PLANCK_EZ_LED_ADJUST:
+ case 3:
planck_ez_right_led_on();
planck_ez_left_led_on();
break;
@@ -276,7 +258,6 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
}
return state;
}
-#endif
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
@@ -323,7 +304,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return process_record_user(keycode, record);
}
-#endif
+
#ifdef AUDIO_ENABLE
bool music_mask_kb(uint16_t keycode) {
@@ -340,3 +321,74 @@ bool music_mask_kb(uint16_t keycode) {
}
}
#endif
+
+#ifdef ORYX_ENABLE
+static uint16_t loops = 0;
+static bool is_on = false;
+#endif
+
+#ifdef DYNAMIC_MACRO_ENABLE
+static bool is_dynamic_recording = false;
+static uint16_t dynamic_loop_timer;
+
+void dynamic_macro_record_start_user(void) {
+ is_dynamic_recording = true;
+ dynamic_loop_timer = timer_read();
+ planck_ez_left_led_on();
+}
+
+void dynamic_macro_record_end_user(int8_t direction) {
+ is_dynamic_recording = false;
+ layer_state_set_kb(layer_state);
+}
+#endif
+
+void matrix_scan_kb(void) {
+#ifdef ORYX_ENABLE
+ if(webusb_state.pairing == true) {
+ if(loops == 0) {
+ //lights off
+ }
+ if(loops % WEBUSB_BLINK_STEPS == 0) {
+ if(is_on) {
+ planck_ez_left_led_on();
+ planck_ez_right_led_off();
+ }
+ else {
+ planck_ez_left_led_off();
+ planck_ez_right_led_on();
+ }
+ is_on ^= 1;
+ }
+ if(loops > WEBUSB_BLINK_END * 2) {
+ webusb_state.pairing = false;
+ loops = 0;
+ planck_ez_left_led_off();
+ planck_ez_right_led_off();
+ }
+ loops++;
+ }
+ else if(loops > 0) {
+ loops = 0;
+ planck_ez_left_led_off();
+ planck_ez_right_led_off();
+ }
+#endif
+#ifdef DYNAMIC_MACRO_ENABLE
+ if (is_dynamic_recording) {
+ if (timer_elapsed(dynamic_loop_timer) > 1)
+ {
+ static uint8_t counter;
+ counter++;
+ if (counter > 100) {
+ planck_ez_left_led_on();
+ } else {
+ planck_ez_left_led_off();
+
+ }
+ dynamic_loop_timer = timer_read();
+ }
+ }
+#endif
+ matrix_scan_user();
+}
diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h
index 19cc26eea3..9e572d258d 100644
--- a/keyboards/planck/ez/ez.h
+++ b/keyboards/planck/ez/ez.h
@@ -47,14 +47,14 @@
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, k3a, k3b, k36 }, \
- { k06, k07, k08, k09, k0a, k0b }, \
- { k16, k17, k18, k19, k1a, k1b }, \
- { k26, k27, k28, k29, k2a, k2b }, \
- { k37, k38, k39, k33, k34, k35 } \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k3a, k3b, KC_NO }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k37, k38, k39, k33, k34, k35 } \
}
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
@@ -73,10 +73,6 @@ enum planck_ez_keycodes {
EZ_SAFE_RANGE,
};
-#ifndef WEBUSB_ENABLE
-# define WEBUSB_PAIR KC_NO
-#endif
-
typedef union {
uint32_t raw;
struct {
diff --git a/keyboards/planck/ez/glow/keymaps/glow/config.h b/keyboards/planck/ez/glow/keymaps/glow/config.h
new file mode 100644
index 0000000000..501d118632
--- /dev/null
+++ b/keyboards/planck/ez/glow/keymaps/glow/config.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(DVORAK_SOUND)
+#endif
+
+#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 5
diff --git a/keyboards/planck/ez/glow/keymaps/glow/keymap.c b/keyboards/planck/ez/glow/keymaps/glow/keymap.c
new file mode 100644
index 0000000000..37659fbc32
--- /dev/null
+++ b/keyboards/planck/ez/glow/keymaps/glow/keymap.c
@@ -0,0 +1,348 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * 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"
+
+extern keymap_config_t keymap_config;
+
+enum planck_layers {
+ _QWERTY,
+ _COLEMAK,
+ _DVORAK,
+ _LOWER,
+ _RAISE,
+ _PLOVER,
+ _ADJUST
+};
+
+enum planck_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ PLOVER,
+ BACKLIT,
+ EXT_PLV
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_planck_grid(
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_planck_grid(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_planck_grid(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Plover layer (http://opensteno.org)
+ * ,-----------------------------------------------------------------------------------.
+ * | # | # | # | # | # | # | # | # | # | # | # | # |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | S | T | P | H | * | * | F | P | L | T | D |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | S | K | W | R | * | * | R | B | G | S | Z |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Exit | | | A | O | | E | U | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_PLOVER] = LAYOUT_planck_grid(
+ KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
+ XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+};
+
+#ifdef AUDIO_ENABLE
+ float plover_song[][2] = SONG(PLOVER_SOUND);
+ float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
+#endif
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ print("mode just switched to qwerty and this is a huge string\n");
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ #ifdef KEYBOARD_planck_rev5
+ PORTE &= ~(1<<6);
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ #ifdef KEYBOARD_planck_rev5
+ PORTE |= (1<<6);
+ #endif
+ }
+ return false;
+ break;
+ case PLOVER:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ PLAY_SONG(plover_song);
+ #endif
+ layer_off(_RAISE);
+ layer_off(_LOWER);
+ layer_off(_ADJUST);
+ layer_on(_PLOVER);
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+ keymap_config.raw = eeconfig_read_keymap();
+ keymap_config.nkro = 1;
+ eeconfig_update_keymap(keymap_config.raw);
+ }
+ return false;
+ break;
+ case EXT_PLV:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_gb_song);
+ #endif
+ layer_off(_PLOVER);
+ }
+ 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
+ register_code(KC_MS_WH_DOWN);
+ unregister_code(KC_MS_WH_DOWN);
+ #else
+ register_code(KC_PGDN);
+ unregister_code(KC_PGDN);
+ #endif
+ } else {
+ #ifdef MOUSEKEY_ENABLE
+ register_code(KC_MS_WH_UP);
+ unregister_code(KC_MS_WH_UP);
+ #else
+ register_code(KC_PGUP);
+ unregister_code(KC_PGUP);
+ #endif
+ }
+ }
+ return true;
+}
+
+bool dip_switch_update_user(uint8_t index, bool active) {
+ switch (index) {
+ case 0:
+ if (active) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_song);
+ #endif
+ layer_on(_ADJUST);
+ } else {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_gb_song);
+ #endif
+ layer_off(_ADJUST);
+ }
+ break;
+ case 1:
+ if (active) {
+ muse_mode = true;
+ } else {
+ muse_mode = false;
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ #endif
+ }
+ }
+ return true;
+}
+
+void matrix_scan_user(void) {
+ #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;
+ }
+ #endif
+}
+
+bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
+ }
+}
diff --git a/keyboards/planck/ez/glow/keymaps/glow/readme.md b/keyboards/planck/ez/glow/keymaps/glow/readme.md
new file mode 100644
index 0000000000..de9680b498
--- /dev/null
+++ b/keyboards/planck/ez/glow/keymaps/glow/readme.md
@@ -0,0 +1,2 @@
+# The Default Planck Layout
+
diff --git a/keyboards/planck/ez/glow/keymaps/glow/rules.mk b/keyboards/planck/ez/glow/keymaps/glow/rules.mk
new file mode 100644
index 0000000000..dcf16bef39
--- /dev/null
+++ b/keyboards/planck/ez/glow/keymaps/glow/rules.mk
@@ -0,0 +1 @@
+SRC += muse.c
diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk
index fa431041b9..5584a90454 100644..100755
--- a/keyboards/planck/ez/rules.mk
+++ b/keyboards/planck/ez/rules.mk
@@ -5,23 +5,25 @@ MCU = STM32F303
BOOTLOADER = stm32-dfu
# Build Options
+
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
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
-NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-AUDIO_ENABLE = yes # Audio output
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+AUDIO_ENABLE = yes # Audio output on port C6
+RGBLIGHT_ENABLE = no
ENCODER_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3737
-LAYOUTS = ortho_4x12 planck_mit
+MOUSE_SHARED_EP = no
+
LAYOUTS_HAS_RGB = no
RGB_MATRIX_SUPPORTED = yes