diff options
Diffstat (limited to 'keyboards/kabedon')
-rw-r--r-- | keyboards/kabedon/kabedon78s/config.h | 4 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon78s/info.json | 5 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon980/config.h | 4 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon980/info.json | 5 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon98e/config.h | 4 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon98e/info.json | 7 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon98e/kabedon98e.c | 57 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon98e/keymaps/default/keymap.c | 20 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon98e/keymaps/default/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon98e/keymaps/via/keymap.c | 14 | ||||
-rw-r--r-- | keyboards/kabedon/kabedon98e/keymaps/via/rules.mk | 1 |
11 files changed, 35 insertions, 87 deletions
diff --git a/keyboards/kabedon/kabedon78s/config.h b/keyboards/kabedon/kabedon78s/config.h index 57f829e692..05d2733f8b 100644 --- a/keyboards/kabedon/kabedon78s/config.h +++ b/keyboards/kabedon/kabedon78s/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - #define RGBLED_NUM 20 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/kabedon/kabedon78s/info.json b/keyboards/kabedon/kabedon78s/info.json index 8ec6b52705..02505c3676 100644 --- a/keyboards/kabedon/kabedon78s/info.json +++ b/keyboards/kabedon/kabedon78s/info.json @@ -8,6 +8,11 @@ "pid": "0x3738", "device_version": "0.0.1" }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 20 + }, "ws2812": { "pin": "B7" }, diff --git a/keyboards/kabedon/kabedon980/config.h b/keyboards/kabedon/kabedon980/config.h index 655a8af4a9..1592030f81 100644 --- a/keyboards/kabedon/kabedon980/config.h +++ b/keyboards/kabedon/kabedon980/config.h @@ -19,10 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DYNAMIC_KEYMAP_LAYER_COUNT 3 - #define RGBLED_NUM 20 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/kabedon/kabedon980/info.json b/keyboards/kabedon/kabedon980/info.json index 95781f0581..15ae8ab876 100644 --- a/keyboards/kabedon/kabedon980/info.json +++ b/keyboards/kabedon/kabedon980/info.json @@ -8,6 +8,11 @@ "pid": "0x3938", "device_version": "0.0.1" }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 20 + }, "ws2812": { "pin": "B7" }, diff --git a/keyboards/kabedon/kabedon98e/config.h b/keyboards/kabedon/kabedon98e/config.h index c8ae65099b..28963e1935 100644 --- a/keyboards/kabedon/kabedon98e/config.h +++ b/keyboards/kabedon/kabedon98e/config.h @@ -15,7 +15,6 @@ */ #pragma once -#define RGBLED_NUM 24 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL @@ -37,7 +36,4 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_CW_KEY { { 0, 0 },{ 2, 0 } } -#define ENCODERS_CCW_KEY { { 6, 0 },{ 8, 0 } } - #define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/kabedon/kabedon98e/info.json b/keyboards/kabedon/kabedon98e/info.json index cbe83c98ee..40888d8292 100644 --- a/keyboards/kabedon/kabedon98e/info.json +++ b/keyboards/kabedon/kabedon98e/info.json @@ -9,6 +9,9 @@ "device_version": "0.0.2", "force_nkro": true }, + "rgblight": { + "led_count": 24 + }, "ws2812": { "pin": "B4", "driver": "pwm" @@ -50,13 +53,9 @@ {"matrix": [1, 7], "x": 14, "y": 0.5}, {"matrix": [5, 7], "x": 15.5, "y": 0.5}, - {"matrix": [0, 0], "x": 16.9, "y": 0, "w": 0.6, "h": 0.5}, {"matrix": [4, 8], "x": 17, "y": 0.5}, - {"matrix": [2, 0], "x": 17.5, "y": 0, "w": 0.6, "h": 0.5}, - {"matrix": [6, 0], "x": 18.4, "y": 0, "w": 0.6, "h": 0.5}, {"matrix": [4, 0], "x": 18.5, "y": 0.5}, - {"matrix": [8, 0], "x": 19, "y": 0, "w": 0.6, "h": 0.5}, {"matrix": [3, 0], "x": 0, "y": 1.75}, {"matrix": [2, 1], "x": 1, "y": 1.75}, diff --git a/keyboards/kabedon/kabedon98e/kabedon98e.c b/keyboards/kabedon/kabedon98e/kabedon98e.c deleted file mode 100644 index 9fd34b58af..0000000000 --- a/keyboards/kabedon/kabedon98e/kabedon98e.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright 2021 KDon<370490639@qq.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -static uint8_t encoder_state[NUM_ENCODERS] = {0}; -static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; - -void encoder_action_unregister(void) { - for (int 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_kb(void) { - encoder_action_unregister(); - matrix_scan_user(); -} - -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - encoder_action_register(index, clockwise); - return true; -}; diff --git a/keyboards/kabedon/kabedon98e/keymaps/default/keymap.c b/keyboards/kabedon/kabedon98e/keymaps/default/keymap.c index f730ee95b2..3dcdbf8377 100644 --- a/keyboards/kabedon/kabedon98e/keymaps/default/keymap.c +++ b/keyboards/kabedon/kabedon98e/keymaps/default/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { └──┘└──┘└──┘ */ [_BASE] = LAYOUT( - KC_ESC, 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_DEL, KC_HOME, KC_INS, KC_END, KC_PGUP, KC_MUTE, KC_PGDN, + KC_ESC, 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_DEL, KC_INS, KC_MUTE, KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, 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_P7, KC_P8, KC_P9, 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_P4, KC_P5, KC_P6, KC_PPLS, @@ -53,19 +53,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), [_FN] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS), - -[_FN1] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS) +}; +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, }; +#endif diff --git a/keyboards/kabedon/kabedon98e/keymaps/default/rules.mk b/keyboards/kabedon/kabedon98e/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/kabedon/kabedon98e/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/kabedon/kabedon98e/keymaps/via/keymap.c b/keyboards/kabedon/kabedon98e/keymaps/via/keymap.c index f730ee95b2..6cb85164c0 100644 --- a/keyboards/kabedon/kabedon98e/keymaps/via/keymap.c +++ b/keyboards/kabedon/kabedon98e/keymaps/via/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { └──┘└──┘└──┘ */ [_BASE] = LAYOUT( - KC_ESC, 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_DEL, KC_HOME, KC_INS, KC_END, KC_PGUP, KC_MUTE, KC_PGDN, + KC_ESC, 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_DEL, KC_INS, KC_MUTE, KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, 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_P7, KC_P8, KC_P9, 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_P4, KC_P5, KC_P6, KC_PPLS, @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), [_FN] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS), [_FN1] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -69,3 +69,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + [2] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, +}; +#endif diff --git a/keyboards/kabedon/kabedon98e/keymaps/via/rules.mk b/keyboards/kabedon/kabedon98e/keymaps/via/rules.mk index 1e5b99807c..f1adcab005 100644 --- a/keyboards/kabedon/kabedon98e/keymaps/via/rules.mk +++ b/keyboards/kabedon/kabedon98e/keymaps/via/rules.mk @@ -1 +1,2 @@ VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes |