summaryrefslogtreecommitdiff
path: root/keyboards/mwstudio/alicekk
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/mwstudio/alicekk')
-rw-r--r--keyboards/mwstudio/alicekk/alicekk.c14
-rw-r--r--keyboards/mwstudio/alicekk/config.h11
-rw-r--r--keyboards/mwstudio/alicekk/info.json8
-rw-r--r--keyboards/mwstudio/alicekk/keymaps/via/keymap.c6
4 files changed, 12 insertions, 27 deletions
diff --git a/keyboards/mwstudio/alicekk/alicekk.c b/keyboards/mwstudio/alicekk/alicekk.c
index 96c468066a..e8ab40b2b9 100644
--- a/keyboards/mwstudio/alicekk/alicekk.c
+++ b/keyboards/mwstudio/alicekk/alicekk.c
@@ -14,17 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "alicekk.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/mwstudio/alicekk/config.h b/keyboards/mwstudio/alicekk/config.h
index 290871bde5..53ac3aa161 100644
--- a/keyboards/mwstudio/alicekk/config.h
+++ b/keyboards/mwstudio/alicekk/config.h
@@ -16,19 +16,8 @@
#pragma once
-
-/* key matrix pins */
-#define MATRIX_ROW_PINS { A3, A5, A6, A7, B0 }
-#define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, A4, A2, A1, B6, B5, B4, B3, A15 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
#define FORCE_NKRO
-
-#define RGB_DI_PIN B1
-
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define RGBLED_NUM 87
diff --git a/keyboards/mwstudio/alicekk/info.json b/keyboards/mwstudio/alicekk/info.json
index ec0d58b07e..b88dd97b3a 100644
--- a/keyboards/mwstudio/alicekk/info.json
+++ b/keyboards/mwstudio/alicekk/info.json
@@ -6,11 +6,19 @@
"pid": "0x3201",
"device_version": "0.0.1"
},
+ "matrix_pins": {
+ "cols": ["A10", "A9", "A8", "B15", "B14", "B13", "B12", "A4", "A2", "A1", "B6", "B5", "B4", "B3", "A15"],
+ "rows": ["A3", "A5", "A6", "A7", "B0"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "B11", "pin_b": "B10"}
]
},
+ "ws2812": {
+ "pin": "B1"
+ },
"processor": "STM32F103",
"bootloader": "stm32duino",
"layouts": {
diff --git a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c
index 6c21e053fa..92e893d5c5 100644
--- a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c
+++ b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c
@@ -63,7 +63,8 @@ void encoder_action_unregister(void) {
keyevent_t encoder_event = (keyevent_t) {
.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
.pressed = false,
- .time = (timer_read() | 1)
+ .time = timer_read(),
+ .type = KEY_EVENT
};
encoder_state[index] = 0;
action_exec(encoder_event);
@@ -75,7 +76,8 @@ 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() | 1)
+ .time = timer_read(),
+ .type = KEY_EVENT
};
encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
action_exec(encoder_event);