diff --git a/keyboards/linworks/fave84h/config.h b/keyboards/linworks/fave84h/config.h index 6a75578801..516f30e96f 100644 --- a/keyboards/linworks/fave84h/config.h +++ b/keyboards/linworks/fave84h/config.h @@ -14,49 +14,20 @@ 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 . */ - #pragma once -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 17 - -/* - * 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) - * -*/ - -// Checked with Eagle Schematic -#define MATRIX_ROW_PINS { B1, B2, B3, D3, D1, D0 } -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, B0, B7, E6} - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - /* Define RGB */ -#define RGBLED_NUM 86 -#define RGB_MATRIX_LED_COUNT 86 -#define RGB_DI_PIN D2 - #ifdef RGB_MATRIX_ENABLE +#define RGB_MATRIX_LED_COUNT 126 +#define RGB_DI_PIN D2 + #define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 -#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL +#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT #define ENABLE_RGB_MATRIX_ALPHAS_MODS #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN @@ -111,4 +82,8 @@ along with this program. If not, see . #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define EECONFIG_KB_DATA_SIZE 4 + +#define CAPS_INDICATOR_INDEX 12 + #endif diff --git a/keyboards/linworks/fave84h/fave84h.c b/keyboards/linworks/fave84h/fave84h.c deleted file mode 100644 index 4a17096df6..0000000000 --- a/keyboards/linworks/fave84h/fave84h.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2020 -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 . -*/ -#include "fave84h.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 47, NO_LED, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62 }, - { 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30 }, - { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, NO_LED, 0, NO_LED, NO_LED, NO_LED }, - { 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, NO_LED, 84, NO_LED, NO_LED, 85, NO_LED }, - { 72, 71, 70, NO_LED, NO_LED, 69, NO_LED, NO_LED, NO_LED, NO_LED, 68, NO_LED, 67, 66, 65, 64, 63 }, - }, { - // LED Index to Physical Position - { 0, 0 }, { 28, 0 }, { 42, 0 }, { 57, 0 }, { 71, 0 }, { 92, 0 }, { 106, 0 }, { 120, 0 }, { 134, 0 }, { 156, 0 }, { 170, 0 }, { 184, 0 }, { 198, 0 }, { 216, 0 }, { 230, 0 }, { 244, 0 }, - { 0, 15 }, { 14, 15 }, { 28, 15 }, { 42, 15 }, { 57, 15 }, { 71, 15 }, { 85, 15 }, { 99, 15 }, { 113, 15 }, { 127, 15 }, { 141, 15 }, { 156, 15 }, { 170, 15 }, { 191, 17 }, { 216, 15 }, { 230, 15 }, { 244, 15 }, - { 4, 27 }, { 21, 27 }, { 35, 27 }, { 50, 27 }, { 64, 27 }, { 78, 27 }, { 92, 27 }, { 106, 27 }, { 120, 27 }, { 134, 27 }, { 149, 27 }, { 163, 27 }, { 177, 27 }, { 194, 27 }, { 216, 27 }, { 230, 27 }, { 244, 27 }, - { 10, 40 }, { 25, 40 }, { 39, 40 }, { 53, 40 }, { 67, 40 }, { 81, 40 }, { 95, 40 }, { 110, 40 }, { 124, 40 }, { 138, 40 }, { 152, 40 }, { 166, 40 }, { 189, 40 }, - { 9, 52 }, { 32, 52 }, { 46, 52 }, { 60, 52 }, { 74, 52 }, { 88, 52 }, { 103, 52 }, { 117, 52 }, { 131, 52 }, { 145, 52 }, { 159, 52 }, { 186, 52 }, { 230, 52 }, - { 4, 64 }, { 21, 64 }, { 39, 64 }, { 99, 64 }, { 159, 64 }, { 177, 64 }, { 194, 64 }, { 216, 64 }, { 230, 64 }, { 244, 64 } - }, { - // LED Index to Flag - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; -#endif diff --git a/keyboards/linworks/fave84h/fave84h.h b/keyboards/linworks/fave84h/fave84h.h deleted file mode 100644 index 1d97f97236..0000000000 --- a/keyboards/linworks/fave84h/fave84h.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2020 -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 . -*/ - -#pragma once - -#include "quantum.h" - -#define ___ KC_NO - -/* - * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │00 │ │02 │03 │04 │05 │ │06 │07 │08 │09 │ │0A │0B │0C │0D │ │0E │0F │0G │ - * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───────┐ - * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │3C │ │1E │1F │1G │ │1D │ 2u Backspace - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ├───┼───┼───┤ └───────┘ - * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │2D │ │2E │2F │2G │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ - * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3D │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ - * │40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │4A │4C │ │4F │ - * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─────┤ ┌───┼───┼───┐ - * │50 │51 │52 │55 │5A │5C │5D │ │5E │5F │5G │ - * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘ - */ - -/* FAve 84H Keymap Definitions */ -#define LAYOUT_tkl_ansi_tsangan_split_bs( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K3C, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4C, K4F, \ - K50, K51, K52, K55, K5A, K5C, K5D, K5E, K5F, K5G \ -) { \ - { K00, ___, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, ___, ___, ___ }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, ___, K4C, ___, ___, K4F, ___ }, \ - { K50, K51, K52, ___, ___, K55, ___, ___, ___, ___, K5A, ___, K5C, K5D, K5E, K5F, K5G } \ -} - -#define LAYOUT_tkl_ansi_tsangan( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4C, K4F, \ - K50, K51, K52, K55, K5A, K5C, K5D, K5E, K5F, K5G \ -) { \ - { K00, ___, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, ___, K3D, ___, ___, ___ }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, ___, K4C, ___, ___, K4F, ___ }, \ - { K50, K51, K52, ___, ___, K55, ___, ___, ___, ___, K5A, ___, K5C, K5D, K5E, K5F, K5G } \ -} diff --git a/keyboards/linworks/fave84h/info.json b/keyboards/linworks/fave84h/info.json index 4447c404f8..1d2ab8bd42 100644 --- a/keyboards/linworks/fave84h/info.json +++ b/keyboards/linworks/fave84h/info.json @@ -1,12 +1,160 @@ { - "keyboard_name": "FAve 84H", "manufacturer": "Lx3", - "url": "", + "keyboard_name": "FAve 84H", "maintainer": "ToastyStoemp", + "bootloader": "atmel-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "rgblight": false + }, + "matrix_pins": { + "cols": ["F0", "F1", "F4", "F5", "F6", "F7", "C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4", "B0", "B7", "E6"], + "rows": ["B1", "B2", "B3", "D3", "D1", "D0"] + }, + "processor": "atmega32u4", + "rgb_matrix": { + "driver": "WS2812", + "layout": [ + { "flags": 1, "matrix": [3, 13], "x": 190, "y": 40 }, + { "flags": 4, "matrix": [3, 11], "x": 167, "y": 40 }, + { "flags": 4, "matrix": [3, 10], "x": 153, "y": 40 }, + { "flags": 4, "matrix": [3, 9], "x": 139, "y": 40 }, + { "flags": 4, "matrix": [3, 8], "x": 125, "y": 40 }, + { "flags": 4, "matrix": [3, 7], "x": 111, "y": 40 }, + { "flags": 4, "matrix": [3, 6], "x": 97, "y": 40 }, + { "flags": 4, "matrix": [3, 5], "x": 83, "y": 40 }, + { "flags": 4, "matrix": [3, 4], "x": 69, "y": 40 }, + { "flags": 4, "matrix": [3, 3], "x": 55, "y": 40 }, + { "flags": 4, "matrix": [3, 2], "x": 41, "y": 40 }, + { "flags": 4, "matrix": [3, 1], "x": 27, "y": 40 }, + { "flags": 1, "matrix": [3, 0], "x": 0, "y": 41 }, + { "flags": 1, "matrix": [2, 0], "x": 6, "y": 27 }, + { "flags": 4, "matrix": [2, 1], "x": 23, "y": 27 }, + { "flags": 4, "matrix": [2, 2], "x": 37, "y": 27 }, + { "flags": 4, "matrix": [2, 3], "x": 51, "y": 27 }, + { "flags": 4, "matrix": [2, 4], "x": 65, "y": 27 }, + { "flags": 4, "matrix": [2, 5], "x": 79, "y": 27 }, + { "flags": 4, "matrix": [2, 6], "x": 93, "y": 27 }, + { "flags": 4, "matrix": [2, 7], "x": 107, "y": 27 }, + { "flags": 4, "matrix": [2, 8], "x": 121, "y": 27 }, + { "flags": 4, "matrix": [2, 9], "x": 135, "y": 27 }, + { "flags": 4, "matrix": [2, 10], "x": 149, "y": 27 }, + { "flags": 4, "matrix": [2, 11], "x": 163, "y": 27 }, + { "flags": 4, "matrix": [2, 12], "x": 177, "y": 27 }, + { "flags": 1, "matrix": [2, 13], "x": 195, "y": 27 }, + { "flags": 1, "matrix": [2, 14], "x": 216, "y": 27 }, + { "flags": 1, "matrix": [2, 15], "x": 230, "y": 27 }, + { "flags": 1, "matrix": [2, 16], "x": 244, "y": 27 }, + { "flags": 1, "matrix": [1, 16], "x": 244, "y": 15 }, + { "flags": 1, "matrix": [1, 15], "x": 230, "y": 15 }, + { "flags": 1, "matrix": [1, 14], "x": 216, "y": 15 }, + { "flags": 1, "matrix": [1, 13], "x": 191, "y": 17 }, + { "flags": 4, "matrix": [1, 12], "x": 170, "y": 15 }, + { "flags": 4, "matrix": [1, 11], "x": 156, "y": 15 }, + { "flags": 4, "matrix": [1, 10], "x": 142, "y": 15 }, + { "flags": 4, "matrix": [1, 9], "x": 128, "y": 15 }, + { "flags": 4, "matrix": [1, 8], "x": 114, "y": 15 }, + { "flags": 4, "matrix": [1, 7], "x": 100, "y": 15 }, + { "flags": 4, "matrix": [1, 6], "x": 86, "y": 15 }, + { "flags": 4, "matrix": [1, 5], "x": 72, "y": 15 }, + { "flags": 4, "matrix": [1, 4], "x": 58, "y": 15 }, + { "flags": 4, "matrix": [1, 3], "x": 44, "y": 15 }, + { "flags": 4, "matrix": [1, 2], "x": 30, "y": 15 }, + { "flags": 4, "matrix": [1, 1], "x": 16, "y": 15 }, + { "flags": 1, "matrix": [1, 0], "x": 2, "y": 15 }, + { "flags": 1, "matrix": [0, 0], "x": 2, "y": 0 }, + { "flags": 1, "matrix": [0, 2], "x": 30, "y": 0 }, + { "flags": 1, "matrix": [0, 3], "x": 44, "y": 0 }, + { "flags": 1, "matrix": [0, 4], "x": 58, "y": 0 }, + { "flags": 1, "matrix": [0, 5], "x": 72, "y": 0 }, + { "flags": 1, "matrix": [0, 6], "x": 93, "y": 0 }, + { "flags": 1, "matrix": [0, 7], "x": 107, "y": 0 }, + { "flags": 1, "matrix": [0, 8], "x": 121, "y": 0 }, + { "flags": 1, "matrix": [0, 9], "x": 135, "y": 0 }, + { "flags": 1, "matrix": [0, 10], "x": 156, "y": 0 }, + { "flags": 1, "matrix": [0, 11], "x": 170, "y": 0 }, + { "flags": 1, "matrix": [0, 12], "x": 184, "y": 0 }, + { "flags": 1, "matrix": [0, 13], "x": 198, "y": 0 }, + { "flags": 1, "matrix": [0, 14], "x": 216, "y": 0 }, + { "flags": 1, "matrix": [0, 15], "x": 230, "y": 0 }, + { "flags": 1, "matrix": [0, 16], "x": 244, "y": 0 }, + { "flags": 1, "matrix": [5, 16], "x": 244, "y": 64 }, + { "flags": 1, "matrix": [5, 15], "x": 230, "y": 64 }, + { "flags": 1, "matrix": [5, 14], "x": 216, "y": 64 }, + { "flags": 1, "matrix": [5, 13], "x": 195, "y": 64 }, + { "flags": 1, "matrix": [5, 12], "x": 177, "y": 64 }, + { "flags": 1, "matrix": [5, 10], "x": 160, "y": 64 }, + { "flags": 1, "matrix": [5, 5], "x": 100, "y": 64 }, + { "flags": 1, "matrix": [5, 2], "x": 41, "y": 64 }, + { "flags": 1, "matrix": [5, 1], "x": 23, "y": 64 }, + { "flags": 1, "matrix": [5, 0], "x": 6, "y": 64 }, + { "flags": 1, "matrix": [4, 0], "x": 11, "y": 52 }, + { "flags": 4, "matrix": [4, 1], "x": 34, "y": 52 }, + { "flags": 4, "matrix": [4, 2], "x": 48, "y": 52 }, + { "flags": 4, "matrix": [4, 3], "x": 62, "y": 52 }, + { "flags": 4, "matrix": [4, 4], "x": 76, "y": 52 }, + { "flags": 4, "matrix": [4, 5], "x": 90, "y": 52 }, + { "flags": 4, "matrix": [4, 6], "x": 104, "y": 52 }, + { "flags": 4, "matrix": [4, 7], "x": 118, "y": 52 }, + { "flags": 4, "matrix": [4, 8], "x": 132, "y": 52 }, + { "flags": 4, "matrix": [4, 9], "x": 146, "y": 52 }, + { "flags": 4, "matrix": [4, 10], "x": 160, "y": 52 }, + { "flags": 1, "matrix": [4, 12], "x": 186, "y": 52 }, + { "flags": 1, "matrix": [4, 15], "x": 230, "y": 52 }, + { "flags": 2, "x": 242, "y": 55 }, + { "flags": 2, "x": 227, "y": 55 }, + { "flags": 2, "x": 212, "y": 55 }, + { "flags": 2, "x": 198, "y": 55 }, + { "flags": 2, "x": 183, "y": 55 }, + { "flags": 2, "x": 168, "y": 55 }, + { "flags": 2, "x": 153, "y": 55 }, + { "flags": 2, "x": 138, "y": 55 }, + { "flags": 2, "x": 123, "y": 55 }, + { "flags": 2, "x": 108, "y": 55 }, + { "flags": 2, "x": 93, "y": 55 }, + { "flags": 2, "x": 78, "y": 55 }, + { "flags": 2, "x": 67, "y": 55 }, + { "flags": 2, "x": 49, "y": 55 }, + { "flags": 2, "x": 34, "y": 55 }, + { "flags": 2, "x": 17, "y": 55 }, + { "flags": 2, "x": 6, "y": 55 }, + { "flags": 2, "x": 6, "y": 43 }, + { "flags": 2, "x": 6, "y": 30 }, + { "flags": 2, "x": 6, "y": 18 }, + { "flags": 2, "x": 6, "y": 3 }, + { "flags": 2, "x": 20, "y": 3 }, + { "flags": 2, "x": 35, "y": 3 }, + { "flags": 2, "x": 50, "y": 3 }, + { "flags": 2, "x": 65, "y": 3 }, + { "flags": 2, "x": 80, "y": 3 }, + { "flags": 2, "x": 94, "y": 3 }, + { "flags": 2, "x": 109, "y": 3 }, + { "flags": 2, "x": 124, "y": 3 }, + { "flags": 2, "x": 139, "y": 3 }, + { "flags": 2, "x": 153, "y": 3 }, + { "flags": 2, "x": 168, "y": 3 }, + { "flags": 2, "x": 183, "y": 3 }, + { "flags": 2, "x": 198, "y": 3 }, + { "flags": 2, "x": 212, "y": 3 }, + { "flags": 2, "x": 227, "y": 3 }, + { "flags": 2, "x": 242, "y": 3 }, + { "flags": 2, "x": 242, "y": 18 }, + { "flags": 2, "x": 242, "y": 31 }, + { "flags": 2, "x": 242, "y": 43 } + ] + }, + "url": "", "usb": { - "vid": "0x4C58", + "device_version": "1.0.0", "pid": "0x0004", - "device_version": "0.0.1" + "vid": "0x4C58" }, "community_layouts": [ "tkl_ansi_tsangan" @@ -14,194 +162,194 @@ "layouts": { "LAYOUT_tkl_ansi_tsangan_split_bs": { "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":2, "y":0}, - {"label":"F2", "x":3, "y":0}, - {"label":"F3", "x":4, "y":0}, - {"label":"F4", "x":5, "y":0}, - {"label":"F5", "x":6.5, "y":0}, - {"label":"F6", "x":7.5, "y":0}, - {"label":"F7", "x":8.5, "y":0}, - {"label":"F8", "x":9.5, "y":0}, - {"label":"F9", "x":11, "y":0}, - {"label":"F10", "x":12, "y":0}, - {"label":"F11", "x":13, "y":0}, - {"label":"F12", "x":14, "y":0}, - {"label":"PrtSc", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, + { "matrix": [0, 0], "x": 0, "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": [0, 6], "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "matrix": [0, 9], "x": 9.5, "y": 0 }, + { "matrix": [0, 10], "x": 11, "y": 0 }, + { "matrix": [0, 11], "x": 12, "y": 0 }, + { "matrix": [0, 12], "x": 13, "y": 0 }, + { "matrix": [0, 13], "x": 14, "y": 0 }, + { "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "x": 17.25, "y": 0 }, + + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "x": 13, "y": 1.25 }, + { "matrix": [3, 12], "x": 14, "y": 1.25 }, + { "matrix": [1, 14], "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "x": 17.25, "y": 1.25 }, - {"label":"`~", "x":0, "y":1.25}, - {"label":"1!", "x":1, "y":1.25}, - {"label":"2@", "x":2, "y":1.25}, - {"label":"3#", "x":3, "y":1.25}, - {"label":"4$", "x":4, "y":1.25}, - {"label":"5%", "x":5, "y":1.25}, - {"label":"6^", "x":6, "y":1.25}, - {"label":"7&", "x":7, "y":1.25}, - {"label":"8*", "x":8, "y":1.25}, - {"label":"9(", "x":9, "y":1.25}, - {"label":"0)", "x":10, "y":1.25}, - {"label":"-_", "x":11, "y":1.25}, - {"label":"=+", "x":12, "y":1.25}, - {"label":"Backspace", "x":13, "y":1.25}, - {"label":"Delete", "x":14, "y":1.25}, - {"label":"Insert", "x":15.25, "y":1.25}, - {"label":"Home", "x":16.25, "y":1.25}, - {"label":"PgUp", "x":17.25, "y":1.25}, + { "matrix": [2, 0], "w": 1.5, "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "matrix": [2, 13], "w": 1.5, "x": 13.5, "y": 2.25 }, + { "matrix": [2, 14], "x": 15.25, "y": 2.25 }, + { "matrix": [2, 15], "x": 16.25, "y": 2.25 }, + { "matrix": [2, 16], "x": 17.25, "y": 2.25 }, - {"label":"Tab", "x":0, "y":2.25, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.25}, - {"label":"W", "x":2.5, "y":2.25}, - {"label":"E", "x":3.5, "y":2.25}, - {"label":"R", "x":4.5, "y":2.25}, - {"label":"T", "x":5.5, "y":2.25}, - {"label":"Y", "x":6.5, "y":2.25}, - {"label":"U", "x":7.5, "y":2.25}, - {"label":"I", "x":8.5, "y":2.25}, - {"label":"O", "x":9.5, "y":2.25}, - {"label":"P", "x":10.5, "y":2.25}, - {"label":"[{", "x":11.5, "y":2.25}, - {"label":"]}", "x":12.5, "y":2.25}, - {"label":"\\|", "x":13.5, "y":2.25, "w":1.5}, - {"label":"Delete", "x":15.25, "y":2.25}, - {"label":"End", "x":16.25, "y":2.25}, - {"label":"PgDn", "x":17.25, "y":2.25}, + { "matrix": [3, 0], "w": 1.75, "x": 0, "y": 3.25 }, + { "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "matrix": [3, 13], "w": 2.25, "x": 12.75, "y": 3.25 }, - {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, - {"label":"A", "x":1.75, "y":3.25}, - {"label":"S", "x":2.75, "y":3.25}, - {"label":"D", "x":3.75, "y":3.25}, - {"label":"F", "x":4.75, "y":3.25}, - {"label":"G", "x":5.75, "y":3.25}, - {"label":"H", "x":6.75, "y":3.25}, - {"label":"J", "x":7.75, "y":3.25}, - {"label":"K", "x":8.75, "y":3.25}, - {"label":"L", "x":9.75, "y":3.25}, - {"label":";:", "x":10.75, "y":3.25}, - {"label":"'\"", "x":11.75, "y":3.25}, - {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, + { "matrix": [4, 0], "w": 2.25, "x": 0, "y": 4.25 }, + { "matrix": [4, 1], "x": 2.25, "y": 4.25 }, + { "matrix": [4, 2], "x": 3.25, "y": 4.25 }, + { "matrix": [4, 3], "x": 4.25, "y": 4.25 }, + { "matrix": [4, 4], "x": 5.25, "y": 4.25 }, + { "matrix": [4, 5], "x": 6.25, "y": 4.25 }, + { "matrix": [4, 6], "x": 7.25, "y": 4.25 }, + { "matrix": [4, 7], "x": 8.25, "y": 4.25 }, + { "matrix": [4, 8], "x": 9.25, "y": 4.25 }, + { "matrix": [4, 9], "x": 10.25, "y": 4.25 }, + { "matrix": [4, 10], "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "w": 2.75, "x": 12.25, "y": 4.25 }, + { "matrix": [4, 15], "x": 16.25, "y": 4.25 }, - {"label":"Shift", "x":0, "y":4.25, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.25}, - {"label":"X", "x":3.25, "y":4.25}, - {"label":"C", "x":4.25, "y":4.25}, - {"label":"V", "x":5.25, "y":4.25}, - {"label":"B", "x":6.25, "y":4.25}, - {"label":"N", "x":7.25, "y":4.25}, - {"label":"M", "x":8.25, "y":4.25}, - {"label":",<", "x":9.25, "y":4.25}, - {"label":".>", "x":10.25, "y":4.25}, - {"label":"/?", "x":11.25, "y":4.25}, - {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, - {"label":"\u2191", "x":16.25, "y":4.25}, - - {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, - {"label":"Win", "x":1.5, "y":5.25}, - {"label":"Alt", "x":2.5, "y":5.25, "w":1.5}, - {"label":"Space", "x":4, "y":5.25, "w":7}, - {"label":"Alt", "x":11, "y":5.25, "w":1.5}, - {"label":"Fn", "x":12.5, "y":5.25}, - {"label":"Ctrl", "x":13.5, "y":5.25, "w":1.5}, - {"label":"\u2190", "x":15.25, "y":5.25}, - {"label":"\u2193", "x":16.25, "y":5.25}, - {"label":"\u2192", "x":17.25, "y":5.25} + { "matrix": [5, 0], "w": 1.5, "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.25 }, + { "matrix": [5, 5], "w": 7, "x": 4, "y": 5.25 }, + { "matrix": [5, 10], "w": 1.5, "x": 11, "y": 5.25 }, + { "matrix": [5, 12], "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "w": 1.5, "x": 13.5, "y": 5.25 }, + { "matrix": [5, 14], "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "x": 17.25, "y": 5.25 } ] }, "LAYOUT_tkl_ansi_tsangan": { "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":2, "y":0}, - {"label":"F2", "x":3, "y":0}, - {"label":"F3", "x":4, "y":0}, - {"label":"F4", "x":5, "y":0}, - {"label":"F5", "x":6.5, "y":0}, - {"label":"F6", "x":7.5, "y":0}, - {"label":"F7", "x":8.5, "y":0}, - {"label":"F8", "x":9.5, "y":0}, - {"label":"F9", "x":11, "y":0}, - {"label":"F10", "x":12, "y":0}, - {"label":"F11", "x":13, "y":0}, - {"label":"F12", "x":14, "y":0}, - {"label":"PrtSc", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, + { "matrix": [0, 0], "x": 0, "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": [0, 6], "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "matrix": [0, 9], "x": 9.5, "y": 0 }, + { "matrix": [0, 10], "x": 11, "y": 0 }, + { "matrix": [0, 11], "x": 12, "y": 0 }, + { "matrix": [0, 12], "x": 13, "y": 0 }, + { "matrix": [0, 13], "x": 14, "y": 0 }, + { "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "x": 17.25, "y": 0 }, + + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "w":2, "x": 13, "y": 1.25 }, + { "matrix": [1, 14], "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "x": 17.25, "y": 1.25 }, - {"label":"`~", "x":0, "y":1.25}, - {"label":"1!", "x":1, "y":1.25}, - {"label":"2@", "x":2, "y":1.25}, - {"label":"3#", "x":3, "y":1.25}, - {"label":"4$", "x":4, "y":1.25}, - {"label":"5%", "x":5, "y":1.25}, - {"label":"6^", "x":6, "y":1.25}, - {"label":"7&", "x":7, "y":1.25}, - {"label":"8*", "x":8, "y":1.25}, - {"label":"9(", "x":9, "y":1.25}, - {"label":"0)", "x":10, "y":1.25}, - {"label":"-_", "x":11, "y":1.25}, - {"label":"=+", "x":12, "y":1.25}, - {"label":"Backspace", "x":13, "y":1.25, "w":2}, - {"label":"Insert", "x":15.25, "y":1.25}, - {"label":"Home", "x":16.25, "y":1.25}, - {"label":"PgUp", "x":17.25, "y":1.25}, + { "matrix": [2, 0], "w": 1.5, "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "matrix": [2, 13], "w": 1.5, "x": 13.5, "y": 2.25 }, + { "matrix": [2, 14], "x": 15.25, "y": 2.25 }, + { "matrix": [2, 15], "x": 16.25, "y": 2.25 }, + { "matrix": [2, 16], "x": 17.25, "y": 2.25 }, - {"label":"Tab", "x":0, "y":2.25, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.25}, - {"label":"W", "x":2.5, "y":2.25}, - {"label":"E", "x":3.5, "y":2.25}, - {"label":"R", "x":4.5, "y":2.25}, - {"label":"T", "x":5.5, "y":2.25}, - {"label":"Y", "x":6.5, "y":2.25}, - {"label":"U", "x":7.5, "y":2.25}, - {"label":"I", "x":8.5, "y":2.25}, - {"label":"O", "x":9.5, "y":2.25}, - {"label":"P", "x":10.5, "y":2.25}, - {"label":"[{", "x":11.5, "y":2.25}, - {"label":"]}", "x":12.5, "y":2.25}, - {"label":"\\|", "x":13.5, "y":2.25, "w":1.5}, - {"label":"Delete", "x":15.25, "y":2.25}, - {"label":"End", "x":16.25, "y":2.25}, - {"label":"PgDn", "x":17.25, "y":2.25}, + { "matrix": [3, 0], "w": 1.75, "x": 0, "y": 3.25 }, + { "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "matrix": [3, 13], "w": 2.25, "x": 12.75, "y": 3.25 }, - {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, - {"label":"A", "x":1.75, "y":3.25}, - {"label":"S", "x":2.75, "y":3.25}, - {"label":"D", "x":3.75, "y":3.25}, - {"label":"F", "x":4.75, "y":3.25}, - {"label":"G", "x":5.75, "y":3.25}, - {"label":"H", "x":6.75, "y":3.25}, - {"label":"J", "x":7.75, "y":3.25}, - {"label":"K", "x":8.75, "y":3.25}, - {"label":"L", "x":9.75, "y":3.25}, - {"label":";:", "x":10.75, "y":3.25}, - {"label":"'\"", "x":11.75, "y":3.25}, - {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, - - {"label":"Shift", "x":0, "y":4.25, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.25}, - {"label":"X", "x":3.25, "y":4.25}, - {"label":"C", "x":4.25, "y":4.25}, - {"label":"V", "x":5.25, "y":4.25}, - {"label":"B", "x":6.25, "y":4.25}, - {"label":"N", "x":7.25, "y":4.25}, - {"label":"M", "x":8.25, "y":4.25}, - {"label":",<", "x":9.25, "y":4.25}, - {"label":".>", "x":10.25, "y":4.25}, - {"label":"/?", "x":11.25, "y":4.25}, - {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, - {"label":"\u2191", "x":16.25, "y":4.25}, - - {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, - {"label":"Win", "x":1.5, "y":5.25}, - {"label":"Alt", "x":2.5, "y":5.25, "w":1.5}, - {"label":"Space", "x":4, "y":5.25, "w":7}, - {"label":"Alt", "x":11, "y":5.25, "w":1.5}, - {"label":"Fn", "x":12.5, "y":5.25}, - {"label":"Ctrl", "x":13.5, "y":5.25, "w":1.5}, - {"label":"\u2190", "x":15.25, "y":5.25}, - {"label":"\u2193", "x":16.25, "y":5.25}, - {"label":"\u2192", "x":17.25, "y":5.25} + { "matrix": [4, 0], "w": 2.25, "x": 0, "y": 4.25 }, + { "matrix": [4, 1], "x": 2.25, "y": 4.25 }, + { "matrix": [4, 2], "x": 3.25, "y": 4.25 }, + { "matrix": [4, 3], "x": 4.25, "y": 4.25 }, + { "matrix": [4, 4], "x": 5.25, "y": 4.25 }, + { "matrix": [4, 5], "x": 6.25, "y": 4.25 }, + { "matrix": [4, 6], "x": 7.25, "y": 4.25 }, + { "matrix": [4, 7], "x": 8.25, "y": 4.25 }, + { "matrix": [4, 8], "x": 9.25, "y": 4.25 }, + { "matrix": [4, 9], "x": 10.25, "y": 4.25 }, + { "matrix": [4, 10], "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "w": 2.75, "x": 12.25, "y": 4.25 }, + { "matrix": [4, 15], "x": 16.25, "y": 4.25 }, + + { "matrix": [5, 0], "w": 1.5, "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "matrix": [5, 2], "w": 1.5, "x": 2.5, "y": 5.25 }, + { "matrix": [5, 5], "w": 7, "x": 4, "y": 5.25 }, + { "matrix": [5, 10], "w": 1.5, "x": 11, "y": 5.25 }, + { "matrix": [5, 12], "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "w": 1.5, "x": 13.5, "y": 5.25 }, + { "matrix": [5, 14], "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "x": 17.25, "y": 5.25 } ] } } -} +} \ No newline at end of file diff --git a/keyboards/linworks/fave84h/keymaps/default/keymap.c b/keyboards/linworks/fave84h/keymaps/default/keymap.c index 596261c96b..64e5dc07d3 100644 --- a/keyboards/linworks/fave84h/keymaps/default/keymap.c +++ b/keyboards/linworks/fave84h/keymaps/default/keymap.c @@ -37,8 +37,7 @@ 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, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT - ), - + ) }; bool rgb_matrix_indicators_user(void) { diff --git a/keyboards/linworks/fave84h/keymaps/via/keymap.c b/keyboards/linworks/fave84h/keymaps/via/keymap.c index 0cc5a93d13..bfc3c69b8a 100644 --- a/keyboards/linworks/fave84h/keymaps/via/keymap.c +++ b/keyboards/linworks/fave84h/keymaps/via/keymap.c @@ -57,14 +57,135 @@ 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, 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_user(void) { - led_t host_leds = host_keyboard_led_state(); - if (host_leds.caps_lock) { - rgb_matrix_set_color(12, 254, 189, 41); // set caps lock led color first number is index, R G B - } - return false; +// Single Indicator memory layout +typedef struct _indicator_config_t { + uint8_t h; + uint8_t s; + uint8_t v; + bool enabled; +} indicator_config; + +// Board memory layout +typedef struct _fave_config_t { + indicator_config caps; +} fave_config; + +fave_config fave; + +void eeconfig_init_user(void) { + // Default values + fave.caps.h = 0; + fave.caps.s = 0; + fave.caps.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; + fave.caps.enabled = true; + + // Write default value to EEPROM now + eeconfig_update_kb_datablock(&fave); +} + +enum via_fave { + id_caps_indicator_enabled = 1, + id_caps_indicator_brightness = 2, + id_caps_indicator_color = 3 +}; + +//On Keyboard startup +void keyboard_post_init_user(void) { + //Read our custom menu variables from memory + eeconfig_read_kb_datablock(&fave); +} + +bool rgb_matrix_indicators_user(void) { + if (fave.caps.enabled) { + // The rgb_matrix_set_color function needs an RGB code to work, so first the indicator color is cast to an HSV value and then translated to RGB + HSV hsv_caps_indicator_color = {fave.caps.h, fave.caps.s, fave.caps.v}; + RGB rgb_caps_indicator_color = hsv_to_rgb(hsv_caps_indicator_color); + if (host_keyboard_led_state().caps_lock) + rgb_matrix_set_color(CAPS_INDICATOR_INDEX, rgb_caps_indicator_color.r, rgb_caps_indicator_color.g, rgb_caps_indicator_color.b); + } + + return true; +} + +void fave_config_set_value(uint8_t *data) { + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch (*value_id) { + case id_caps_indicator_enabled: { + fave.caps.enabled = value_data[0]; + break; + } + case id_caps_indicator_brightness: { + fave.caps.v = value_data[0]; + break; + } + case id_caps_indicator_color: { + fave.caps.h = value_data[0]; + fave.caps.s = value_data[1]; + break; + } + } +} + +void fave_config_get_value(uint8_t *data) { + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch (*value_id) { + case id_caps_indicator_enabled: { + value_data[0] = fave.caps.enabled; + break; + } + case id_caps_indicator_brightness: { + value_data[0] = fave.caps.v; + break; + } + case id_caps_indicator_color: { + value_data[0] = fave.caps.h; + value_data[1] = fave.caps.s; + break; + } + } +} + +void fave_config_save(void) { + eeconfig_update_kb_datablock(&fave); +} + +void via_custom_value_command_kb(uint8_t *data, uint8_t length) { + // data = [ command_id, channel_id, value_id, value_data ] + uint8_t *command_id = &(data[0]); + uint8_t *channel_id = &(data[1]); + uint8_t *value_id_and_data = &(data[2]); + + if (*channel_id == id_custom_channel) { + switch (*command_id) { + case id_custom_set_value: { + fave_config_set_value(value_id_and_data); + break; + } + case id_custom_get_value: { + fave_config_get_value(value_id_and_data); + break; + } + case id_custom_save: { + fave_config_save(); + break; + } + default: { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + return; + } + + *command_id = id_unhandled; } diff --git a/keyboards/linworks/fave84h/rules.mk b/keyboards/linworks/fave84h/rules.mk index c3ddbe4252..713f7f8a41 100644 --- a/keyboards/linworks/fave84h/rules.mk +++ b/keyboards/linworks/fave84h/rules.mk @@ -1,23 +1,3 @@ -# MCU name -MCU = atmega32u4 # Processor frequency F_CPU = 8000000 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812