mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-21 10:59:29 +00:00
Compare commits
7 Commits
e7aedfa4ff
...
b26cfd3675
Author | SHA1 | Date | |
---|---|---|---|
|
b26cfd3675 | ||
|
9c86583981 | ||
|
e66fce38b2 | ||
|
c843ad1268 | ||
|
0853a8ea35 | ||
|
0988523851 | ||
|
574344d075 |
@ -456,6 +456,10 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
|
||||
POST_CONFIG_H += $(QUANTUM_DIR)/rgb_matrix/post_config.h
|
||||
|
||||
# TODO: Remove this
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_underglow.c
|
||||
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
|
||||
|
@ -4,7 +4,7 @@ This page attempts to introduce developers to the QMK Compiler. It does not go i
|
||||
|
||||
# Overview
|
||||
|
||||
The QMK Compile API consists of a few movings parts:
|
||||
The QMK Compile API consists of a few moving parts:
|
||||
|
||||
![Architecture Diagram](https://raw.githubusercontent.com/qmk/qmk_api/master/docs/architecture.svg)
|
||||
|
||||
|
@ -59,6 +59,10 @@ Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||
## Keycodes
|
||||
|
||||
::: warning
|
||||
These keycodes also simultaneously control [RGB Matrix](rgb_matrix), if enabled. This behaviour is in the process of being deprecated, so during this time it is recommended to additionally include the dedicated RGB Matrix keycodes to your keymap, and add `#define RGB_MATRIX_DISABLE_SHARED_KEYCODES` to `config.h`.
|
||||
:::
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------------------|----------|---------------------------------------------------------------------|
|
||||
|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off |
|
||||
|
@ -60,6 +60,14 @@
|
||||
"resync": true
|
||||
}
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||
{"pin_a": "B12", "pin_b": "B11", "resolution": 2}
|
||||
]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_default": {
|
||||
"layout": [
|
||||
|
@ -44,3 +44,10 @@ 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
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) },
|
||||
[1] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU), ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
|
||||
};
|
||||
#endif
|
||||
|
@ -0,0 +1,2 @@
|
||||
ENCODER_ENABLE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
40
keyboards/cannonkeys/sagittarius/sagittarius.c
Normal file
40
keyboards/cannonkeys/sagittarius/sagittarius.c
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright 2024 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#if defined(ENCODER_ENABLE) || defined(ENCODER_MAP_ENABLE)
|
||||
|
||||
# if !defined(ENCODER_SETTLE_PIN_STATE_DELAY_US)
|
||||
# define ENCODER_SETTLE_PIN_STATE_DELAY_US 2
|
||||
# endif
|
||||
|
||||
static pin_t matrix_row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
|
||||
void encoder_driver_task(void) {
|
||||
// Set all relevant rows to output, which is different to the matrix expectations
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
gpio_set_pin_output(matrix_row_pins[i]);
|
||||
}
|
||||
|
||||
// Read each encoder
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
// Set the row pin low for the corresponding encoder...
|
||||
for (uint8_t j = 0; j < 4; j++) {
|
||||
gpio_write_pin(matrix_row_pins[j], (i == j) ? 0 : 1);
|
||||
}
|
||||
// ...and let them settle.
|
||||
wait_us(ENCODER_SETTLE_PIN_STATE_DELAY_US);
|
||||
|
||||
// Run the normal encoder handling
|
||||
extern void encoder_quadrature_handle_read(uint8_t index, uint8_t pin_a_state, uint8_t pin_b_state);
|
||||
extern uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b);
|
||||
encoder_quadrature_handle_read(i, encoder_quadrature_read_pin(i, false), encoder_quadrature_read_pin(i, true));
|
||||
}
|
||||
|
||||
// Set all rows back to input-high as per matrix expectations
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
gpio_set_pin_input_high(matrix_row_pins[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(ENCODER_ENABLE) || defined(ENCODER_MAP_ENABLE)
|
@ -20,3 +20,5 @@
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||
#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -20,3 +20,5 @@
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||
#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -16,3 +16,5 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -17,3 +17,5 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -2,3 +2,5 @@
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||
#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -2,3 +2,5 @@
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||
#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -18,3 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -18,3 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -30,3 +30,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
98
keyboards/thevankeyboards/v4n4g0n_he/keyboard.json
Normal file
98
keyboards/thevankeyboards/v4n4g0n_he/keyboard.json
Normal file
@ -0,0 +1,98 @@
|
||||
{
|
||||
"keyboard_name": "V4N4G0N HE",
|
||||
"manufacturer": "trashman",
|
||||
"url": "https://trashman.club",
|
||||
"maintainer": "qmk",
|
||||
"usb": {
|
||||
"vid": "0xFEAE",
|
||||
"pid": "0x885E",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": true,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true,
|
||||
"rgblight": false,
|
||||
"backlight": false
|
||||
},
|
||||
"qmk": {
|
||||
"locking": {
|
||||
"enabled": true,
|
||||
"resync": true
|
||||
}
|
||||
},
|
||||
"matrix_pins": {
|
||||
"direct": [
|
||||
["A14", "A15", "C10", "B3", "B4", "B5", null, null, null, null, null, null],
|
||||
["C9", "A8", "A13", "D2", "B7", "B8", "C13", "C14", "C15", "C2", "C3", "A0"],
|
||||
["C7", "C8", "A10", "C11", "B6", "F0", "F1", "C1", "A2", "A4", "A5", "A6"],
|
||||
["B15", "C6", "A9", "C12", "B9", "C0", "A1", "A3", "A7", "C4", "C5", "B0"],
|
||||
["B14", "B13", "B12", "B1", "B11", "B10", "B2", null, null, null, null, null]
|
||||
]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"processor": "STM32F072",
|
||||
"bootloader": "stm32-dfu",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0.5, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1.5, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2.5, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3.5, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4.5, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5.5, "y": 0},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||
{"matrix": [1, 6], "x": 6, "y": 1},
|
||||
{"matrix": [1, 7], "x": 7, "y": 1},
|
||||
{"matrix": [1, 8], "x": 8, "y": 1},
|
||||
{"matrix": [1, 9], "x": 9, "y": 1},
|
||||
{"matrix": [1, 10], "x": 10, "y": 1},
|
||||
{"matrix": [1, 11], "x": 11, "y": 1, "w": 1.75},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.25},
|
||||
{"matrix": [2, 1], "x": 1.25, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2.25, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3.25, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4.25, "y": 2},
|
||||
{"matrix": [2, 5], "x": 5.25, "y": 2},
|
||||
{"matrix": [2, 6], "x": 6.25, "y": 2},
|
||||
{"matrix": [2, 7], "x": 7.25, "y": 2},
|
||||
{"matrix": [2, 8], "x": 8.25, "y": 2},
|
||||
{"matrix": [2, 9], "x": 9.25, "y": 2},
|
||||
{"matrix": [2, 10], "x": 10.25, "y": 2},
|
||||
{"matrix": [2, 11], "x": 11.25, "y": 2, "w": 1.5},
|
||||
|
||||
{"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
|
||||
{"matrix": [3, 1], "x": 1.75, "y": 3},
|
||||
{"matrix": [3, 2], "x": 2.75, "y": 3},
|
||||
{"matrix": [3, 3], "x": 3.75, "y": 3},
|
||||
{"matrix": [3, 4], "x": 4.75, "y": 3},
|
||||
{"matrix": [3, 5], "x": 5.75, "y": 3},
|
||||
{"matrix": [3, 6], "x": 6.75, "y": 3},
|
||||
{"matrix": [3, 7], "x": 7.75, "y": 3},
|
||||
{"matrix": [3, 8], "x": 8.75, "y": 3},
|
||||
{"matrix": [3, 9], "x": 9.75, "y": 3},
|
||||
{"matrix": [3, 10], "x": 10.75, "y": 3},
|
||||
{"matrix": [3, 11], "x": 11.75, "y": 3},
|
||||
|
||||
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
|
||||
{"matrix": [4, 1], "x": 1.25, "y": 4},
|
||||
{"matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.25},
|
||||
{"matrix": [4, 3], "x": 3.5, "y": 4, "w": 6.25},
|
||||
{"matrix": [4, 4], "x": 9.75, "y": 4},
|
||||
{"matrix": [4, 5], "x": 10.75, "y": 4},
|
||||
{"matrix": [4, 6], "x": 11.75, "y": 4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
/*
|
||||
Copyright 2020 <terry@terrymathews.net>
|
||||
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 QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
_LAYER0,
|
||||
_LAYER1,
|
||||
_LAYER2,
|
||||
_LAYER3,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_LAYER0] = LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
LT(_LAYER1, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_LAYER1, KC_QUOT),
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT(_LAYER2, KC_ENT),
|
||||
KC_LCTL, MO(2), KC_LGUI, KC_SPC, KC_RSFT, KC_LALT, TG(_LAYER3)
|
||||
),
|
||||
[_LAYER1] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RIGHT, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[_LAYER2] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
_______, KC_PIPE, KC_DQT, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_VOLU, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[_LAYER3] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______,
|
||||
KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||
_______, KC_LALT, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
13
keyboards/thevankeyboards/v4n4g0n_he/readme.md
Normal file
13
keyboards/thevankeyboards/v4n4g0n_he/readme.md
Normal file
@ -0,0 +1,13 @@
|
||||
# V4N4G0N HE
|
||||
|
||||
A gaming keyboard building off the jetvan minivan layout
|
||||
|
||||
* Keyboard Maintainer: trashman
|
||||
* Hardware Supported: h3ll4g0n pcb
|
||||
* Hardware Availability: TBA
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make thevankeyboards/v4n4g0n_he:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
@ -18,3 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
|
||||
#define RGBLIGHT_DI_PIN E6
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -9,3 +9,5 @@
|
||||
#define WORK_LOUDER_LED_PIN_1 B6
|
||||
#define WORK_LOUDER_LED_PIN_2 B7
|
||||
#define WORK_LOUDER_LED_PIN_3 B5
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -18,3 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
|
||||
#define RGBLIGHT_DI_PIN C7
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -5,3 +5,5 @@
|
||||
|
||||
#define RGBLIGHT_DI_PIN D2
|
||||
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -20,3 +20,5 @@ 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_SHARED_KEYCODES
|
||||
|
@ -2,87 +2,200 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "process_underglow.h"
|
||||
#include "rgblight.h"
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
# include "rgblight.h"
|
||||
#endif
|
||||
#include "action_util.h"
|
||||
#include "keycodes.h"
|
||||
#include "modifiers.h"
|
||||
|
||||
// TODO: Remove this
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
# include "rgb_matrix.h"
|
||||
#endif
|
||||
|
||||
bool process_underglow(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
|
||||
switch (keycode) {
|
||||
case QK_UNDERGLOW_TOGGLE:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
rgblight_toggle();
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
rgb_matrix_toggle();
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_MODE_NEXT:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_step_reverse();
|
||||
} else {
|
||||
rgblight_step();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_step_reverse();
|
||||
} else {
|
||||
rgb_matrix_step();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_MODE_PREVIOUS:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_step();
|
||||
} else {
|
||||
rgblight_step_reverse();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_step();
|
||||
} else {
|
||||
rgb_matrix_step_reverse();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_HUE_UP:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_decrease_hue();
|
||||
} else {
|
||||
rgblight_increase_hue();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_decrease_hue();
|
||||
} else {
|
||||
rgb_matrix_increase_hue();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_HUE_DOWN:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_increase_hue();
|
||||
} else {
|
||||
rgblight_decrease_hue();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_increase_hue();
|
||||
} else {
|
||||
rgb_matrix_decrease_hue();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_SATURATION_UP:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_decrease_sat();
|
||||
} else {
|
||||
rgblight_increase_sat();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_decrease_sat();
|
||||
} else {
|
||||
rgb_matrix_increase_sat();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_SATURATION_DOWN:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_increase_sat();
|
||||
} else {
|
||||
rgblight_decrease_sat();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_increase_sat();
|
||||
} else {
|
||||
rgb_matrix_decrease_sat();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_VALUE_UP:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_decrease_val();
|
||||
} else {
|
||||
rgblight_increase_val();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_decrease_val();
|
||||
} else {
|
||||
rgb_matrix_increase_val();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_VALUE_DOWN:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_increase_hue();
|
||||
rgblight_increase_val();
|
||||
} else {
|
||||
rgblight_decrease_hue();
|
||||
rgblight_decrease_val();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_increase_val();
|
||||
} else {
|
||||
rgb_matrix_decrease_val();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_SPEED_UP:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_decrease_speed();
|
||||
} else {
|
||||
rgblight_increase_speed();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_decrease_speed();
|
||||
} else {
|
||||
rgb_matrix_increase_speed();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case QK_UNDERGLOW_SPEED_DOWN:
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
if (shifted) {
|
||||
rgblight_increase_speed();
|
||||
} else {
|
||||
rgblight_decrease_speed();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)
|
||||
if (shifted) {
|
||||
rgb_matrix_increase_speed();
|
||||
} else {
|
||||
rgb_matrix_decrease_speed();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@
|
||||
# include "process_rgb_matrix.h"
|
||||
#endif
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
# include "process_underglow.h"
|
||||
#endif
|
||||
|
||||
@ -382,7 +382,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
#ifdef GRAVE_ESC_ENABLE
|
||||
process_grave_esc(keycode, record) &&
|
||||
#endif
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
process_underglow(keycode, record) &&
|
||||
#endif
|
||||
#if defined(RGB_MATRIX_ENABLE)
|
||||
|
Loading…
Reference in New Issue
Block a user