diff options
author | Ryan <[email protected]> | 2024-10-13 03:43:50 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-12 18:43:50 +0200 |
commit | 6fa11bf21913b5ccb531acc3c2baec963f4d384a (patch) | |
tree | aaf6188a4579949cc1fbac61d0fee5234b97996a /keyboards/work_louder | |
parent | 5c97a78ce6ab45643dcb420ba2ad20c30dcd5b8a (diff) | |
download | qmk_firmware-6fa11bf21913b5ccb531acc3c2baec963f4d384a.tar.gz qmk_firmware-6fa11bf21913b5ccb531acc3c2baec963f4d384a.zip |
Separate RGBLight/RGB Matrix keycode handling (#23679)
* Separate RGBLight/RGB Matrix keycode handling
* Remove `_DISABLE_KEYCODES` handling
* Update RGB Matrix keycode docs
* Update underglow keycodes for previously migrated boards
* Update keycodes for boards with custom handling
* Fix typos
* Fix bad merge
Diffstat (limited to 'keyboards/work_louder')
-rw-r--r-- | keyboards/work_louder/loop/config.h | 18 | ||||
-rw-r--r-- | keyboards/work_louder/loop/keymaps/default/keymap.c | 6 | ||||
-rw-r--r-- | keyboards/work_louder/loop/loop.c | 2 | ||||
-rw-r--r-- | keyboards/work_louder/loop/loop.h | 20 | ||||
-rw-r--r-- | keyboards/work_louder/micro/config.h | 13 | ||||
-rw-r--r-- | keyboards/work_louder/nano/config.h | 18 | ||||
-rw-r--r-- | keyboards/work_louder/nano/nano.c | 2 | ||||
-rw-r--r-- | keyboards/work_louder/nano/nano.h | 20 | ||||
-rw-r--r-- | keyboards/work_louder/numpad/config.h | 18 | ||||
-rw-r--r-- | keyboards/work_louder/rgb_functions.c | 45 | ||||
-rw-r--r-- | keyboards/work_louder/rgb_functions.h | 57 | ||||
-rw-r--r-- | keyboards/work_louder/work_board/config.h | 2 | ||||
-rw-r--r-- | keyboards/work_louder/work_board/keymaps/default/keymap.c | 4 | ||||
-rw-r--r-- | keyboards/work_louder/work_board/work_board.c | 2 | ||||
-rw-r--r-- | keyboards/work_louder/work_board/work_board.h | 20 |
15 files changed, 8 insertions, 239 deletions
diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index 25d390cecf..b883b0ff57 100644 --- a/keyboards/work_louder/loop/config.h +++ b/keyboards/work_louder/loop/config.h @@ -18,21 +18,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once #define RGBLIGHT_DI_PIN E6 - -#define RGB_MATRIX_DISABLE_KEYCODES - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT diff --git a/keyboards/work_louder/loop/keymaps/default/keymap.c b/keyboards/work_louder/loop/keymaps/default/keymap.c index 80acd57e4a..10b34e24c0 100644 --- a/keyboards/work_louder/loop/keymaps/default/keymap.c +++ b/keyboards/work_louder/loop/keymaps/default/keymap.c @@ -18,13 +18,13 @@ // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_MUTE, KC_MPLY, R_M_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1) + KC_MUTE, KC_MPLY, RM_TOGG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1) ), [1] = LAYOUT( - QK_BOOT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, MO(2), _______ + QK_BOOT, _______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, MO(2), _______ ), [2] = LAYOUT( - QK_BOOT, _______, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, _______ + QK_BOOT, _______, RM_TOGG, RM_NEXT, RM_HUEU, RM_HUED, RM_SATU, RM_SATD, RM_VALU, RM_VALD, _______, _______ ) }; // clang-format on diff --git a/keyboards/work_louder/loop/loop.c b/keyboards/work_louder/loop/loop.c index 6b4af7fcb6..7880584d09 100644 --- a/keyboards/work_louder/loop/loop.c +++ b/keyboards/work_louder/loop/loop.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "loop.h" +#include "quantum.h" #if defined(ENCODER_ENABLE) bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/work_louder/loop/loop.h b/keyboards/work_louder/loop/loop.h deleted file mode 100644 index b2cb2410fc..0000000000 --- a/keyboards/work_louder/loop/loop.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2021 Work Louder - * - * 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/>. - */ - -#pragma once - -#include "quantum.h" -#include "rgb_functions.h" diff --git a/keyboards/work_louder/micro/config.h b/keyboards/work_louder/micro/config.h index 733b226f69..b9f2d8d87d 100644 --- a/keyboards/work_louder/micro/config.h +++ b/keyboards/work_louder/micro/config.h @@ -3,22 +3,9 @@ #pragma once -#define RGB_MATRIX_DISABLE_KEYCODES - #define RGBLIGHT_DI_PIN D2 #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9 -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - #define WORK_LOUDER_LED_PIN_1 B6 #define WORK_LOUDER_LED_PIN_2 B7 #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/work_louder/nano/config.h b/keyboards/work_louder/nano/config.h index e50f6a7e43..2372f371b9 100644 --- a/keyboards/work_louder/nano/config.h +++ b/keyboards/work_louder/nano/config.h @@ -18,21 +18,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once #define RGBLIGHT_DI_PIN C7 - -#define RGB_MATRIX_DISABLE_KEYCODES - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT diff --git a/keyboards/work_louder/nano/nano.c b/keyboards/work_louder/nano/nano.c index 96b633aa79..28db78e46d 100644 --- a/keyboards/work_louder/nano/nano.c +++ b/keyboards/work_louder/nano/nano.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "nano.h" +#include "quantum.h" #if defined(ENCODER_ENABLE) bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/work_louder/nano/nano.h b/keyboards/work_louder/nano/nano.h deleted file mode 100644 index 04de456eca..0000000000 --- a/keyboards/work_louder/nano/nano.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2021 Drashna Jael're - * - * 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/>. - */ - -#pragma once - -#include "quantum.h" -#include "rgb_functions.h" diff --git a/keyboards/work_louder/numpad/config.h b/keyboards/work_louder/numpad/config.h index f7d0039653..cfc27d3612 100644 --- a/keyboards/work_louder/numpad/config.h +++ b/keyboards/work_louder/numpad/config.h @@ -3,23 +3,5 @@ #pragma once -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -#define RGB_MATRIX_DISABLE_KEYCODES - #define RGBLIGHT_DI_PIN D2 #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9 diff --git a/keyboards/work_louder/rgb_functions.c b/keyboards/work_louder/rgb_functions.c index fb99c0b008..15d0f432a0 100644 --- a/keyboards/work_louder/rgb_functions.c +++ b/keyboards/work_louder/rgb_functions.c @@ -14,10 +14,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "rgb_functions.h" -#include <stdint.h> -#include "quantum.h" -#include "action.h" #include "rgblight.h" #include "rgb_matrix.h" @@ -39,44 +35,3 @@ const rgblight_driver_t rgblight_driver = { .flush = ws2812_flush, }; #endif - -#ifdef RGB_MATRIX_ENABLE -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { return false; } - - if (record->event.pressed) { - switch(keycode) { - case RGB_MATRIX_TOGGLE: // toggle rgb matrix - rgb_matrix_toggle(); - return false; - case RGB_MATRIX_MODE_INC: - rgb_matrix_step(); - return false; - case RGB_MATRIX_MODE_DEC: - rgb_matrix_step_reverse(); - return false; - case RGB_MATRIX_HUE_INC: - rgb_matrix_increase_hue(); - return false; - case RGB_MATRIX_HUE_DEC: - rgb_matrix_decrease_hue(); - return false; - case RGB_MATRIX_SAT_INC: - rgb_matrix_increase_sat(); - return false; - case RGB_MATRIX_SAT_DEC: - rgb_matrix_decrease_sat(); - return false; - case RGB_MATRIX_VAL_INC: - rgb_matrix_increase_val(); - return false; - case RGB_MATRIX_VAL_DEC: - rgb_matrix_decrease_val(); - return false; - default: - break; - } - } - return true; -} -#endif diff --git a/keyboards/work_louder/rgb_functions.h b/keyboards/work_louder/rgb_functions.h deleted file mode 100644 index 20c99021fb..0000000000 --- a/keyboards/work_louder/rgb_functions.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright 2020 Neil Brian Ramirez - * - * 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 3 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/>. - */ - -#pragma once - -#include "keycodes.h" - -#ifndef RGB_MATRIX_TOGGLE -# define RGB_MATRIX_TOGGLE QK_KB_0 -#endif -#ifndef RGB_MATRIX_MODE_INC -# define RGB_MATRIX_MODE_INC QK_KB_1 -#endif -#ifndef RGB_MATRIX_MODE_DEC -# define RGB_MATRIX_MODE_DEC QK_KB_2 -#endif -#ifndef RGB_MATRIX_HUE_INC -# define RGB_MATRIX_HUE_INC QK_KB_3 -#endif -#ifndef RGB_MATRIX_HUE_DEC -# define RGB_MATRIX_HUE_DEC QK_KB_4 -#endif -#ifndef RGB_MATRIX_SAT_INC -# define RGB_MATRIX_SAT_INC QK_KB_5 -#endif -#ifndef RGB_MATRIX_SAT_DEC -# define RGB_MATRIX_SAT_DEC QK_KB_6 -#endif -#ifndef RGB_MATRIX_VAL_INC -# define RGB_MATRIX_VAL_INC QK_KB_7 -#endif -#ifndef RGB_MATRIX_VAL_DEC -# define RGB_MATRIX_VAL_DEC QK_KB_8 -#endif - -#define R_M_TOG RGB_MATRIX_TOGGLE -#define R_M_MOD RGB_MATRIX_MODE_INC -#define R_M_RMOD RGB_MATRIX_MODE_DEC -#define R_M_HUI RGB_MATRIX_HUE_INC -#define R_M_HUD RGB_MATRIX_HUE_DEC -#define R_M_SAI RGB_MATRIX_SAT_INC -#define R_M_SAD RGB_MATRIX_SAT_DEC -#define R_M_VAI RGB_MATRIX_VAL_INC -#define R_M_VAD RGB_MATRIX_VAL_DEC diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index a643cd767d..6688711bbb 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -20,5 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_DI_PIN D2 #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9 - -#define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/work_louder/work_board/keymaps/default/keymap.c b/keyboards/work_louder/work_board/keymaps/default/keymap.c index e55cd5c598..a1e4886728 100644 --- a/keyboards/work_louder/work_board/keymaps/default/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/default/keymap.c @@ -50,8 +50,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_ADJUST] = LAYOUT( - _______, QK_BOOT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , R_M_TOG, - _______, _______, MU_NEXT, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, + _______, QK_BOOT, _______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, KC_DEL , RM_TOGG, + _______, _______, MU_NEXT, RM_TOGG, RM_NEXT, RM_HUEU, RM_HUED, RM_SATU, RM_SATD, RM_VALU, RM_VALD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index b34f31df5c..2c45c7a7c9 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "work_board.h" +#include "quantum.h" #ifdef OLED_ENABLE # ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/work_louder/work_board/work_board.h b/keyboards/work_louder/work_board/work_board.h deleted file mode 100644 index 04de456eca..0000000000 --- a/keyboards/work_louder/work_board/work_board.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2021 Drashna Jael're - * - * 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/>. - */ - -#pragma once - -#include "quantum.h" -#include "rgb_functions.h" |