From c6ff10a2577e0dcee1c8dc1ec25c84c3355d9986 Mon Sep 17 00:00:00 2001
From: jonavin <71780717+Jonavin@users.noreply.github.com>
Date: Sun, 18 Sep 2022 18:57:37 -0400
Subject: [PATCH 1/2] FIx ARRAYSIZE def and Murphpad string array (#18392)
Co-authored-by: Jonavin <=>
---
keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c | 2 +-
users/jonavin/jonavin.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c b/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c
index b0288c5d7a..88c017cbff 100644
--- a/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c
+++ b/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c
@@ -175,7 +175,7 @@ static const keycodedescType PROGMEM keyselection[] = {
{"Break", KC_PAUS},
{"C-A-D", KC_CAD}, // Ctrl-Alt-Del
{"AltF4", KC_AF4},
- {"QK_BOOT", QK_BOOT}, // firmware flash mode
+ {"RESET", QK_BOOT}, // firmware flash mode
};
#define MAX_KEYSELECTION sizeof(keyselection)/sizeof(keyselection[0])
diff --git a/users/jonavin/jonavin.h b/users/jonavin/jonavin.h
index ab2ce0dff2..3ebd3fe9f2 100644
--- a/users/jonavin/jonavin.h
+++ b/users/jonavin/jonavin.h
@@ -18,7 +18,9 @@ along with this program. If not, see .
#pragma once
// DEFINE MACROS
+#ifndef ARRAYSIZE
#define ARRAYSIZE(arr) sizeof(arr)/sizeof(arr[0])
+#endif // !ARRAYSIZE
// LAYERS
From ecb4ba70b1d48835e75da6b0a8ad566c2f126b9f Mon Sep 17 00:00:00 2001
From: Danny
Date: Sun, 18 Sep 2022 19:01:05 -0400
Subject: [PATCH 2/2] Add encoder map to BDN9 VIA keymap (#18388)
---
keyboards/keebio/bdn9/keymaps/via/keymap.c | 33 ++++++++++++----------
keyboards/keebio/bdn9/keymaps/via/rules.mk | 1 +
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/keyboards/keebio/bdn9/keymaps/via/keymap.c b/keyboards/keebio/bdn9/keymaps/via/keymap.c
index fc5f22cd8b..6efb6003de 100644
--- a/keyboards/keebio/bdn9/keymaps/via/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/via/keymap.c
@@ -1,42 +1,45 @@
#include QMK_KEYBOARD_H
-enum encoder_names {
- _LEFT,
- _RIGHT,
- _MIDDLE,
-};
-
enum layer_names {
- _ZERO,
- _ONE,
- _TWO,
- _THREE
+ _MAIN,
+ _FN1,
+ _FN2,
+ _FN3
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_ZERO] = LAYOUT(
+[_MAIN] = LAYOUT(
KC_MPLY, KC_HOME, KC_MUTE,
MO(1), KC_UP, RGB_MOD,
KC_LEFT, KC_DOWN, KC_RGHT
),
-[_ONE] = LAYOUT(
- QK_BOOT, BL_STEP, KC_STOP,
+[_FN1] = LAYOUT(
+ QK_BOOT, BL_STEP, KC_STOP,
_______, KC_HOME, RGB_MOD,
KC_MPRV, KC_END , KC_MNXT
),
-[_TWO] = LAYOUT(
+[_FN2] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
-[_THREE] = LAYOUT(
+[_FN3] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
)
};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [_MAIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_UP, KC_DOWN), ENCODER_CCW_CW(KC_PGUP, KC_PGDN) },
+ [_FN1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) },
+ [_FN2] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
+ [_FN3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
+};
+#endif
diff --git a/keyboards/keebio/bdn9/keymaps/via/rules.mk b/keyboards/keebio/bdn9/keymaps/via/rules.mk
index d96967a608..a7017de2b6 100644
--- a/keyboards/keebio/bdn9/keymaps/via/rules.mk
+++ b/keyboards/keebio/bdn9/keymaps/via/rules.mk
@@ -3,3 +3,4 @@ LTO_ENABLE = yes
MOUSEKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = no
+ENCODER_MAP_ENABLE = yes