mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-27 19:41:16 +00:00
Updated RGB Matrix keycodes
This commit is contained in:
parent
c5aaf42db8
commit
810b1536c6
@ -21,11 +21,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
[LAYER_RGB] = LAYOUT_numpad_6x6(
|
||||
_______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
_______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD,
|
||||
_______, _______, _______, RGB_MOD, _______, RGB_SPI,
|
||||
_______, _______, _______, RM_HUEU, RM_SATU, RM_VALU,
|
||||
_______, _______, _______, RM_HUED, RM_SATD, RM_VALD,
|
||||
_______, _______, _______, RM_NEXT, _______, RM_SPDU,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, RGB_SPD,
|
||||
_______, _______, _______, _______, _______, RM_SPDD,
|
||||
_______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
@ -82,11 +82,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
[LAYER_RGB] = LAYOUT_numpad_6x6(
|
||||
_______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
_______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD,
|
||||
_______, _______, _______, RGB_DEF, RGB_IEF, RGB_SPI,
|
||||
_______, _______, _______, RM_HUEU, RM_SATU, RM_VALU,
|
||||
_______, _______, _______, RM_HUED, RM_SATD, RM_VALD,
|
||||
_______, _______, _______, RM_DMOD, RM_IMOD, RM_SPDU,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, RGB_SPD,
|
||||
_______, _______, _______, _______, _______, RM_SPDD,
|
||||
_______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||
switch (keycode) {
|
||||
#ifdef RGB_IDLE_ENABLE
|
||||
// Handle all the RGB settings
|
||||
case RGB_DEF:
|
||||
case RM_DMOD:
|
||||
if (record->event.pressed) {
|
||||
// Change the RGB matrix state to active if editing idle
|
||||
if (rgb_idle_edit_mode) {
|
||||
@ -125,7 +125,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||
rgb_matrix_state_save(&active_rgb_matrix);
|
||||
}
|
||||
return false;
|
||||
case RGB_IEF:
|
||||
case RM_IMOD:
|
||||
if (record->event.pressed) {
|
||||
// Change the RGB matrix state to idle
|
||||
if (!rgb_idle_edit_mode) {
|
||||
@ -137,49 +137,49 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case RGB_SAI:
|
||||
case RM_SATU:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_increase_sat_noeeprom();
|
||||
rgb_idle_edit_mode ? rgb_matrix_state_save(&idle_rgb_matrix) : rgb_matrix_state_save(&active_rgb_matrix);
|
||||
}
|
||||
return false;
|
||||
case RGB_SAD:
|
||||
case RM_SATD:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_decrease_sat_noeeprom();
|
||||
rgb_idle_edit_mode ? rgb_matrix_state_save(&idle_rgb_matrix) : rgb_matrix_state_save(&active_rgb_matrix);
|
||||
}
|
||||
return false;
|
||||
case RGB_VAI:
|
||||
case RM_VALU:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_increase_val_noeeprom();
|
||||
rgb_idle_edit_mode ? rgb_matrix_state_save(&idle_rgb_matrix) : rgb_matrix_state_save(&active_rgb_matrix);
|
||||
}
|
||||
return false;
|
||||
case RGB_VAD:
|
||||
case RM_VALD:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_decrease_val_noeeprom();
|
||||
rgb_idle_edit_mode ? rgb_matrix_state_save(&idle_rgb_matrix) : rgb_matrix_state_save(&active_rgb_matrix);
|
||||
}
|
||||
return false;
|
||||
case RGB_HUI:
|
||||
case RM_HUEU:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_increase_hue_noeeprom();
|
||||
rgb_idle_edit_mode ? rgb_matrix_state_save(&idle_rgb_matrix) : rgb_matrix_state_save(&active_rgb_matrix);
|
||||
}
|
||||
return false;
|
||||
case RGB_HUD:
|
||||
case RM_HUED:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_decrease_hue_noeeprom();
|
||||
rgb_idle_edit_mode ? rgb_matrix_state_save(&idle_rgb_matrix) : rgb_matrix_state_save(&active_rgb_matrix);
|
||||
}
|
||||
return false;
|
||||
case RGB_SPI:
|
||||
case RM_SPDU:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_increase_speed_noeeprom();
|
||||
rgb_idle_edit_mode ? rgb_matrix_state_save(&idle_rgb_matrix) : rgb_matrix_state_save(&active_rgb_matrix);
|
||||
}
|
||||
return false;
|
||||
case RGB_SPD:
|
||||
case RM_SPDD:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_decrease_speed_noeeprom();
|
||||
rgb_idle_edit_mode ? rgb_matrix_state_save(&idle_rgb_matrix) : rgb_matrix_state_save(&active_rgb_matrix);
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include "quantum.h"
|
||||
|
||||
enum custom_keycodes {
|
||||
RGB_DEF = QK_KB,
|
||||
RGB_IEF
|
||||
RM_DMOD = QK_KB,
|
||||
RM_IMOD
|
||||
};
|
||||
#define LAYER_RGB (MAX_LAYER - 1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user