summaryrefslogtreecommitdiff
path: root/keyboards/planck
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2022-03-25 16:19:22 -0700
committerDrashna Jael're <drashna@live.com>2022-03-25 16:19:22 -0700
commit53ff570bf068e04740f187163774327839dfa68b (patch)
tree5429e069fc593d484b0b479de422b51ac239be83 /keyboards/planck
parente8171efc7158ba4ebb24827680b19b775d366b1a (diff)
parentefc9c525b19b33c6e09057218ea64f07f45f9555 (diff)
Remerge 0.16.x' into firmware21
Diffstat (limited to 'keyboards/planck')
-rw-r--r--keyboards/planck/config.h2
-rw-r--r--keyboards/planck/ez/config.h2
-rw-r--r--keyboards/planck/ez/ez.c5
-rwxr-xr-xkeyboards/planck/ez/rules.mk4
-rw-r--r--keyboards/planck/keymaps/default/keymap.c6
-rw-r--r--keyboards/planck/keymaps/oryx/keymap.c2
-rw-r--r--keyboards/planck/keymaps/oryx/rules.mk2
-rw-r--r--keyboards/planck/planck.c20
8 files changed, 33 insertions, 10 deletions
diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h
index a86359327a..8fb9dda32a 100644
--- a/keyboards/planck/config.h
+++ b/keyboards/planck/config.h
@@ -75,5 +75,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
index 6008d24f92..2475401535 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -107,8 +107,6 @@
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
#define DRIVER_ADDR_1 0b1010000
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c
index bfb2fff697..26dbc64d01 100644
--- a/keyboards/planck/ez/ez.c
+++ b/keyboards/planck/ez/ez.c
@@ -106,6 +106,7 @@ led_config_t g_led_config = { {
1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1
} };
+<<<<<<< HEAD
void suspend_power_down_kb(void) {
rgb_matrix_set_color_all(0, 0, 0);
rgb_matrix_set_suspend_state(true);
@@ -120,6 +121,8 @@ void keyboard_post_init_kb(void) {
rgb_matrix_enable_noeeprom();
keyboard_post_init_user();
}
+=======
+>>>>>>> qmk/master
#endif
/* Left B9 Right B8 */
@@ -241,7 +244,7 @@ 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);
+ uint8_t layer = get_highest_layer(state);
switch (layer) {
case 1:
planck_ez_left_led_on();
diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk
index ed20a3d710..d8494f1843 100755
--- a/keyboards/planck/ez/rules.mk
+++ b/keyboards/planck/ez/rules.mk
@@ -16,7 +16,7 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = yes # Audio output
AUDIO_DRIVER = dac_additive
-RGBLIGHT_ENABLE = no
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
ENCODER_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3737
@@ -28,3 +28,5 @@ LAYOUTS_HAS_RGB = no
RGB_MATRIX_SUPPORTED = yes
RGBLIGHT_SUPPORTED = no
BAKCLIGHT_SUPPORTED = no
+
+MOUSE_SHARED_EP = no
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index 7c787e0366..b5ec2e8082 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * | Esc | A | R | S | T | D | H | N | E | I | O | ' |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Dvorak
* ,-----------------------------------------------------------------------------------.
- * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------+------+------+------+------+------+------|
diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c
index 2ce5dc3c5e..d7b4bafe25 100644
--- a/keyboards/planck/keymaps/oryx/keymap.c
+++ b/keyboards/planck/keymaps/oryx/keymap.c
@@ -92,7 +92,7 @@ void set_layer_color(int layer) {
}
void rgb_matrix_indicators_user(void) {
- if (g_suspend_state || keyboard_config.disable_layer_led) {
+ if (keyboard_config.disable_layer_led) {
return;
}
switch (biton32(layer_state)) {
diff --git a/keyboards/planck/keymaps/oryx/rules.mk b/keyboards/planck/keymaps/oryx/rules.mk
index 1e29b5f218..5f561b32e1 100644
--- a/keyboards/planck/keymaps/oryx/rules.mk
+++ b/keyboards/planck/keymaps/oryx/rules.mk
@@ -3,5 +3,7 @@
CONSOLE_ENABLE = no
COMMAND_ENABLE = no
MOUSEKEY_ENABLE = no
+RGBLIGHT_ENABLE = no
+RGB_MATRIX_ENABLE = yes
WEBUSB_ENABLE = yes
ORYX_ENABLE = yes
diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c
index a17036fcf1..e9bd90bdfe 100644
--- a/keyboards/planck/planck.c
+++ b/keyboards/planck/planck.c
@@ -27,3 +27,23 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_planck_grid(
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
);
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) { return false; }
+ if (get_highest_layer(layer_state) > 0) {
+ if (clockwise) {
+ tap_code_delay(KC_VOLU, 10);
+ } else {
+ tap_code_delay(KC_VOLD, 10);
+ }
+ } else {
+ if (clockwise) {
+ tap_code(KC_PGDN);
+ } else {
+ tap_code(KC_PGUP);
+ }
+ }
+ return true;
+}
+#endif