mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-21 19:09:25 +00:00
Compare commits
12 Commits
744c69afbe
...
7506df7bae
Author | SHA1 | Date | |
---|---|---|---|
|
7506df7bae | ||
|
9c86583981 | ||
|
e66fce38b2 | ||
|
c843ad1268 | ||
|
0853a8ea35 | ||
|
0988523851 | ||
|
7936a791ed | ||
|
3a6df60ba5 | ||
|
5ab408aef7 | ||
|
da34d652d4 | ||
|
310c4847d5 | ||
|
f4e58eeff4 |
@ -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)
|
||||
|
||||
|
@ -11,7 +11,7 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|
||||
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|
||||
|
@ -42,38 +42,7 @@ You can define up to 32 macros in a `keymap.json` file, as used by [Configurator
|
||||
|
||||
### Selecting Your Host Keyboard Layout
|
||||
|
||||
If you type in a language other than English, or use a non-QWERTY layout like Colemak, Dvorak, or Workman, you may have set your computer's input language to match this layout. This presents a challenge when creating macros - you may need to type different keys to get the same letters! To address this you can add the `host_language` key to your `keymap.json`, like so:
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard": "handwired/my_macropad",
|
||||
"keymap": "my_keymap",
|
||||
"host_language": "dvorak",
|
||||
"macros": [
|
||||
["Hello, World!"]
|
||||
],
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
["QK_MACRO_0"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The current list of available languages is:
|
||||
|
||||
| belgian | bepo | br_abnt2 | canadian_multilingual |
|
||||
|:-------:|:----:|:--------:|:---------------------:|
|
||||
| **colemak** | **croatian** | **czech** | **danish** |
|
||||
| **dvorak_fr** | **dvorak** | **dvp** | **estonian** |
|
||||
| **finnish** | **fr_ch** | **french_afnor** | **french** |
|
||||
| **french_osx** | **german_ch** | **german** | **german_osx** |
|
||||
| **hungarian** | **icelandic** | **italian** | **italian_osx_ansi** |
|
||||
| **italian_osx_iso** | **jis** | **latvian** | **lithuanian_azerty** |
|
||||
| **lithuanian_qwerty** | **norman** | **norwegian** | **portuguese** |
|
||||
| **portuguese_osx_iso** | **romanian** | **serbian_latin** | **slovak** |
|
||||
| **slovenian** | **spanish_dvorak** | **spanish_latin_america** | **spanish** |
|
||||
| **swedish** | **turkish_f** | **turkish_q** | **uk** |
|
||||
| **us_international** | **workman** | **workman_zxcvm** |
|
||||
If you type in a language other than English, or use a non-QWERTY layout like Colemak, Dvorak, or Workman, you may have set your computer's input language to match this layout. This presents a challenge when creating macros — you may need to type different keys to get the same letters! To address this you can use [language-specific keycodes](reference_keymap_extras).
|
||||
|
||||
### Macro Basics
|
||||
|
||||
|
@ -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 |
|
||||
|
@ -2,9 +2,31 @@
|
||||
|
||||
Keyboards are able to support a wide range of languages. However, this support is not actually achieved within the keyboard itself - instead, it sends numerical codes, which the operating system maps to the appropriate characters depending on the user's configured keyboard layout. By default (and per the HID spec), this is the US ANSI layout. For example, when a Swedish person presses the key with the `å` character printed on it, the keyboard is *actually* sending the keycode for `[`.
|
||||
|
||||
Obviously, this can get confusing, so QMK provides language-specific keycode aliases for many keyboard layouts. These won't do much on their own - you still have to set the matching keyboard layout in your OS settings. Think of them more as keycap labels for your keymap.
|
||||
Obviously, this can get confusing, so QMK provides language-specific keycode aliases for many keyboard layouts. These are used in place of the `KC_` prefixed ones. They won't do much on their own - you still have to set the matching keyboard layout in your OS settings. Think of them more as keycap labels for your keymap. The language-specific keycode aliases are defined in the files listed in the [Keycodes Header](#header-files) column below.
|
||||
|
||||
Simply `#include` one of the keycode headers below at the top of your `keymap.c`, and assign the keycodes defined in the header in place of the `KC_` prefixed ones.
|
||||
## Selecting Your Host Keyboard Layout
|
||||
|
||||
To select a host keyboard layout, simply `#include` one of the [keycode headers](#header-files) below at the top of your `keymap.c`. Example:
|
||||
|
||||
```c
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#include "keymap_japanese.h" // [!code focus]
|
||||
```
|
||||
|
||||
Alternatively, if using `keymap.json`, add the `host_language` key as shown in the following example. The available languages are those with a _Sendstring LUT Header_ entry in one of the [Header Files](#header-files) tables.
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard": "handwired/my_macropad",
|
||||
"keymap": "my_keymap",
|
||||
"host_language": "swedish", // [!code focus]
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
["SE_ARNG"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Sendstring Support
|
||||
|
||||
|
@ -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
|
||||
|
14
keyboards/lily58/lite_rev3/config.h
Normal file
14
keyboards/lily58/lite_rev3/config.h
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2023 yuchi
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
|
||||
|
||||
#define SERIAL_USART_FULL_DUPLEX
|
||||
#define SERIAL_USART_TX_PIN GP0
|
||||
#define SERIAL_USART_RX_PIN GP1
|
||||
|
||||
#define I2C_DRIVER I2CD1
|
||||
#define I2C1_SDA_PIN GP14
|
||||
#define I2C1_SCL_PIN GP15
|
7
keyboards/lily58/lite_rev3/halconf.h
Normal file
7
keyboards/lily58/lite_rev3/halconf.h
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright 2024 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next <halconf.h>
|
104
keyboards/lily58/lite_rev3/keyboard.json
Normal file
104
keyboards/lily58/lite_rev3/keyboard.json
Normal file
@ -0,0 +1,104 @@
|
||||
{
|
||||
"keyboard_name": "Lily58 Lite Rev3",
|
||||
"manufacturer": "Liliums",
|
||||
"maintainer": "yuchi",
|
||||
"url": "",
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"diode_direction": "COL2ROW",
|
||||
"usb": {
|
||||
"vid": "0x1209",
|
||||
"pid": "0x5801",
|
||||
"device_version": "1.0.0"
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"serial": {
|
||||
"driver": "vendor"
|
||||
}
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["GP8", "GP7", "GP6", "GP5", "GP4", "GP3"],
|
||||
"rows": ["GP13", "GP12", "GP11", "GP10", "GP9"]
|
||||
},
|
||||
"features": {
|
||||
"oled": true,
|
||||
"bootmagic": true,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0.5},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0.375},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0.125},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0.125},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0.25},
|
||||
|
||||
{"matrix": [5, 5], "x": 10.5, "y": 0.25},
|
||||
{"matrix": [5, 4], "x": 11.5, "y": 0.125},
|
||||
{"matrix": [5, 3], "x": 12.5, "y": 0},
|
||||
{"matrix": [5, 2], "x": 13.5, "y": 0.125},
|
||||
{"matrix": [5, 1], "x": 14.5, "y": 0.375},
|
||||
{"matrix": [5, 0], "x": 15.5, "y": 0.5},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 1.5},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1.375},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1.125},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1.125},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1.25},
|
||||
|
||||
{"matrix": [6, 5], "x": 10.5, "y": 1.25},
|
||||
{"matrix": [6, 4], "x": 11.5, "y": 1.125},
|
||||
{"matrix": [6, 3], "x": 12.5, "y": 1},
|
||||
{"matrix": [6, 2], "x": 13.5, "y": 1.125},
|
||||
{"matrix": [6, 1], "x": 14.5, "y": 1.375},
|
||||
{"matrix": [6, 0], "x": 15.5, "y": 1.5},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 2.5},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2.375},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2.125},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2.125},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2.25},
|
||||
|
||||
{"matrix": [7, 5], "x": 10.5, "y": 2.25},
|
||||
{"matrix": [7, 4], "x": 11.5, "y": 2.125},
|
||||
{"matrix": [7, 3], "x": 12.5, "y": 2},
|
||||
{"matrix": [7, 2], "x": 13.5, "y": 2.125},
|
||||
{"matrix": [7, 1], "x": 14.5, "y": 2.375},
|
||||
{"matrix": [7, 0], "x": 15.5, "y": 2.5},
|
||||
|
||||
{"matrix": [3, 0], "x": 0, "y": 3.5},
|
||||
{"matrix": [3, 1], "x": 1, "y": 3.375},
|
||||
{"matrix": [3, 2], "x": 2, "y": 3.125},
|
||||
{"matrix": [3, 3], "x": 3, "y": 3},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3.125},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3.25},
|
||||
{"matrix": [4, 5], "x": 6, "y": 2.75},
|
||||
|
||||
{"matrix": [9, 5], "x": 9.5, "y": 2.75},
|
||||
{"matrix": [8, 5], "x": 10.5, "y": 3.25},
|
||||
{"matrix": [8, 4], "x": 11.5, "y": 3.125},
|
||||
{"matrix": [8, 3], "x": 12.5, "y": 3},
|
||||
{"matrix": [8, 2], "x": 13.5, "y": 3.125},
|
||||
{"matrix": [8, 1], "x": 14.5, "y": 3.375},
|
||||
{"matrix": [8, 0], "x": 15.5, "y": 3.5},
|
||||
|
||||
{"matrix": [4, 1], "x": 2.5, "y": 4.125},
|
||||
{"matrix": [4, 2], "x": 3.5, "y": 4.15},
|
||||
{"matrix": [4, 3], "x": 4.5, "y": 4.25},
|
||||
{"matrix": [4, 4], "x": 6, "y": 4.25, "h": 1.5},
|
||||
|
||||
{"matrix": [9, 4], "x": 9.5, "y": 4.25, "h": 1.5},
|
||||
{"matrix": [9, 3], "x": 11, "y": 4.25},
|
||||
{"matrix": [9, 2], "x": 12, "y": 4.15},
|
||||
{"matrix": [9, 1], "x": 13, "y": 4.15}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
11
keyboards/lily58/lite_rev3/mcuconf.h
Normal file
11
keyboards/lily58/lite_rev3/mcuconf.h
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2024 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_I2C_USE_I2C0
|
||||
#define RP_I2C_USE_I2C0 FALSE
|
||||
|
||||
#undef RP_I2C_USE_I2C1
|
||||
#define RP_I2C_USE_I2C1 TRUE
|
28
keyboards/lily58/lite_rev3/readme.md
Normal file
28
keyboards/lily58/lite_rev3/readme.md
Normal file
@ -0,0 +1,28 @@
|
||||
# Lily58 Lite Rev3
|
||||
|
||||
![lily58_lite](https://i.imgur.com/RCx5Xym.jpeg)
|
||||
![lily58_lite_rev3_pcb](https://i.imgur.com/rIjVjCE.png)
|
||||
|
||||
|
||||
* Keyboard Maintainer: [yuchi](https://github.com/kata0510)
|
||||
* Hardware Supported: RP2040-Zero
|
||||
* Hardware Availability: [PCB Link](https://github.com/kata0510/Lily58/tree/master/Lite_Rev3)
|
||||
* Other Information(ja) [Link](https://docs.liliums.net/lily58-lite-rev3/about/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make lily58/lite_rev3:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make lily58/lite_rev3:default:flash
|
||||
|
||||
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).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
@ -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
|
||||
|
@ -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