mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-24 04:12:56 +00:00
Compare commits
5 Commits
8d0fa73a0d
...
617bf3de11
Author | SHA1 | Date | |
---|---|---|---|
|
617bf3de11 | ||
|
9c86583981 | ||
|
e66fce38b2 | ||
|
c843ad1268 | ||
|
1cd0ee66a6 |
@ -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
|
||||
|
@ -1515,6 +1515,9 @@
|
||||
"ymd96": {
|
||||
"target": "ymdk/ymd96"
|
||||
},
|
||||
"ymdk/id75": {
|
||||
"target": "ymdk/id75/f103"
|
||||
},
|
||||
"ymdk_np21": {
|
||||
"target": "ymdk/np21"
|
||||
},
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
13
keyboards/ymdk/id75/f103/keyboard.json
Normal file
13
keyboards/ymdk/id75/f103/keyboard.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"manufacturer": "YMDK",
|
||||
"bootloader": "uf2boot",
|
||||
"matrix_pins": {
|
||||
"cols": ["A10", "A9", "A8", "B15", "B14", "B13", "B12", "A5", "A6", "A4", "A3", "A2", "A1", "A0", "A15"],
|
||||
"rows": ["B2", "B1", "B0", "A7", "B10"]
|
||||
},
|
||||
"processor": "STM32F103",
|
||||
"ws2812": {
|
||||
"driver": "pwm",
|
||||
"pin": "B9"
|
||||
}
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"manufacturer": "YMDK",
|
||||
"keyboard_name": "Idobao x YMDK ID75",
|
||||
"maintainer": "qmk",
|
||||
"bootloader": "uf2boot",
|
||||
"diode_direction": "ROW2COL",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
@ -11,152 +9,143 @@
|
||||
"nkro": true,
|
||||
"rgb_matrix": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["A10", "A9", "A8", "B15", "B14", "B13", "B12", "A5", "A6", "A4", "A3", "A2", "A1", "A0", "A15"],
|
||||
"rows": ["B2", "B1", "B0", "A7", "B10"]
|
||||
},
|
||||
"processor": "STM32F103",
|
||||
"ws2812": {
|
||||
"driver": "pwm",
|
||||
"pin": "B9"
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"animations": {
|
||||
"alphas_mods": true,
|
||||
"gradient_up_down": true,
|
||||
"gradient_left_right": true,
|
||||
"breathing": true,
|
||||
"band_sat": true,
|
||||
"band_val": true,
|
||||
"band_pinwheel_sat": true,
|
||||
"band_pinwheel_val": true,
|
||||
"band_sat": true,
|
||||
"band_spiral_sat": true,
|
||||
"band_spiral_val": true,
|
||||
"band_val": true,
|
||||
"breathing": true,
|
||||
"cycle_all": true,
|
||||
"cycle_left_right": true,
|
||||
"cycle_up_down": true,
|
||||
"rainbow_moving_chevron": true,
|
||||
"cycle_out_in": true,
|
||||
"cycle_out_in_dual": true,
|
||||
"cycle_pinwheel": true,
|
||||
"cycle_spiral": true,
|
||||
"cycle_up_down": true,
|
||||
"digital_rain": true,
|
||||
"dual_beacon": true,
|
||||
"rainbow_beacon": true,
|
||||
"rainbow_pinwheels": true,
|
||||
"raindrops": true,
|
||||
"jellybean_raindrops": true,
|
||||
"gradient_left_right": true,
|
||||
"gradient_up_down": true,
|
||||
"hue_breathing": true,
|
||||
"hue_pendulum": true,
|
||||
"hue_wave": true,
|
||||
"pixel_rain": true,
|
||||
"jellybean_raindrops": true,
|
||||
"multisplash": true,
|
||||
"pixel_flow": true,
|
||||
"pixel_fractal": true,
|
||||
"typing_heatmap": true,
|
||||
"digital_rain": true,
|
||||
"solid_reactive_simple": true,
|
||||
"pixel_rain": true,
|
||||
"rainbow_beacon": true,
|
||||
"rainbow_moving_chevron": true,
|
||||
"rainbow_pinwheels": true,
|
||||
"raindrops": true,
|
||||
"solid_multisplash": true,
|
||||
"solid_reactive": true,
|
||||
"solid_reactive_wide": true,
|
||||
"solid_reactive_multiwide": true,
|
||||
"solid_reactive_cross": true,
|
||||
"solid_reactive_multicross": true,
|
||||
"solid_reactive_nexus": true,
|
||||
"solid_reactive_multinexus": true,
|
||||
"splash": true,
|
||||
"multisplash": true,
|
||||
"solid_reactive_multiwide": true,
|
||||
"solid_reactive_nexus": true,
|
||||
"solid_reactive_simple": true,
|
||||
"solid_reactive_wide": true,
|
||||
"solid_splash": true,
|
||||
"solid_multisplash": true
|
||||
"splash": true,
|
||||
"typing_heatmap": true
|
||||
},
|
||||
"driver": "ws2812",
|
||||
"layout": [
|
||||
{"flags": 4, "matrix": [4, 14], "x": 224, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 13], "x": 208, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 12], "x": 192, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 11], "x": 176, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 10], "x": 160, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 9], "x": 144, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 8], "x": 128, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 7], "x": 112, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 6], "x": 96, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 5], "x": 80, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 4], "x": 64, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 3], "x": 48, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 2], "x": 32, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 1], "x": 16, "y": 64},
|
||||
{"flags": 4, "matrix": [4, 0], "x": 0, "y": 64},
|
||||
{"flags": 4, "matrix": [3, 14], "x": 224, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 13], "x": 208, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 12], "x": 192, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 11], "x": 176, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 10], "x": 160, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 9], "x": 144, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 8], "x": 128, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 7], "x": 112, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 6], "x": 96, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 5], "x": 80, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 4], "x": 64, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 3], "x": 48, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 2], "x": 32, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 1], "x": 16, "y": 48},
|
||||
{"flags": 4, "matrix": [3, 0], "x": 0, "y": 48},
|
||||
{"flags": 4, "matrix": [2, 14], "x": 224, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 13], "x": 208, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 12], "x": 192, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 11], "x": 176, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 10], "x": 160, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 9], "x": 144, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 8], "x": 128, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 7], "x": 112, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 6], "x": 96, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 5], "x": 80, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 4], "x": 64, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 3], "x": 48, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 2], "x": 32, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 1], "x": 16, "y": 32},
|
||||
{"flags": 4, "matrix": [2, 0], "x": 0, "y": 32},
|
||||
{"flags": 4, "matrix": [1, 14], "x": 224, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 13], "x": 208, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 12], "x": 192, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 11], "x": 176, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 10], "x": 160, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 9], "x": 144, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 8], "x": 128, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 7], "x": 112, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 6], "x": 96, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 5], "x": 80, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 4], "x": 64, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 3], "x": 48, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 2], "x": 32, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 1], "x": 16, "y": 16},
|
||||
{"flags": 4, "matrix": [1, 0], "x": 0, "y": 16},
|
||||
{"flags": 4, "matrix": [0, 14], "x": 224, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 13], "x": 208, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 12], "x": 192, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 11], "x": 176, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 10], "x": 160, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 9], "x": 144, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 8], "x": 128, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 7], "x": 112, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 6], "x": 96, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 5], "x": 80, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 4], "x": 64, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 3], "x": 48, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 2], "x": 32, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 1], "x": 16, "y": 0},
|
||||
{"flags": 4, "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"flags": 2, "x": 0, "y": 64},
|
||||
{"flags": 2, "x": 38, "y": 64},
|
||||
{"flags": 2, "x": 76, "y": 64},
|
||||
{"flags": 2, "x": 114, "y": 64},
|
||||
{"flags": 2, "x": 152, "y": 64},
|
||||
{"flags": 2, "x": 190, "y": 64},
|
||||
{"flags": 2, "x": 224, "y": 64},
|
||||
{"flags": 2, "x": 0, "y": 0},
|
||||
{"flags": 2, "x": 38, "y": 0},
|
||||
{"flags": 2, "x": 76, "y": 0},
|
||||
{"flags": 2, "x": 114, "y": 0},
|
||||
{"flags": 2, "x": 152, "y": 0},
|
||||
{"flags": 2, "x": 190, "y": 0},
|
||||
{"flags": 2, "x": 224, "y": 0}
|
||||
{"matrix": [4, 14], "x": 224, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 13], "x": 208, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 12], "x": 192, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 11], "x": 176, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 10], "x": 160, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 9], "x": 144, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 8], "x": 128, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 7], "x": 112, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 6], "x": 96, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 5], "x": 80, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 4], "x": 64, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 3], "x": 48, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 2], "x": 32, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 1], "x": 16, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 0], "x": 0, "y": 64, "flags": 4},
|
||||
{"matrix": [3, 14], "x": 224, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 13], "x": 208, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 12], "x": 192, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 11], "x": 176, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 10], "x": 160, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 9], "x": 144, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 8], "x": 128, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 7], "x": 112, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 6], "x": 96, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 5], "x": 80, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 4], "x": 64, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 3], "x": 48, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 2], "x": 32, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 1], "x": 16, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 0], "x": 0, "y": 48, "flags": 4},
|
||||
{"matrix": [2, 14], "x": 224, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 13], "x": 208, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 12], "x": 192, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 11], "x": 176, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 10], "x": 160, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 9], "x": 144, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 8], "x": 128, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 7], "x": 112, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 6], "x": 96, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 5], "x": 80, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 4], "x": 64, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 3], "x": 48, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 2], "x": 32, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 1], "x": 16, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 0], "x": 0, "y": 32, "flags": 4},
|
||||
{"matrix": [1, 14], "x": 224, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 13], "x": 208, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 12], "x": 192, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 11], "x": 176, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 10], "x": 160, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 9], "x": 144, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 8], "x": 128, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 7], "x": 112, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 6], "x": 96, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 5], "x": 80, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 4], "x": 64, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 3], "x": 48, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 2], "x": 32, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 1], "x": 16, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 0], "x": 0, "y": 16, "flags": 4},
|
||||
{"matrix": [0, 14], "x": 224, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 13], "x": 208, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 12], "x": 192, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 11], "x": 176, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 10], "x": 160, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 9], "x": 144, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 8], "x": 128, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 7], "x": 112, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 6], "x": 96, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 5], "x": 80, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 4], "x": 64, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
|
||||
{"x": 0, "y": 64, "flags": 2},
|
||||
{"x": 38, "y": 64, "flags": 2},
|
||||
{"x": 76, "y": 64, "flags": 2},
|
||||
{"x": 114, "y": 64, "flags": 2},
|
||||
{"x": 152, "y": 64, "flags": 2},
|
||||
{"x": 190, "y": 64, "flags": 2},
|
||||
{"x": 224, "y": 64, "flags": 2},
|
||||
{"x": 0, "y": 0, "flags": 2},
|
||||
{"x": 38, "y": 0, "flags": 2},
|
||||
{"x": 76, "y": 0, "flags": 2},
|
||||
{"x": 114, "y": 0, "flags": 2},
|
||||
{"x": 152, "y": 0, "flags": 2},
|
||||
{"x": 190, "y": 0, "flags": 2},
|
||||
{"x": 224, "y": 0, "flags": 2}
|
||||
],
|
||||
"max_brightness": 128,
|
||||
"sleep": true
|
@ -5,17 +5,18 @@
|
||||
A 75-key, 5-row ortholinear keyboard with per-key and underglow RGB LEDs.
|
||||
|
||||
* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
|
||||
* Hardware Supported: [Idobao x YMDK ID75 PCB (APM32F103CBT6)](https://www.aliexpress.com/item/3256804537842097.html)
|
||||
* This PCB uses an ARM Cortex-M3 MCU with 128kb flash. **It is not the same as `idobao/id75` or `ymdk/ymd75`.**
|
||||
* Hardware Supported: [Idobao x YMDK ID75](https://www.aliexpress.com/item/3256804537842097.html). **This is not the same PCB as `idobao/id75` or `ymdk/ymd75`.**
|
||||
This keyboard has had multiple PCB revisions, some of which may not work with the firmware in this repository. **Check your PCB before flashing.**
|
||||
* `f103`: (Geehy APM32F103CBT6, uf2boot)
|
||||
* Hardware Availability: [YMDK](https://ymdkey.com/products/id75-75-keys-ortholinear-layout-qmk-anodized-aluminum-case-plate-hot-swappable-hot-swap-type-c-pcb-mechanical-keyboard-kit), [AliExpress (YMDK Store)](https://www.aliexpress.com/item/2255800125183974.html), [Amazon](https://www.amazon.com/Ortholinear-Anodized-Aluminum-hot-swappable-Mechanical/dp/B07ZQ8CD88)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make ymdk/id75:default
|
||||
make ymdk/id75/f103:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make ymdk/id75:default:flash
|
||||
make ymdk/id75/f103: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).
|
||||
|
||||
@ -27,4 +28,5 @@ Enter the bootloader in 3 ways:
|
||||
* **Physical reset button**: Press the button on the back of the PCB twice in quick succession.
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT`. In the pre-supplied keymaps it is on the second layer, in the bottom-right corner.
|
||||
|
||||
After entering the bootloader through one of the three methods above, the keyboard will appear as a USB mass storage device named `MT.KEY`. If the CLI is unable to find this device, the compiled `.uf2` file can be manually copied to it. The keyboard will reboot on completion with the new firmware loaded.
|
||||
After entering the bootloader through one of the three methods above, the keyboard will appear as a USB mass storage device. If the CLI is unable to find this device, the compiled `.uf2` file can be manually copied to it. The keyboard will reboot on completion with the new firmware loaded.
|
||||
- `f103`: The volume name is `MT.KEY`.
|
||||
|
@ -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