Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyboard Ergo68 #22677

Merged
merged 16 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions keyboards/yushakobo/ergo68/config.h
zvecr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* Copyright 2023 yushakobo
*
* 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/>.
*/

#pragma once

#define SPLIT_HAND_PIN B6
#define WS2812_DI_PIN D3

#define SPLIT_TRANSPORT_MIRROR
#define SPLIT_LAYER_STATE_ENABLE
#define SPLIT_LED_STATE_ENABLE

#define DRIVER_LED_TOTAL 74

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
// #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
#define RGB_MATRIX_STARTUP_HUE 0 // Sets the default hue value, if none has been set
#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set
#define RGB_MATRIX_STARTUP_VAL 50 // Sets the default brightness value, if none has been set
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
// #define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
#define RGB_MATRIX_SPLIT { 37, 37 } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
// If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
#define RGB_MATRIX_KEYPRESSES
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_BREATHING
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
#define ENABLE_RGB_MATRIX_RAINDROPS
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
#define ENABLE_RGB_MATRIX_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
188 changes: 188 additions & 0 deletions keyboards/yushakobo/ergo68/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"manufacturer": "yushakobo",
"keyboard_name": "ergo68",
"maintainer": "yushakobo",
"bootloader": "caterina",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"rgb_matrix": true,
"nkro": false
},
"matrix_pins": {
"cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2"],
"rows": ["D4", "C6", "D7", "E6", "B4"]
},
"debounce": 5,
"processor": "atmega32u4",
MakotoKurauchi marked this conversation as resolved.
Show resolved Hide resolved
"url": "",
"usb": {
"vid": "0x3265",
"pid": "0x0011",
"device_version": "1.0.0"
},
"rgb_matrix": {
"driver": "ws2812",
"layout": [
{ "flags": 8, "x": 0, "y": 0 },
{ "flags": 8, "x": 11, "y": 0 },
{ "flags": 8, "x": 21, "y": 0 },
{ "flags": 1, "matrix": [0,0], "x": 0, "y": 10 },
{ "flags": 4, "matrix": [0,1], "x": 14, "y": 10 },
{ "flags": 4, "matrix": [0,2], "x": 28, "y": 7 },
{ "flags": 4, "matrix": [0,3], "x": 42, "y": 6 },
{ "flags": 4, "matrix": [0,4], "x": 56, "y": 7 },
{ "flags": 4, "matrix": [0,5], "x": 70, "y": 9 },
{ "flags": 4, "matrix": [1,6], "x": 84, "y": 15 },
{ "flags": 4, "matrix": [1,5], "x": 70, "y": 20 },
{ "flags": 4, "matrix": [1,4], "x": 56, "y": 19 },
{ "flags": 4, "matrix": [1,3], "x": 42, "y": 17 },
{ "flags": 4, "matrix": [1,2], "x": 28, "y": 19 },
{ "flags": 4, "matrix": [1,1], "x": 14, "y": 22 },
{ "flags": 1, "matrix": [1,0], "x": 0, "y": 22 },
{ "flags": 1, "matrix": [2,0], "x": 0, "y": 34 },
{ "flags": 4, "matrix": [2,1], "x": 14, "y": 34 },
{ "flags": 4, "matrix": [2,2], "x": 28, "y": 31 },
{ "flags": 4, "matrix": [2,3], "x": 42, "y": 29 },
{ "flags": 4, "matrix": [2,4], "x": 56, "y": 31 },
{ "flags": 4, "matrix": [2,5], "x": 70, "y": 32 },
{ "flags": 4, "matrix": [2,6], "x": 84, "y": 26 },
{ "flags": 4, "matrix": [3,6], "x": 84, "y": 38 },
{ "flags": 4, "matrix": [3,5], "x": 70, "y": 44 },
{ "flags": 4, "matrix": [3,4], "x": 56, "y": 42 },
{ "flags": 4, "matrix": [3,3], "x": 42, "y": 41 },
{ "flags": 4, "matrix": [3,2], "x": 28, "y": 42 },
{ "flags": 4, "matrix": [3,1], "x": 14, "y": 45 },
{ "flags": 1, "matrix": [3,0], "x": 0, "y": 45 },
{ "flags": 1, "matrix": [4,0], "x": 0, "y": 57 },
{ "flags": 1, "matrix": [4,1], "x": 14, "y": 57 },
{ "flags": 1, "matrix": [4,2], "x": 28, "y": 54 },
{ "flags": 1, "matrix": [4,3], "x": 49, "y": 54 },
{ "flags": 1, "matrix": [4,4], "x": 63, "y": 55 },
{ "flags": 1, "matrix": [4,5], "x": 81, "y": 58 },
{ "flags": 1, "matrix": [4,6], "x": 95, "y": 64 },
{ "flags": 8, "x": 224, "y": 0 },
{ "flags": 8, "x": 214, "y": 0 },
{ "flags": 8, "x": 203, "y": 0 },
{ "flags": 1, "matrix": [5,0], "x": 224, "y": 10 },
{ "flags": 4, "matrix": [5,1], "x": 210, "y": 10 },
{ "flags": 4, "matrix": [5,2], "x": 196, "y": 7 },
{ "flags": 4, "matrix": [5,3], "x": 182, "y": 6 },
{ "flags": 4, "matrix": [5,4], "x": 168, "y": 7 },
{ "flags": 4, "matrix": [5,5], "x": 154, "y": 9 },
{ "flags": 4, "matrix": [6,6], "x": 140, "y": 15 },
{ "flags": 4, "matrix": [6,5], "x": 154, "y": 20 },
{ "flags": 4, "matrix": [6,4], "x": 168, "y": 19 },
{ "flags": 4, "matrix": [6,3], "x": 182, "y": 17 },
{ "flags": 4, "matrix": [6,2], "x": 196, "y": 19 },
{ "flags": 4, "matrix": [6,1], "x": 210, "y": 22 },
{ "flags": 1, "matrix": [6,0], "x": 224, "y": 22 },
{ "flags": 1, "matrix": [7,0], "x": 224, "y": 34 },
{ "flags": 4, "matrix": [7,1], "x": 210, "y": 34 },
{ "flags": 4, "matrix": [7,2], "x": 196, "y": 31 },
{ "flags": 4, "matrix": [7,3], "x": 182, "y": 29 },
{ "flags": 4, "matrix": [7,4], "x": 168, "y": 31 },
{ "flags": 4, "matrix": [7,5], "x": 154, "y": 32 },
{ "flags": 4, "matrix": [7,6], "x": 140, "y": 26 },
{ "flags": 4, "matrix": [8,6], "x": 140, "y": 38 },
{ "flags": 4, "matrix": [8,5], "x": 154, "y": 44 },
{ "flags": 4, "matrix": [8,4], "x": 168, "y": 42 },
{ "flags": 4, "matrix": [8,3], "x": 182, "y": 41 },
{ "flags": 4, "matrix": [8,2], "x": 196, "y": 42 },
{ "flags": 4, "matrix": [8,1], "x": 210, "y": 45 },
{ "flags": 1, "matrix": [8,0], "x": 224, "y": 45 },
{ "flags": 1, "matrix": [9,0], "x": 224, "y": 57 },
{ "flags": 1, "matrix": [9,1], "x": 210, "y": 57 },
{ "flags": 1, "matrix": [9,2], "x": 196, "y": 54 },
{ "flags": 1, "matrix": [9,3], "x": 175, "y": 54 },
{ "flags": 1, "matrix": [9,4], "x": 161, "y": 55 },
{ "flags": 1, "matrix": [9,5], "x": 144, "y": 58 },
{ "flags": 1, "matrix": [9,6], "x": 130, "y": 64 }
]
},
"split": {
"enabled": true,
"transport": {
"protocol": "serial"
},
"soft_serial_pin": "D0"
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix":[0,0], "x":0, "y":0},
{"matrix":[0,1], "x":1, "y":0},
{"matrix":[0,2], "x":2, "y":0},
{"matrix":[0,3], "x":3, "y":0},
{"matrix":[0,4], "x":4, "y":0},
{"matrix":[0,5], "x":5, "y":0},
{"matrix":[5,5], "x":10, "y":0},
{"matrix":[5,4], "x":11, "y":0},
{"matrix":[5,3], "x":12, "y":0},
{"matrix":[5,2], "x":13, "y":0},
{"matrix":[5,1], "x":14, "y":0},
{"matrix":[5,0], "x":15, "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":[6,6], "x":9, "y":1},
{"matrix":[6,5], "x":10, "y":1},
{"matrix":[6,4], "x":11, "y":1},
{"matrix":[6,3], "x":12, "y":1},
{"matrix":[6,2], "x":13, "y":1},
{"matrix":[6,1], "x":14, "y":1},
{"matrix":[6,0], "x":15, "y":1},
{"matrix":[2,0], "x":0, "y":2},
{"matrix":[2,1], "x":1, "y":2},
{"matrix":[2,2], "x":2, "y":2},
{"matrix":[2,3], "x":3, "y":2},
{"matrix":[2,4], "x":4, "y":2},
{"matrix":[2,5], "x":5, "y":2},
{"matrix":[2,6], "x":6, "y":1},
{"matrix":[7,6], "x":9, "y":2},
{"matrix":[7,5], "x":10, "y":2},
{"matrix":[7,4], "x":11, "y":2},
{"matrix":[7,3], "x":12, "y":2},
{"matrix":[7,2], "x":13, "y":2},
{"matrix":[7,1], "x":14, "y":2},
{"matrix":[7,0], "x":15, "y":2},
{"matrix":[3,0], "x":0, "y":3},
{"matrix":[3,1], "x":1, "y":3},
{"matrix":[3,2], "x":2, "y":3},
{"matrix":[3,3], "x":3, "y":3},
{"matrix":[3,4], "x":4, "y":3},
{"matrix":[3,5], "x":5, "y":3},
{"matrix":[3,6], "x":6, "y":3},
{"matrix":[8,6], "x":9, "y":3},
{"matrix":[8,5], "x":10, "y":3},
{"matrix":[8,4], "x":11, "y":3},
{"matrix":[8,3], "x":12, "y":3},
{"matrix":[8,2], "x":13, "y":3},
{"matrix":[8,1], "x":14, "y":3},
{"matrix":[8,0], "x":15, "y":3},
{"matrix":[4,0], "x":0, "y":4},
{"matrix":[4,1], "x":1, "y":4},
{"matrix":[4,2], "x":2, "y":4},
{"matrix":[4,3], "x":3, "y":4},
{"matrix":[4,4], "x":4, "y":4},
{"matrix":[4,5], "x":5, "y":4},
{"matrix":[4,6], "x":6, "y":4},
{"matrix":[9,6], "x":9, "y":4},
{"matrix":[9,5], "x":10, "y":4},
{"matrix":[9,4], "x":11, "y":4},
{"matrix":[9,3], "x":12, "y":4},
{"matrix":[9,2], "x":13, "y":4},
{"matrix":[9,1], "x":14, "y":4},
{"matrix":[9,0], "x":15, "y":4}
MakotoKurauchi marked this conversation as resolved.
Show resolved Hide resolved
]
}
}
}
71 changes: 71 additions & 0 deletions keyboards/yushakobo/ergo68/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* Copyright 2023 yushakobo
*
* 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

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_EQL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL,KC_LGUI,KC_LALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_LCTL
),
[1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
MakotoKurauchi marked this conversation as resolved.
Show resolved Hide resolved
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};

bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// caps lock cyan
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 128);
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 0);
}

// num lock cyan
if (host_keyboard_led_state().num_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(1, 0, 0, 128);
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(1, 0, 0, 0);
}

// scroll lock cyan
if (host_keyboard_led_state().scroll_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(2, 0, 0, 128);
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(2, 0, 0, 0);
}

// layer state
switch (get_highest_layer(layer_state)) {
case 1:
RGB_MATRIX_INDICATOR_SET_COLOR(37, 0, 0, 128);
break;
case 2:
RGB_MATRIX_INDICATOR_SET_COLOR(38, 0, 0, 128);
break;
case 3:
RGB_MATRIX_INDICATOR_SET_COLOR(39, 0, 0, 128);
break;
}
return false;
}
85 changes: 85 additions & 0 deletions keyboards/yushakobo/ergo68/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/* Copyright 2023 yushakobo
*
* 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

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_EQL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL,KC_LGUI,KC_LALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_LCTL
),
[1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
MakotoKurauchi marked this conversation as resolved.
Show resolved Hide resolved
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[3] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
MakotoKurauchi marked this conversation as resolved.
Show resolved Hide resolved
};

bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// caps lock cyan
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 128);
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 0);
}

// num lock cyan
if (host_keyboard_led_state().num_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(1, 0, 0, 128);
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(1, 0, 0, 0);
}

// scroll lock cyan
if (host_keyboard_led_state().scroll_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(2, 0, 0, 128);
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(2, 0, 0, 0);
}

// layer state
switch (get_highest_layer(layer_state)) {
case 1:
RGB_MATRIX_INDICATOR_SET_COLOR(37, 0, 0, 128);
break;
case 2:
RGB_MATRIX_INDICATOR_SET_COLOR(38, 0, 0, 128);
break;
case 3:
RGB_MATRIX_INDICATOR_SET_COLOR(39, 0, 0, 128);
break;
}
return false;
}
Loading