summaryrefslogtreecommitdiff
path: root/keyboards/mwstudio
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/mwstudio')
-rw-r--r--keyboards/mwstudio/alicekk/config.h1
-rw-r--r--keyboards/mwstudio/alicekk/info.json1
-rw-r--r--keyboards/mwstudio/alicekk/keymaps/via/keymap.c45
-rw-r--r--keyboards/mwstudio/alicekk/keymaps/via/rules.mk2
-rw-r--r--keyboards/mwstudio/mw65_black/config.h1
-rw-r--r--keyboards/mwstudio/mw65_black/info.json3
-rw-r--r--keyboards/mwstudio/mw65_rgb/info.json3
-rw-r--r--keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c4
-rw-r--r--keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap.c4
-rw-r--r--keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h13
-rw-r--r--keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c17
-rw-r--r--keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c26
-rw-r--r--keyboards/mwstudio/mw65_rgb/keymaps/via/rules.mk1
-rw-r--r--keyboards/mwstudio/mw660/config.h3
-rw-r--r--keyboards/mwstudio/mw660/info.json3
-rw-r--r--keyboards/mwstudio/mw75/config.h3
-rw-r--r--keyboards/mwstudio/mw75/info.json4
-rw-r--r--keyboards/mwstudio/mw75r2/config.h3
-rw-r--r--keyboards/mwstudio/mw75r2/info.json4
-rw-r--r--keyboards/mwstudio/mw75r2/keymaps/via/keymap.c45
-rw-r--r--keyboards/mwstudio/mw75r2/keymaps/via/rules.mk1
21 files changed, 47 insertions, 140 deletions
diff --git a/keyboards/mwstudio/alicekk/config.h b/keyboards/mwstudio/alicekk/config.h
index 2e8b3f3bec..ed091bc482 100644
--- a/keyboards/mwstudio/alicekk/config.h
+++ b/keyboards/mwstudio/alicekk/config.h
@@ -18,7 +18,6 @@
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
-#define RGBLED_NUM 87
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
diff --git a/keyboards/mwstudio/alicekk/info.json b/keyboards/mwstudio/alicekk/info.json
index b77bbd8bdf..6ed32cefe6 100644
--- a/keyboards/mwstudio/alicekk/info.json
+++ b/keyboards/mwstudio/alicekk/info.json
@@ -21,6 +21,7 @@
"pin": "B1"
},
"rgblight": {
+ "led_count": 87,
"max_brightness": 200
},
"processor": "STM32F103",
diff --git a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c
index 92e893d5c5..a9de70282f 100644
--- a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c
+++ b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c
@@ -51,44 +51,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-
-#ifdef ENCODER_ENABLE
-static uint8_t encoder_state[NUM_ENCODERS] = {0};
-static keypos_t encoder_cw[NUM_ENCODERS] = {{6, 4}};
-static keypos_t encoder_ccw[NUM_ENCODERS] = {{7, 4}};
-
-void encoder_action_unregister(void) {
- for (uint8_t index = 0; index < NUM_ENCODERS; ++index) {
- if (encoder_state[index]) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
- .pressed = false,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = 0;
- action_exec(encoder_event);
- }
- }
-}
-
-void encoder_action_register(uint8_t index, bool clockwise) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = clockwise ? encoder_cw[index] : encoder_ccw[index],
- .pressed = true,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
- action_exec(encoder_event);
-}
-
-void matrix_scan_user(void) {
- encoder_action_unregister();
-}
-
-bool encoder_update_user(uint8_t index, bool clockwise) {
- encoder_action_register(index, clockwise);
- return false;
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______) },
};
#endif
diff --git a/keyboards/mwstudio/alicekk/keymaps/via/rules.mk b/keyboards/mwstudio/alicekk/keymaps/via/rules.mk
index 541a15608a..f1adcab005 100644
--- a/keyboards/mwstudio/alicekk/keymaps/via/rules.mk
+++ b/keyboards/mwstudio/alicekk/keymaps/via/rules.mk
@@ -1,2 +1,2 @@
VIA_ENABLE = yes
-LTO_ENABLE = no
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/mwstudio/mw65_black/config.h b/keyboards/mwstudio/mw65_black/config.h
index f987360d4a..cf0d26844e 100644
--- a/keyboards/mwstudio/mw65_black/config.h
+++ b/keyboards/mwstudio/mw65_black/config.h
@@ -16,7 +16,6 @@
#pragma once
- #define RGBLED_NUM 21
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/mwstudio/mw65_black/info.json b/keyboards/mwstudio/mw65_black/info.json
index baa73a6e3b..fade81d7ef 100644
--- a/keyboards/mwstudio/mw65_black/info.json
+++ b/keyboards/mwstudio/mw65_black/info.json
@@ -8,6 +8,9 @@
"pid": "0x6500",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "led_count": 21
+ },
"ws2812": {
"pin": "C7"
},
diff --git a/keyboards/mwstudio/mw65_rgb/info.json b/keyboards/mwstudio/mw65_rgb/info.json
index c2a8a6c188..cb2e62c6e9 100644
--- a/keyboards/mwstudio/mw65_rgb/info.json
+++ b/keyboards/mwstudio/mw65_rgb/info.json
@@ -43,10 +43,7 @@
{"matrix": [0, 11], "x": 11, "y": 0},
{"matrix": [0, 12], "x": 12, "y": 0},
{"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
-
- {"matrix": [4, 4], "x": 15, "y": 0, "w": 0.5},
{"matrix": [0, 14], "x": 15.5, "y": 0},
- {"matrix": [4, 3], "x": 16.5, "y": 0, "w": 0.5},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1},
diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c
index 8153790b14..77750b5174 100644
--- a/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c
+++ b/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c
@@ -18,7 +18,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_DEL, KC_VOLU,
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG,
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[1] = LAYOUT(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_HUI, _______,
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_HUI,
RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD,
diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap.c
index ef5ea90b61..6179d4cdc1 100644
--- a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap.c
+++ b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap.c
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
[_BASE] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_HOME, KC_VOLU,
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
[_FN] = LAYOUT(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, _______, _______, _______,
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUSE, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_DEL,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h
index 7fadbdc39c..bd979e9c81 100644
--- a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h
+++ b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h
@@ -273,19 +273,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-#ifdef ENCODER_ENABLE
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- if (clockwise) {
- tap_code(dynamic_keymap_get_keycode(biton32(layer_state), 4, 3));
- } else {
- tap_code(dynamic_keymap_get_keycode(biton32(layer_state), 4, 4));
- }
- }
- return true;
-}
-#endif
-
bool rgb_matrix_indicators_user(void) {
switch (biton32(layer_state)) {
case _FN:
diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c
index f4625bf7a7..e51a5e3ab8 100644
--- a/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c
+++ b/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/keymap.c
@@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
[_BASE] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_HOME, KC_VOLU,
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
@@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
[_FN] = LAYOUT(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, _______, _______, _______,
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, _______,
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, _______, _______, KC_PAUSE, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, _______, KC_PSCR, KC_DEL,
_______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, _______, _______, RGB_VAI, RGB_TOG,
@@ -168,19 +168,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-#ifdef ENCODER_ENABLE
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- if (clockwise) {
- tap_code(dynamic_keymap_get_keycode(biton32(layer_state), 4, 3));
- } else {
- tap_code(dynamic_keymap_get_keycode(biton32(layer_state), 4, 4));
- }
- }
- return true;
-}
-#endif
-
bool rgb_matrix_indicators_user(void) {
HSV hsv = rgb_matrix_config.hsv;
uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c
index a1b54a8411..bf0f30c36b 100644
--- a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c
+++ b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c
@@ -34,7 +34,7 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_DEL, KC_VOLU,
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG,
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[1] = LAYOUT(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_HUI, _______,
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_HUI,
RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, USER00, RGB_SAI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, USER01, RGB_VAI, RGB_SAD,
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[2] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[3] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -96,17 +96,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
-#ifdef ENCODER_ENABLE
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- if (clockwise) {
- tap_code(dynamic_keymap_get_keycode(get_highest_layer(layer_state), 4, 3));
- } else {
- tap_code(dynamic_keymap_get_keycode(get_highest_layer(layer_state), 4, 4));
- }
- }
- return true;
-}
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______) },
+};
#endif
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/via/rules.mk b/keyboards/mwstudio/mw65_rgb/keymaps/via/rules.mk
index 36b7ba9cbc..1189f4ad19 100644
--- a/keyboards/mwstudio/mw65_rgb/keymaps/via/rules.mk
+++ b/keyboards/mwstudio/mw65_rgb/keymaps/via/rules.mk
@@ -1,2 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/mwstudio/mw660/config.h b/keyboards/mwstudio/mw660/config.h
index 8c5cad9bef..87659c1f67 100644
--- a/keyboards/mwstudio/mw660/config.h
+++ b/keyboards/mwstudio/mw660/config.h
@@ -16,9 +16,6 @@
#pragma once
-#define DRIVER_LED_TOTAL 34
-#define RGBLED_NUM 34
-
#define WS2812_PWM_DRIVER PWMD4 // default: PWMD2
#define WS2812_PWM_CHANNEL 3 // default: 2
//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy).
diff --git a/keyboards/mwstudio/mw660/info.json b/keyboards/mwstudio/mw660/info.json
index 5d1edb296f..fdbd7564a7 100644
--- a/keyboards/mwstudio/mw660/info.json
+++ b/keyboards/mwstudio/mw660/info.json
@@ -12,6 +12,9 @@
"nkro": true,
"rgblight": true
},
+ "rgblight": {
+ "led_count": 34
+ },
"ws2812": {
"pin": "B8"
},
diff --git a/keyboards/mwstudio/mw75/config.h b/keyboards/mwstudio/mw75/config.h
index 0a9b073ce1..9f7ac76614 100644
--- a/keyboards/mwstudio/mw75/config.h
+++ b/keyboards/mwstudio/mw75/config.h
@@ -16,12 +16,9 @@
#pragma once
-#define RGBLIGHT_SLEEP
-
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define RGB_MATRIX_LED_COUNT 97
-#define RGBLED_NUM 97
#define RGB_MATRIX_KEYPRESSES
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
diff --git a/keyboards/mwstudio/mw75/info.json b/keyboards/mwstudio/mw75/info.json
index cc2e3dc408..5637110e55 100644
--- a/keyboards/mwstudio/mw75/info.json
+++ b/keyboards/mwstudio/mw75/info.json
@@ -24,6 +24,10 @@
"bootmagic": {
"matrix": [0, 1]
},
+ "rgblight": {
+ "led_count": 97,
+ "sleep": true
+ },
"ws2812": {
"pin": "B3"
},
diff --git a/keyboards/mwstudio/mw75r2/config.h b/keyboards/mwstudio/mw75r2/config.h
index ded31181aa..7d706246b9 100644
--- a/keyboards/mwstudio/mw75r2/config.h
+++ b/keyboards/mwstudio/mw75r2/config.h
@@ -16,12 +16,9 @@
#pragma once
-#define RGBLIGHT_SLEEP
-
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define RGB_MATRIX_LED_COUNT 21
-#define RGBLED_NUM 21
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_BREATHING
diff --git a/keyboards/mwstudio/mw75r2/info.json b/keyboards/mwstudio/mw75r2/info.json
index f86df57fe5..535d4e41d5 100644
--- a/keyboards/mwstudio/mw75r2/info.json
+++ b/keyboards/mwstudio/mw75r2/info.json
@@ -8,6 +8,10 @@
"pid": "0x7502",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "led_count": 21,
+ "sleep": true
+ },
"ws2812": {
"pin": "B3"
},
diff --git a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c
index 633629abc7..0454d3c056 100644
--- a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c
+++ b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c
@@ -104,48 +104,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
-#ifdef ENCODER_ENABLE
-static uint8_t encoder_state[NUM_ENCODERS] = {0};
-static keypos_t encoder_cw[NUM_ENCODERS] = {{3, 5}};
-static keypos_t encoder_ccw[NUM_ENCODERS] = {{4, 5}};
-
-void encoder_action_unregister(void) {
- for (uint8_t index = 0; index < NUM_ENCODERS; ++index) {
- if (encoder_state[index]) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
- .pressed = false,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = 0;
- action_exec(encoder_event);
- }
- }
-}
-
-void encoder_action_register(uint8_t index, bool clockwise) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = clockwise ? encoder_cw[index] : encoder_ccw[index],
- .pressed = true,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
- action_exec(encoder_event);
-}
-
-void matrix_scan_user(void) {
- encoder_action_unregister();
-}
-
-bool encoder_update_user(uint8_t index, bool clockwise) {
- encoder_action_register(index, clockwise);
- return true;
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______) },
};
#endif
-
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (user_config.top_rgb_change)
diff --git a/keyboards/mwstudio/mw75r2/keymaps/via/rules.mk b/keyboards/mwstudio/mw75r2/keymaps/via/rules.mk
index 36b7ba9cbc..1189f4ad19 100644
--- a/keyboards/mwstudio/mw75r2/keymaps/via/rules.mk
+++ b/keyboards/mwstudio/mw75r2/keymaps/via/rules.mk
@@ -1,2 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
+ENCODER_MAP_ENABLE = yes