summaryrefslogtreecommitdiff
path: root/keyboards/keebio/bamfk1
diff options
context:
space:
mode:
authorjack <0x6A73@pm.me>2023-06-19 09:46:27 -0600
committerGitHub <noreply@github.com>2023-06-19 09:46:27 -0600
commitc4a67d3f3302f3096bb6b15921c9587643164ba9 (patch)
treebf10e469333ba42b708e76cfc085eb450d92359e /keyboards/keebio/bamfk1
parent74fbd5a0313769655914166bc872d41461509bd3 (diff)
Remove encoder in-matrix workaround code (#20389)
Diffstat (limited to 'keyboards/keebio/bamfk1')
-rw-r--r--keyboards/keebio/bamfk1/config.h4
-rw-r--r--keyboards/keebio/bamfk1/info.json10
-rw-r--r--keyboards/keebio/bamfk1/keymaps/default/keymap.c27
-rw-r--r--keyboards/keebio/bamfk1/keymaps/default/rules.mk1
-rw-r--r--keyboards/keebio/bamfk1/keymaps/via/keymap.c25
-rw-r--r--keyboards/keebio/bamfk1/keymaps/via/rules.mk1
-rw-r--r--keyboards/keebio/bamfk1/rules.mk2
7 files changed, 32 insertions, 38 deletions
diff --git a/keyboards/keebio/bamfk1/config.h b/keyboards/keebio/bamfk1/config.h
index 0aeaffa895..13d85fc4d1 100644
--- a/keyboards/keebio/bamfk1/config.h
+++ b/keyboards/keebio/bamfk1/config.h
@@ -8,9 +8,7 @@
# define STARTUP_SONG SONG(STARTUP_SOUND)
#endif
-#define ENCODERS_CW_KEY { { 1, 1 }, { 3, 1 } }
-#define ENCODERS_CCW_KEY { { 0, 1 }, { 2, 1 } }
-
+# define RGBLED_NUM 16
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/bamfk1/info.json b/keyboards/keebio/bamfk1/info.json
index 9c9cd011e8..8ff985741e 100644
--- a/keyboards/keebio/bamfk1/info.json
+++ b/keyboards/keebio/bamfk1/info.json
@@ -25,8 +25,7 @@
"bootloader": "atmel-dfu",
"matrix_pins": {
"direct": [
- ["E6", "B6", "D6", null],
- [null, null, null, null]
+ ["E6", "B6", "D6"]
]
},
"layouts": {
@@ -34,12 +33,7 @@
"layout": [
{"x": 1.5, "y": 0, "h": 2, "w": 2, "matrix": [0, 0]},
{"x": 0.5, "y": 2.25, "matrix": [0, 1]},
- {"x": 3.5, "y": 2.25, "matrix": [0, 2]},
-
- {"x": 0, "y": 3.5, "matrix": [1, 0]},
- {"x": 1, "y": 3.5, "matrix": [1, 1]},
- {"x": 3, "y": 3.5, "matrix": [1, 2]},
- {"x": 4, "y": 3.5, "matrix": [1, 3]}
+ {"x": 3.5, "y": 2.25, "matrix": [0, 2]}
]
}
}
diff --git a/keyboards/keebio/bamfk1/keymaps/default/keymap.c b/keyboards/keebio/bamfk1/keymaps/default/keymap.c
index aa0780eafc..d97a7fe39a 100644
--- a/keyboards/keebio/bamfk1/keymaps/default/keymap.c
+++ b/keyboards/keebio/bamfk1/keymaps/default/keymap.c
@@ -13,27 +13,28 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MAIN] = LAYOUT(
- KC_A, // Big Switch
- MO(1), KC_MUTE, // Encoder presses
- KC_DOWN, KC_UP, // Left encoder turns
- KC_VOLD, KC_VOLU // Right encoder turns
+ RGB_MOD, // Big Switch
+ TL_LOWR, KC_MUTE // Encoder presses
),
[_FN1] = LAYOUT(
KC_B, // Big Switch
- _______, KC_C, // Encoder presses
- KC_PGDN, KC_PGUP, // Left encoder turns
- KC_VOLU, KC_VOLD // Right encoder turns
+ _______, KC_C // Encoder presses
),
[_FN2] = LAYOUT(
_______, // Big Switch
- _______, _______, // Encoder presses
- _______, _______, // Left encoder turns
- _______, _______ // Right encoder turns
+ _______, _______ // Encoder presses
),
[_FN3] = LAYOUT(
_______, // Big Switch
- _______, _______, // Encoder presses
- _______, _______, // Left encoder turns
- _______, _______ // Right encoder turns
+ _______, _______ // Encoder presses
)
};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }
+};
+#endif
diff --git a/keyboards/keebio/bamfk1/keymaps/default/rules.mk b/keyboards/keebio/bamfk1/keymaps/default/rules.mk
new file mode 100644
index 0000000000..ee32568148
--- /dev/null
+++ b/keyboards/keebio/bamfk1/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/keebio/bamfk1/keymaps/via/keymap.c b/keyboards/keebio/bamfk1/keymaps/via/keymap.c
index 80ada5d8aa..d97a7fe39a 100644
--- a/keyboards/keebio/bamfk1/keymaps/via/keymap.c
+++ b/keyboards/keebio/bamfk1/keymaps/via/keymap.c
@@ -14,26 +14,27 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MAIN] = LAYOUT(
RGB_MOD, // Big Switch
- TL_LOWR, KC_MUTE, // Encoder presses
- KC_DOWN, KC_UP, // Left encoder turns
- KC_VOLD, KC_VOLU // Right encoder turns
+ TL_LOWR, KC_MUTE // Encoder presses
),
[_FN1] = LAYOUT(
KC_B, // Big Switch
- _______, KC_C, // Encoder presses
- KC_PGDN, KC_PGUP, // Left encoder turns
- KC_VOLU, KC_VOLD // Right encoder turns
+ _______, KC_C // Encoder presses
),
[_FN2] = LAYOUT(
_______, // Big Switch
- _______, _______, // Encoder presses
- _______, _______, // Left encoder turns
- _______, _______ // Right encoder turns
+ _______, _______ // Encoder presses
),
[_FN3] = LAYOUT(
_______, // Big Switch
- _______, _______, // Encoder presses
- _______, _______, // Left encoder turns
- _______, _______ // Right encoder turns
+ _______, _______ // Encoder presses
)
};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }
+};
+#endif
diff --git a/keyboards/keebio/bamfk1/keymaps/via/rules.mk b/keyboards/keebio/bamfk1/keymaps/via/rules.mk
index 36b7ba9cbc..1189f4ad19 100644
--- a/keyboards/keebio/bamfk1/keymaps/via/rules.mk
+++ b/keyboards/keebio/bamfk1/keymaps/via/rules.mk
@@ -1,2 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/keebio/bamfk1/rules.mk b/keyboards/keebio/bamfk1/rules.mk
index 514d88831a..5275b6ecdc 100644
--- a/keyboards/keebio/bamfk1/rules.mk
+++ b/keyboards/keebio/bamfk1/rules.mk
@@ -12,5 +12,3 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output
ENCODER_ENABLE = yes
LTO_ENABLE = yes
-
-SRC += encoder_actions.c