summaryrefslogtreecommitdiffstats
path: root/keyboards/yushakobo/quick17
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2022-12-06 17:04:10 +0800
committerlokher <lokher@gmail.com>2022-12-06 17:04:10 +0800
commit27fc28fd2ff52e079a5bc58d6aaea4c752420615 (patch)
tree7ac943fb1ba4f430a7220efd18f66f6a77205c30 /keyboards/yushakobo/quick17
parente736133392fe6427cfb995da0787337189828272 (diff)
parent2709b6ed616f8012ff4cfd3ee69a822a8d188351 (diff)
Merge upstream master
Diffstat (limited to 'keyboards/yushakobo/quick17')
-rw-r--r--keyboards/yushakobo/quick17/config.h127
-rw-r--r--keyboards/yushakobo/quick17/keymaps/default/keymap.c114
-rw-r--r--keyboards/yushakobo/quick17/keymaps/default/readme.md64
-rw-r--r--keyboards/yushakobo/quick17/keymaps/via/keymap.c114
-rw-r--r--keyboards/yushakobo/quick17/keymaps/via/readme.md62
-rw-r--r--keyboards/yushakobo/quick17/rgb_matrix_kb.inc117
6 files changed, 598 insertions, 0 deletions
diff --git a/keyboards/yushakobo/quick17/config.h b/keyboards/yushakobo/quick17/config.h
new file mode 100644
index 0000000000..f4d5b167e2
--- /dev/null
+++ b/keyboards/yushakobo/quick17/config.h
@@ -0,0 +1,127 @@
+/*
+Copyright 2021 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
+
+#include "config_common.h"
+
+/* key matrix size */
+#define MATRIX_ROWS 3
+#define MATRIX_COLS 6
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+#define MATRIX_ROW_PINS { F4, B3, B6 }
+#define MATRIX_COL_PINS { F5, D4, E6, F7, C6, D7 }
+
+/* COL2ROW, ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+//#define BACKLIGHT_PIN B7
+//#define BACKLIGHT_LEVELS 3
+//#define BACKLIGHT_BREATHING
+
+#define RGB_DI_PIN D2
+#define RGBLED_NUM 18
+
+#ifdef RGB_MATRIX_ENABLE
+# define RGB_MATRIX_LED_COUNT RGBLED_NUM
+# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
+# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+// # define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 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 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+// HSV_TEAL
+// #define RGB_MATRIX_DEFAULT_HUE 128
+// #define RGB_MATRIX_DEFAULT_SAT 255
+ #define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
+# define RGB_MATRIX_HUE_STEP 8
+# define RGB_MATRIX_SAT_STEP 8
+# define RGB_MATRIX_VAL_STEP 8
+# define RGB_MATRIX_SPD_STEP 10
+#endif
+
+
+
+
+#ifdef RGBLIGHT_ENABLE
+# define RGBLIGHT_LED_MAP {\
+ 6, 7, 12, 13, 14, 15,\
+ 16, 17, 11, 10, 9, 8,\
+ 0, 1, 2, 3, 4, 5\
+ }
+# define RGBLIGHT_HUE_STEP 8
+# define RGBLIGHT_SAT_STEP 8
+# define RGBLIGHT_VAL_STEP 8
+# define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */
+//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+//# define RGBLIGHT_EFFECT_BREATHING
+# define RGBLIGHT_EFFECT_RAINBOW_MOOD
+# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+//# define RGBLIGHT_EFFECT_SNAKE
+//# define RGBLIGHT_EFFECT_KNIGHT
+# define RGBLIGHT_EFFECT_CHRISTMAS
+# define RGBLIGHT_EFFECT_STATIC_GRADIENT
+# define RGBLIGHT_EFFECT_RGB_TEST
+//# define RGBLIGHT_EFFECT_ALTERNATING
+/*== customize breathing effect ==*/
+/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
+//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
+/*==== use exp() and sin() ====*/
+//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
+//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
+
+#define RGBLIGHT_LAYERS
+#define RGBLIGHT_MAX_LAYERS 8
+
+#endif
+
+#ifdef ENCODER_ENABLE
+#define ENCODERS_PAD_A { B4 }
+#define ENCODERS_PAD_B { B5 }
+#endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+
+/* Bootmagic Lite key configuration */
+//#define BOOTMAGIC_LITE_ROW 0
+//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/yushakobo/quick17/keymaps/default/keymap.c b/keyboards/yushakobo/quick17/keymaps/default/keymap.c
new file mode 100644
index 0000000000..d1b27cd94e
--- /dev/null
+++ b/keyboards/yushakobo/quick17/keymaps/default/keymap.c
@@ -0,0 +1,114 @@
+/* Copyright 2021 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
+#include "quick17_prefs.h"
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ KC_LANG
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_CONTROL] = LAYOUT(
+ KC_TAB, KC_PGUP,KC_UP, KC_PGDN,KC_HOME,KC_INS,
+ KC_LCTL,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, KC_DEL,
+ KC_LSFT,KC_LGUI,KC_ESC, KC_LALT,LT(3,KC_SPC),TO(1)
+ ),
+ [_EDIT1] = LAYOUT(
+ KC_ESC, KC_W, KC_E, KC_R, KC_Y, KC_BSPC,
+ KC_LCTL,KC_A, KC_D, KC_F, KC_H, LCTL(KC_Z),
+ KC_LSFT,KC_X, KC_V, KC_B, LT(2,KC_SPC),LCTL(KC_S)
+ ),
+ [_EDIT2] = LAYOUT(
+ KC_ESC, KC_Q, KC_BTN3,KC_INS, KC_ENT, KC_DEL,
+ KC_LCTL,KC_LBRC,KC_RBRC,KC_PGDN,KC_PGUP,LCTL(KC_Y),
+ KC_LSFT,TO(3), RGB_TOG,TO(0), _______,KC_NO
+ ),
+ [_FN] = LAYOUT(
+ KC_ESC, KC_LANG,KC_NO, RGB_TOG,KC_MNXT,KC_VOLU,
+ KC_CAPS,KC_NUM, KC_NO, RGB_MOD,KC_MPRV,KC_VOLD,
+ CG_NORM,LCG_SWP,EE_CLR, QK_BOOT, TO(0), KC_MUTE
+ )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_LANG:
+ if (record->event.pressed){
+ if (keymap_config.swap_lctl_lgui == false){
+ tap_code16(LALT(KC_GRV));
+ } else {
+ if(input_mode()){
+ register_code(KC_LNG2);
+ set_input_mode(false);
+ } else {
+ register_code(KC_LNG1);
+ set_input_mode(true);
+ }
+ }
+ } else {
+ unregister_code(KC_LNG1);
+ unregister_code(KC_LNG2);
+ }
+ break;
+ default:
+ break;
+ }
+ return true;
+}
+
+bool encoder_update_user(uint8_t index, bool clockwise){
+ if (index == 0) {
+ if (IS_LAYER_ON(_EDIT2)){
+ if (clockwise) {
+ tap_code(KC_LBRC);
+ } else {
+ tap_code(KC_RBRC);
+ }
+ } else if (IS_LAYER_ON(_EDIT1)){
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (IS_LAYER_ON(_FN)){
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ } else { // IS_LAYER_ON(_CONTROL)
+ if (clockwise) {
+ tap_code(KC_WH_U);
+ } else {
+ tap_code(KC_WH_D);
+ }
+ }
+ }
+ return false;
+}
+
+#ifdef RGB_MATRIX_ENABLE
+ void keyboard_post_init_user(void){
+ rgb_matrix_mode(RGB_MATRIX_CUSTOM_quick17_rgbm_effect);
+ set_input_mode(false);
+ }
+#else
+ void keyboard_post_init_user(void){
+ rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
+ set_input_mode(false);
+ }
+#endif
diff --git a/keyboards/yushakobo/quick17/keymaps/default/readme.md b/keyboards/yushakobo/quick17/keymaps/default/readme.md
new file mode 100644
index 0000000000..cd68e12646
--- /dev/null
+++ b/keyboards/yushakobo/quick17/keymaps/default/readme.md
@@ -0,0 +1,64 @@
+# The default keymap for quick17
+
+## CONTROL(default) Layer
+```
+ ,-----------------------------------------------.
+ | Tab | PgUp | Up | PgDn | Home | Ins |
+ |-------+-------+-------+-------+-------+-------|
+ | Ctrl | Left | Down | Right | End | Del |
+ |-------+-------+-------+-------+-------+-------|
+ | Shift | GUI | Esc | Alt | FN/Spc| EDIT1 |
+ `-----------------------------------------------'
+```
+
+## EDIT1 Layer
+```
+ ,--------------------------------------------------.
+ | Esc | W | E | R | Y | Bspc |
+ |-------+-------+-------+-------+---------+--------|
+ | Ctrl | A | D | F | H | Ctrl+Z |
+ |-------+-------+-------+-------+---------+--------|
+ | Shift | X | V | B |EDIT2/Spc| Ctrl+S |
+ `--------------------------------------------------'
+```
+
+## EDIT2 Layer
+```
+ ,-------------------------------------------------.
+ | Esc | Q | BTN3 | Ins | Enter | Bspc |
+ |-------+-------+-------+-------+--------+--------|
+ | Ctrl | [ | ] | PgDn | PgUp | Ctrl+Z |
+ |-------+-------+-------+-------+--------+--------|
+ | Shift | FN |RGB_TOG|CONTROL| (NONE) | (NONE) |
+ `-------------------------------------------------'
+```
+
+## FN Layer
+```
+ ,---------------------------------------------------.
+ | Esc | LANG | (NONE) |RGB_TOG| Media > | Vol+ |
+ |-------+-------+--------+-------+---------+--------|
+ | Caps | Numlk | (NONE) |RGB_MOD| Media < | Vol- |
+ |-------+-------+--------+-------+---------+--------|
+ | Win | mac | EE_CLR | QK_BOOT | CONTROL | Mute |
+ `---------------------------------------------------'
+```
+### difference between mac-Mode and Win-Mode
+- In mac Mode, `Ctrl` key will be changed into `command` key.
+- `LANG` key will change its behaviour.
+
+### "LANG" key behaviour
+
+|LED-sign|Blue|Red|Green|
+|---|---|---|---|
+|mac Mode|-|かな|英数|
+|Win Mode|半角/全角(Alt+`)|-|-|
+
+## Rotary encoder behaviour
+
+|On layer...|Clockwise|C-Clockwise|
+|---|---|---|
+|CONTROL|Scroll Up|Scroll Down|
+|EDIT1|Vol+|Vol-|
+|EDIT2|[|]|
+|FN|Media >|Media <|
diff --git a/keyboards/yushakobo/quick17/keymaps/via/keymap.c b/keyboards/yushakobo/quick17/keymaps/via/keymap.c
new file mode 100644
index 0000000000..d1b27cd94e
--- /dev/null
+++ b/keyboards/yushakobo/quick17/keymaps/via/keymap.c
@@ -0,0 +1,114 @@
+/* Copyright 2021 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
+#include "quick17_prefs.h"
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ KC_LANG
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_CONTROL] = LAYOUT(
+ KC_TAB, KC_PGUP,KC_UP, KC_PGDN,KC_HOME,KC_INS,
+ KC_LCTL,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, KC_DEL,
+ KC_LSFT,KC_LGUI,KC_ESC, KC_LALT,LT(3,KC_SPC),TO(1)
+ ),
+ [_EDIT1] = LAYOUT(
+ KC_ESC, KC_W, KC_E, KC_R, KC_Y, KC_BSPC,
+ KC_LCTL,KC_A, KC_D, KC_F, KC_H, LCTL(KC_Z),
+ KC_LSFT,KC_X, KC_V, KC_B, LT(2,KC_SPC),LCTL(KC_S)
+ ),
+ [_EDIT2] = LAYOUT(
+ KC_ESC, KC_Q, KC_BTN3,KC_INS, KC_ENT, KC_DEL,
+ KC_LCTL,KC_LBRC,KC_RBRC,KC_PGDN,KC_PGUP,LCTL(KC_Y),
+ KC_LSFT,TO(3), RGB_TOG,TO(0), _______,KC_NO
+ ),
+ [_FN] = LAYOUT(
+ KC_ESC, KC_LANG,KC_NO, RGB_TOG,KC_MNXT,KC_VOLU,
+ KC_CAPS,KC_NUM, KC_NO, RGB_MOD,KC_MPRV,KC_VOLD,
+ CG_NORM,LCG_SWP,EE_CLR, QK_BOOT, TO(0), KC_MUTE
+ )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_LANG:
+ if (record->event.pressed){
+ if (keymap_config.swap_lctl_lgui == false){
+ tap_code16(LALT(KC_GRV));
+ } else {
+ if(input_mode()){
+ register_code(KC_LNG2);
+ set_input_mode(false);
+ } else {
+ register_code(KC_LNG1);
+ set_input_mode(true);
+ }
+ }
+ } else {
+ unregister_code(KC_LNG1);
+ unregister_code(KC_LNG2);
+ }
+ break;
+ default:
+ break;
+ }
+ return true;
+}
+
+bool encoder_update_user(uint8_t index, bool clockwise){
+ if (index == 0) {
+ if (IS_LAYER_ON(_EDIT2)){
+ if (clockwise) {
+ tap_code(KC_LBRC);
+ } else {
+ tap_code(KC_RBRC);
+ }
+ } else if (IS_LAYER_ON(_EDIT1)){
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (IS_LAYER_ON(_FN)){
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ } else { // IS_LAYER_ON(_CONTROL)
+ if (clockwise) {
+ tap_code(KC_WH_U);
+ } else {
+ tap_code(KC_WH_D);
+ }
+ }
+ }
+ return false;
+}
+
+#ifdef RGB_MATRIX_ENABLE
+ void keyboard_post_init_user(void){
+ rgb_matrix_mode(RGB_MATRIX_CUSTOM_quick17_rgbm_effect);
+ set_input_mode(false);
+ }
+#else
+ void keyboard_post_init_user(void){
+ rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
+ set_input_mode(false);
+ }
+#endif
diff --git a/keyboards/yushakobo/quick17/keymaps/via/readme.md b/keyboards/yushakobo/quick17/keymaps/via/readme.md
new file mode 100644
index 0000000000..4e43989a0e
--- /dev/null
+++ b/keyboards/yushakobo/quick17/keymaps/via/readme.md
@@ -0,0 +1,62 @@
+# The via keymap for quick17
+
+## CONTROL(default) Layer
+```
+ ,-----------------------------------------------.
+ | Tab | PgUp | Up | PgDn | Home | Ins |
+ |-------+-------+-------+-------+-------+-------|
+ | Ctrl | Left | Down | Right | End | Del |
+ |-------+-------+-------+-------+-------+-------|
+ | Shift | GUI | Esc | Alt | FN/Spc| EDIT1 |
+ `-----------------------------------------------'
+```
+
+## EDIT1 Layer
+```
+ ,--------------------------------------------------.
+ | Esc | W | E | R | Y | Bspc |
+ |-------+-------+-------+-------+---------+--------|
+ | Ctrl | A | D | F | H | Ctrl+Z |
+ |-------+-------+-------+-------+---------+--------|
+ | Shift | X | V | B |EDIT2/Spc| Ctrl+S |
+ `--------------------------------------------------'
+```
+
+## EDIT2 Layer
+```
+ ,-------------------------------------------------.
+ | Esc | Q | BTN3 | Ins | Enter | Bspc |
+ |-------+-------+-------+-------+--------+--------|
+ | Ctrl | [ | ] | PgDn | PgUp | Ctrl+Z |
+ |-------+-------+-------+-------+--------+--------|
+ | Shift | FN |RGB_TOG|CONTROL| (NONE) | (NONE) |
+ `-------------------------------------------------'
+```
+
+## FN Layer
+```
+ ,---------------------------------------------------.
+ | Esc | LANG | (NONE) |RGB_TOG| Media > | Vol+ |
+ |-------+-------+--------+-------+---------+--------|
+ | Caps | Numlk | (NONE) |RGB_MOD| Media < | Vol- |
+ |-------+-------+--------+-------+---------+--------|
+ | Win | mac | EE_CLR | QK_BOOT | CONTROL | Mute |
+ `---------------------------------------------------'
+```
+### difference between mac-Mode and Win-Mode
+- In mac Mode, `Ctrl` key will be changed into `command` key.
+- `LANG` key will change its behaviour.
+
+### "LANG" key behaviour
+
+- mac Mode: cycle around "かな" and "英数"
+- Win Mode: key combinations of Alt and `
+
+## Rotary encoder behaviour
+
+|On layer...|Clockwise|C-Clockwise|
+|---|---|---|
+|CONTROL|Scroll Up|Scroll Down|
+|EDIT1|Vol+|Vol-|
+|EDIT2|[|]|
+|FN|Media >|Media <|
diff --git a/keyboards/yushakobo/quick17/rgb_matrix_kb.inc b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc
new file mode 100644
index 0000000000..34b410ce57
--- /dev/null
+++ b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc
@@ -0,0 +1,117 @@
+RGB_MATRIX_EFFECT(quick17_rgbm_effect)
+
+#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+#include "quick17_prefs.h"
+
+#define LED_LAYOUT(\
+ L00, L01, L02, L03, L04, L05, \
+ L10, L11, L12, L13, L14, L15, \
+ L20, L21, L22, L23, L24, L25 \
+) {\
+ L10, L11, L20, L21, L22, L23,\
+ L24, L25, L15, L14, L13, L12,\
+ L00, L01, L02, L03, L04, L05\
+}
+
+enum lighting_types {
+ BOUT,
+ _____,
+ INDC1,
+ INDC2,
+ INDC3,
+ INDC4,
+ INDC5,
+ JA_EN,
+ CAPSL,
+ NUM_L
+};
+
+const uint8_t rgb_keymaps [][RGB_MATRIX_LED_COUNT] = {
+ [_CONTROL] = LED_LAYOUT(
+ _____, INDC2, INDC1, INDC2, INDC3, INDC4,
+ _____, INDC1, INDC1, INDC1, INDC3, INDC4,
+ _____, _____, _____, _____, INDC5, INDC5
+ ),
+ [_EDIT1] = LED_LAYOUT(
+ _____, _____, _____, _____, _____, INDC4,
+ _____, _____, _____, _____, _____, INDC1,
+ _____, _____, _____, _____, INDC5, INDC1
+ ),
+ [_EDIT2] = LED_LAYOUT(
+ _____, _____, _____, _____, _____, INDC4,
+ _____, _____, _____, _____, _____, INDC1,
+ _____, INDC5, INDC3, INDC5, INDC5, BOUT
+ ),
+ [_FN] = LED_LAYOUT(
+ _____, JA_EN, BOUT, INDC3, INDC4, INDC4,
+ CAPSL, NUM_L, BOUT, INDC3, INDC4, INDC4,
+ INDC2, INDC2, INDC1, INDC1, INDC5, INDC4
+ )
+};
+
+static void led_color_set(uint8_t index, uint8_t color_patterns) {
+ HSV hsv = rgb_matrix_config.hsv; // 'quantum/color.h'
+ RGB rgb_white = hsv_to_rgb(_HSV( 0, 0, hsv.v)); // HSV_WHITE
+ RGB rgb_indc1 = hsv_to_rgb(_HSV(128, 255, hsv.v)); // HSV_TEAL
+ RGB rgb_indc2 = hsv_to_rgb(_HSV(191, 255, hsv.v)); // HSV_PURPLE
+ RGB rgb_indc3 = hsv_to_rgb(_HSV( 64, 255, hsv.v)); // HSV_CHARTREUSE
+ RGB rgb_indc4 = hsv_to_rgb(_HSV(106, 255, hsv.v)); // HSV_SPRINGGREEN
+ RGB rgb_indc5 = hsv_to_rgb(_HSV(234, 128, hsv.v)); // HSV_PINK
+ RGB rgb_indc6 = hsv_to_rgb(_HSV(213, 255, hsv.v)); // HSV_MAGENTA
+ RGB rgb_indc_ja = hsv_to_rgb(_HSV( 0, 255, hsv.v)); // HSV_RED
+ RGB rgb_indc_en = hsv_to_rgb(_HSV( 85, 255, hsv.v)); // HSV_GREEN
+ RGB rgb_indc_win = hsv_to_rgb(_HSV(170, 255, hsv.v)); // HSV_BLUE
+ switch(color_patterns){
+ case BOUT: rgb_matrix_set_color(index, RGB_BLACK); break;
+ case _____: rgb_matrix_set_color(index, _RGB(rgb_white)); break;
+ case INDC1: rgb_matrix_set_color(index, _RGB(rgb_indc1)); break;
+ case INDC2: rgb_matrix_set_color(index, _RGB(rgb_indc2)); break;
+ case INDC3: rgb_matrix_set_color(index, _RGB(rgb_indc3)); break;
+ case INDC4: rgb_matrix_set_color(index, _RGB(rgb_indc4)); break;
+ case INDC5: rgb_matrix_set_color(index, _RGB(rgb_indc5)); break;
+ case JA_EN:
+ if (keymap_config.swap_lctl_lgui == false) {
+ rgb_matrix_set_color(index, _RGB(rgb_indc_win));
+ } else {
+ if (input_mode()){
+ rgb_matrix_set_color(index, _RGB(rgb_indc_ja));
+ } else {
+ rgb_matrix_set_color(index, _RGB(rgb_indc_en));
+ }
+ }
+ break;
+ case CAPSL:
+ if (host_keyboard_led_state().caps_lock) {
+ rgb_matrix_set_color(index, _RGB(rgb_indc6));
+ } else {
+ rgb_matrix_set_color(index, _RGB(rgb_white));
+ }
+ break;
+ case NUM_L:
+ if (host_keyboard_led_state().num_lock) {
+ rgb_matrix_set_color(index, _RGB(rgb_indc6));
+ } else {
+ rgb_matrix_set_color(index, _RGB(rgb_white));
+ }
+ break;
+ }
+}
+
+static bool quick17_rgbm_effect (effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ if (IS_LAYER_ON(_EDIT2)){
+ led_color_set(i, rgb_keymaps[_EDIT2][i]);
+ } else if (IS_LAYER_ON(_EDIT1)){
+ led_color_set(i, rgb_keymaps[_EDIT1][i]);
+ } else if (IS_LAYER_ON(_FN)){
+ led_color_set(i, rgb_keymaps[_FN][i]);
+ } else { // IS_LAYER_ON(_CONTROL)
+ led_color_set(i, rgb_keymaps[_CONTROL][i]);
+ }
+ }
+ return rgb_matrix_check_finished_leds(led_max);
+}
+
+#endif