diff --git a/keyboards/lazydesigners/tk40x/config.h b/keyboards/lazydesigners/tk40x/config.h new file mode 100644 index 0000000000..a4d47aba18 --- /dev/null +++ b/keyboards/lazydesigners/tk40x/config.h @@ -0,0 +1,70 @@ +#pragma once + +#define WS2812_DI_PIN B11 +#define RGB_MATRIX_LED_COUNT 8 +#define DRIVER_LED_TOTAL RGB_MATRIX_LED_COUNT + +// Comment these out if you don't want front indicators leds +// #define RGB_MODS_INDICATOR_ENABLE +// #define RGB_LAYER_INDICATOR_ENABLE + +#define RGB_INDICATOR_BRIGHTNESS 5 +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES +#define RGB_TRIGGER_ON_KEYDOWN +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160 +#define RGB_MATRIX_HUE_STEP 4 +#define RGB_MATRIX_SAT_STEP 4 +#define RGB_MATRIX_VAL_STEP 4 +#define RGB_MATRIX_SPD_STEP 16 +#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL +#define RGB_MATRIX_DEFAULT_HUE 0 +#define RGB_MATRIX_DEFAULT_SAT 255 +#define RGB_MATRIX_DEFAULT_VAL 32 +#define RGB_MATRIX_DEFAULT_SPD 32 + + +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + diff --git a/keyboards/lazydesigners/tk40x/info.json b/keyboards/lazydesigners/tk40x/info.json new file mode 100644 index 0000000000..488cccbb37 --- /dev/null +++ b/keyboards/lazydesigners/tk40x/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "tk40x", + "manufacturer": "lazydesigners", + "url": "http://lazydesigners.cn", + "maintainer": "lazydesigners", + "usb": { + "vid": "0x4C44", + "pid": "0x0032", + "device_version": "0.0.1" + }, + "processor": "STM32F072", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": [ "B10", "B8", "C15", "B7", "B6", "B5", "B4", "B3", "A15", "A14", "B12" ], + "rows": ["B13", "B14", "A6", "A5"] + }, + "encoder": { + "rotary": [ + {"pin_a": "A8", "pin_b": "B15", "resolution": 1}, + {"pin_a": "A10", "pin_b": "A9", "resolution": 1} + ] + }, + "features": { + "console": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "bootmagic": { + "enabled": true, + "matrix": [0, 0] + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 10], "x":0, "y":0}, + {"matrix": [1, 10], "x":1, "y":0}, + {"matrix": [0, 0], "x":0, "y":1.25}, + {"matrix": [0, 1], "x":1, "y":1.25}, + {"matrix": [0, 2], "x":2, "y":1.25}, + {"matrix": [0, 3], "x":3, "y":1.25}, + {"matrix": [0, 4], "x":4, "y":1.25}, + {"matrix": [0, 5], "x":5, "y":1.25}, + {"matrix": [0, 6], "x":6, "y":1.25}, + {"matrix": [0, 7], "x":7, "y":1.25}, + {"matrix": [0, 8], "x":8, "y":1.25}, + {"matrix": [0, 9], "x":9, "y":1.25, "w":1.25}, + {"matrix": [1, 0], "x":0, "y":2.25}, + {"matrix": [1, 1], "x":1, "y":2.25}, + {"matrix": [1, 2], "x":2, "y":2.25}, + {"matrix": [1, 3], "x":3, "y":2.25}, + {"matrix": [1, 4], "x":4, "y":2.25}, + {"matrix": [1, 5], "x":5, "y":2.25}, + {"matrix": [1, 6], "x":6, "y":2.25}, + {"matrix": [1, 7], "x":7, "y":2.25}, + {"matrix": [1, 8], "x":8, "y":2.25}, + {"matrix": [1, 9], "x":9, "y":2.25, "w":1.25}, + {"matrix": [2, 0], "x":0, "y":3.25}, + {"matrix": [2, 1], "x":1, "y":3.25}, + {"matrix": [2, 2], "x":2, "y":3.25}, + {"matrix": [2, 3], "x":3, "y":3.25}, + {"matrix": [2, 4], "x":4, "y":3.25}, + {"matrix": [2, 5], "x":5, "y":3.25}, + {"matrix": [2, 6], "x":6, "y":3.25}, + {"matrix": [2, 7], "x":7, "y":3.25}, + {"matrix": [2, 8], "x":8, "y":3.25}, + {"matrix": [2, 9], "x":9, "y":3.25, "w":1.25}, + {"matrix": [3, 0], "x":0, "y":4.25}, + {"matrix": [3, 1], "x":1, "y":4.25}, + {"matrix": [3, 2], "x":2, "y":4.25}, + {"matrix": [3, 4], "x":3, "y":4.25, "w":2.25}, + {"matrix": [3, 5], "x":5.25, "y":4.25, "w":2}, + {"matrix": [3, 7], "x":7.25, "y":4.25}, + {"matrix": [3, 8], "x":8.25, "y":4.25}, + {"matrix": [3, 9], "x":9.25, "y":4.25} + ] + } + } +} diff --git a/keyboards/lazydesigners/tk40x/keymaps/default/keymap.c b/keyboards/lazydesigners/tk40x/keymaps/default/keymap.c new file mode 100644 index 0000000000..9e66a95a05 --- /dev/null +++ b/keyboards/lazydesigners/tk40x/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2023 LAZDESIGNERS +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "../../rgb.c" + +#define LT1_SPC LT(1, KC_SPC) + +// For testing only +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + RGB_TOG, KC_MUTE, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, LT1_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + KC_NO, KC_NO, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, + KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_COMM, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT( + KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) } +}; +#endif + diff --git a/keyboards/lazydesigners/tk40x/keymaps/vial/config.h b/keyboards/lazydesigners/tk40x/keymaps/vial/config.h new file mode 100644 index 0000000000..24f460c990 --- /dev/null +++ b/keyboards/lazydesigners/tk40x/keymaps/vial/config.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x23, 0xDA, 0xE3, 0xA0, 0x11, 0xE7, 0xC4, 0x0D} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 9 } + +#define VIAL_COMBO_ENTRIES 32 +#define VIAL_TAP_DANCE_ENTRIES 32 +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 diff --git a/keyboards/lazydesigners/tk40x/keymaps/vial/keymap.c b/keyboards/lazydesigners/tk40x/keymaps/vial/keymap.c new file mode 100644 index 0000000000..1a2a72974d --- /dev/null +++ b/keyboards/lazydesigners/tk40x/keymaps/vial/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2023 LAZDESIGNERS +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "../../rgb.c" + +#define LT1_SPC LT(1, KC_SPC) + +// For testing only +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, RGB_TOG, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, LT1_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + KC_NO, KC_NO, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, + KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_COMM, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT( + KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) } +}; +#endif + diff --git a/keyboards/lazydesigners/tk40x/keymaps/vial/rules.mk b/keyboards/lazydesigners/tk40x/keymaps/vial/rules.mk new file mode 100644 index 0000000000..6dc6b266cb --- /dev/null +++ b/keyboards/lazydesigners/tk40x/keymaps/vial/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +VIALRGB_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/lazydesigners/tk40x/keymaps/vial/vial.json b/keyboards/lazydesigners/tk40x/keymaps/vial/vial.json new file mode 100644 index 0000000000..845e548e31 --- /dev/null +++ b/keyboards/lazydesigners/tk40x/keymaps/vial/vial.json @@ -0,0 +1,31 @@ +{ + "lighting": "vialrgb", + "matrix": {"rows": 4, "cols": 11}, + "layouts": { + "labels": [ + ["Bottom Row", "Split", "Longbar"], + ["Layout", "Staggered", "Ortho"] + ], + "keymap": [ + [ + {"x":0},"0,0\n\n\n\n\n\n\n\n\ne","0,10","0,1\n\n\n\n\n\n\n\n\ne",{"x":2},"1,0\n\n\n\n\n\n\n\n\ne","1,10","1,1\n\n\n\n\n\n\n\n\ne" + ], + [ + "0,0\n\n\n1,0","0,1\n\n\n1,0","0,2\n\n\n1,0","0,3\n\n\n1,0","0,4\n\n\n1,0","0,5\n\n\n1,0","0,6\n\n\n1,0","0,7\n\n\n1,0","0,8\n\n\n1,0",{"w":1.25},"0,9\n\n\n1,0", + "0,0\n\n\n1,1","0,1\n\n\n1,1","0,2\n\n\n1,1","0,3\n\n\n1,1","0,4\n\n\n1,1","0,5\n\n\n1,1","0,6\n\n\n1,1","0,7\n\n\n1,1","0,8\n\n\n1,1",{"w":1.25},"0,9\n\n\n1,1" + ], + + [ + {"w":1.25},"1,0\n\n\n1,0","1,1\n\n\n1,0","1,2\n\n\n1,0","1,3\n\n\n1,0","1,4\n\n\n1,0","1,5\n\n\n1,0","1,6\n\n\n1,0","1,7\n\n\n1,0","1,8\n\n\n1,0","1,9\n\n\n1,0", + {"w":1},"1,0\n\n\n1,1","1,1\n\n\n1,1","1,2\n\n\n1,1","1,3\n\n\n1,1","1,4\n\n\n1,1","1,5\n\n\n1,1","1,6\n\n\n1,1","1,7\n\n\n1,1","1,8\n\n\n1,1",{"w":1.25},"1,9\n\n\n1,1" + ], + [ + {"w":1.75},"2,0\n\n\n1,0","2,1\n\n\n1,0","2,2\n\n\n1,0","2,3\n\n\n1,0","2,4\n\n\n1,0","2,5\n\n\n1,0","2,6\n\n\n1,0","2,7\n\n\n1,0",{"w":1.5},"2,9\n\n\n1,0", + {"w":1},"2,0\n\n\n1,1","2,1\n\n\n1,1","2,2\n\n\n1,1","2,3\n\n\n1,1","2,4\n\n\n1,1","2,5\n\n\n1,1","2,6\n\n\n1,1","2,7\n\n\n1,1","2,8\n\n\n1,1",{"w":1.25},"2,9\n\n\n1,1" + ], + ["3,0\n\n\n0,0","3,1\n\n\n0,0","3,2\n\n\n0,0",{"w":2.25},"3,4\n\n\n0,0",{"w":2},"3,5\n\n\n0,0","3,7\n\n\n0,0","3,8\n\n\n0,0","3,9\n\n\n0,0", + "3,0\n\n\n0,1","3,1\n\n\n0,1",{"w":6.25},"3,4\n\n\n0,1","3,8\n\n\n0,1","3,9\n\n\n0,1" + ] + ] + } + } \ No newline at end of file diff --git a/keyboards/lazydesigners/tk40x/readme.md b/keyboards/lazydesigners/tk40x/readme.md new file mode 100644 index 0000000000..c6eb57e7a1 --- /dev/null +++ b/keyboards/lazydesigners/tk40x/readme.md @@ -0,0 +1,18 @@ +# tk40x + +A qaz keyboard designed and produced in 2024 by [LAZYDESIGNERS](http://lazydesigners.cn). + +* Keyboard Maintainer: [LAZYDESIGNERS](https://github.com/jackytrabbit) +* Hardware Supported: tk40x +* Hardware Availability: Check [LAZYDESIGNERS's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your vial build environment): + + make lazydesigners/tk40x:vial + +Flashing example for this keyboard: + + make lazydesigners/tk40x:vial:flash + +**Reset Key:** To enter the bootloader, either push the RESET button on the PCB or the RESET button on the FN layer. + diff --git a/keyboards/lazydesigners/tk40x/rgb.c b/keyboards/lazydesigners/tk40x/rgb.c new file mode 100644 index 0000000000..cd8448b367 --- /dev/null +++ b/keyboards/lazydesigners/tk40x/rgb.c @@ -0,0 +1,32 @@ +#ifdef RGB_MATRIX_ENABLE +// LED index +// 7, 6, 5, 4, 3, 2, 1, 0 + +led_config_t g_led_config = { + // Key Matrix to LED Index + { + { 0 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 7 , 7 }, + { 0 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 7 , 7 }, + { 0 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 7 }, + { 0 , 0 , 1 , 3 , 4 , 6 , 7 , 7 } + }, + // LED Index to Physical Positon + { + { 0 , 8 }, + { 32, 16 }, + { 64, 24 }, + { 96, 32 }, + { 128 , 40 }, + { 160 , 48 }, + { 192 , 56 }, + { 224 , 64 } + }, + // LED Index to Flag + { 1, 1, 1, 1, 1, 1, 1, 1 } +}; + +#define RGB_MATRIX_TYPING_HEATMAP_SPREAD 80 +#define RGB_MATRIX_TYPING_HEATMAP_AREA_LIMIT 32 + + +#endif \ No newline at end of file diff --git a/keyboards/lazydesigners/tk40x/rules.mk b/keyboards/lazydesigners/tk40x/rules.mk new file mode 100644 index 0000000000..e35030ed5c --- /dev/null +++ b/keyboards/lazydesigners/tk40x/rules.mk @@ -0,0 +1,2 @@ +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = ws2812