Merge remote-tracking branch 'qmk/master' into merge-2024-06-23

This commit is contained in:
Ilya Zhuravlev
2024-06-23 22:54:29 -06:00
15675 changed files with 653160 additions and 679575 deletions

View File

@ -15,36 +15,11 @@
*/
#include "process_backlight.h"
#ifdef LED_MATRIX_ENABLE
# include "led_matrix.h"
#else
# include "backlight.h"
#endif
#include "backlight.h"
bool process_backlight(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
#ifdef LED_MATRIX_ENABLE
case QK_BACKLIGHT_ON:
led_matrix_enable();
return false;
case QK_BACKLIGHT_OFF:
led_matrix_disable();
return false;
case QK_BACKLIGHT_DOWN:
led_matrix_decrease_val();
return false;
case QK_BACKLIGHT_UP:
led_matrix_increase_val();
return false;
case QK_BACKLIGHT_TOGGLE:
led_matrix_toggle();
return false;
case QK_BACKLIGHT_STEP:
led_matrix_step();
return false;
#else
case QK_BACKLIGHT_ON:
backlight_level(BACKLIGHT_LEVELS);
return false;
@ -63,11 +38,10 @@ bool process_backlight(uint16_t keycode, keyrecord_t *record) {
case QK_BACKLIGHT_STEP:
backlight_step();
return false;
# ifdef BACKLIGHT_BREATHING
#ifdef BACKLIGHT_BREATHING
case QK_BACKLIGHT_TOGGLE_BREATHING:
backlight_toggle_breathing();
return false;
# endif
#endif
}
}

View File

@ -0,0 +1,47 @@
// Copyright 2024 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#include "process_led_matrix.h"
#include "led_matrix.h"
bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
case QK_BACKLIGHT_ON: // TODO: Remove backlight keycodes
case QK_LED_MATRIX_ON:
led_matrix_enable();
return false;
case QK_BACKLIGHT_OFF:
case QK_LED_MATRIX_OFF:
led_matrix_disable();
return false;
case QK_BACKLIGHT_TOGGLE:
case QK_LED_MATRIX_TOGGLE:
led_matrix_toggle();
return false;
case QK_BACKLIGHT_STEP:
case QK_LED_MATRIX_MODE_NEXT:
led_matrix_step();
return false;
case QK_LED_MATRIX_MODE_PREVIOUS:
led_matrix_step_reverse();
return false;
case QK_BACKLIGHT_UP:
case QK_LED_MATRIX_BRIGHTNESS_UP:
led_matrix_increase_val();
return false;
case QK_BACKLIGHT_DOWN:
case QK_LED_MATRIX_BRIGHTNESS_DOWN:
led_matrix_decrease_val();
return false;
case QK_LED_MATRIX_SPEED_UP:
led_matrix_increase_speed();
return false;
case QK_LED_MATRIX_SPEED_DOWN:
led_matrix_decrease_speed();
return false;
}
}
return true;
}

View File

@ -0,0 +1,10 @@
// Copyright 2024 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_led_matrix(uint16_t keycode, keyrecord_t *record);

View File

@ -69,7 +69,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
#endif
switch (keycode) {
case RGB_TOG:
case QK_UNDERGLOW_TOGGLE:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
rgblight_toggle();
#endif
@ -77,7 +77,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
rgb_matrix_toggle();
#endif
return false;
case RGB_MODE_FORWARD:
case QK_UNDERGLOW_MODE_NEXT:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_step, rgblight_step_reverse);
#endif
@ -85,7 +85,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_step, rgb_matrix_step_reverse);
#endif
return false;
case RGB_MODE_REVERSE:
case QK_UNDERGLOW_MODE_PREVIOUS:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_step_reverse, rgblight_step);
#endif
@ -93,7 +93,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_step_reverse, rgb_matrix_step);
#endif
return false;
case RGB_HUI:
case QK_UNDERGLOW_HUE_UP:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_increase_hue, rgblight_decrease_hue);
#endif
@ -101,7 +101,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_increase_hue, rgb_matrix_decrease_hue);
#endif
return false;
case RGB_HUD:
case QK_UNDERGLOW_HUE_DOWN:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_decrease_hue, rgblight_increase_hue);
#endif
@ -109,7 +109,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_decrease_hue, rgb_matrix_increase_hue);
#endif
return false;
case RGB_SAI:
case QK_UNDERGLOW_SATURATION_UP:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_increase_sat, rgblight_decrease_sat);
#endif
@ -117,7 +117,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_increase_sat, rgb_matrix_decrease_sat);
#endif
return false;
case RGB_SAD:
case QK_UNDERGLOW_SATURATION_DOWN:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_decrease_sat, rgblight_increase_sat);
#endif
@ -125,7 +125,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_decrease_sat, rgb_matrix_increase_sat);
#endif
return false;
case RGB_VAI:
case QK_UNDERGLOW_VALUE_UP:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_increase_val, rgblight_decrease_val);
#endif
@ -133,7 +133,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_increase_val, rgb_matrix_decrease_val);
#endif
return false;
case RGB_VAD:
case QK_UNDERGLOW_VALUE_DOWN:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_decrease_val, rgblight_increase_val);
#endif
@ -141,7 +141,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_decrease_val, rgb_matrix_increase_val);
#endif
return false;
case RGB_SPI:
case QK_UNDERGLOW_SPEED_UP:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_increase_speed, rgblight_decrease_speed);
#endif
@ -149,7 +149,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_increase_speed, rgb_matrix_decrease_speed);
#endif
return false;
case RGB_SPD:
case QK_UNDERGLOW_SPEED_DOWN:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
handleKeycodeRGB(shifted, rgblight_decrease_speed, rgblight_increase_speed);
#endif