From 55fcbd9bcb6af91c4dcf7f98fb0155342f8589db Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Tue, 30 Jan 2024 16:34:37 +0800 Subject: [PATCH 01/29] Create GK61 pro double space keyboard. --- keyboards/skyloong/gk61/pro_ds/config.h | 19 + keyboards/skyloong/gk61/pro_ds/halconf.h | 9 + keyboards/skyloong/gk61/pro_ds/info.json | 330 ++++++++++++++++++ .../gk61/pro_ds/keymaps/default/keymap.c | 37 ++ .../gk61/pro_ds/keymaps/default/rules.mk | 1 + .../skyloong/gk61/pro_ds/keymaps/via/keymap.c | 237 +++++++++++++ .../skyloong/gk61/pro_ds/keymaps/via/rules.mk | 2 + keyboards/skyloong/gk61/pro_ds/mcuconf.h | 12 + keyboards/skyloong/gk61/pro_ds/pro_ds.c | 120 +++++++ keyboards/skyloong/gk61/pro_ds/readme.md | 33 ++ keyboards/skyloong/gk61/pro_ds/rules.mk | 1 + 11 files changed, 801 insertions(+) create mode 100644 keyboards/skyloong/gk61/pro_ds/config.h create mode 100644 keyboards/skyloong/gk61/pro_ds/halconf.h create mode 100644 keyboards/skyloong/gk61/pro_ds/info.json create mode 100644 keyboards/skyloong/gk61/pro_ds/keymaps/default/keymap.c create mode 100644 keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk create mode 100644 keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c create mode 100644 keyboards/skyloong/gk61/pro_ds/keymaps/via/rules.mk create mode 100644 keyboards/skyloong/gk61/pro_ds/mcuconf.h create mode 100644 keyboards/skyloong/gk61/pro_ds/pro_ds.c create mode 100644 keyboards/skyloong/gk61/pro_ds/readme.md create mode 100644 keyboards/skyloong/gk61/pro_ds/rules.mk diff --git a/keyboards/skyloong/gk61/pro_ds/config.h b/keyboards/skyloong/gk61/pro_ds/config.h new file mode 100644 index 00000000000..44f64958eab --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/config.h @@ -0,0 +1,19 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_LED_COUNT 64 +# define CAPS_LOCK_INDEX 28 +# define WIN_MOD_INDEX 16 +# define MAC_MOD_INDEX 17 +# define SDB A4 + +# define RGB_DISABLE_WHEN_USB_SUSPENDED +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS + +# define AW20216S_CS_PIN_1 B12 +# define AW20216S_EN_PIN_1 SDB +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/skyloong/gk61/pro_ds/halconf.h b/keyboards/skyloong/gk61/pro_ds/halconf.h new file mode 100644 index 00000000000..3ffdbb714a5 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/halconf.h @@ -0,0 +1,9 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next diff --git a/keyboards/skyloong/gk61/pro_ds/info.json b/keyboards/skyloong/gk61/pro_ds/info.json new file mode 100644 index 00000000000..3c1e2becb31 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/info.json @@ -0,0 +1,330 @@ +{ + "manufacturer": "skyloong", + "keyboard_name": "GK61 Pro DS_1.0.0", + "maintainer": "NaturalZh", + "bootloader": "stm32duino", + + "diode_direction": "ROW2COL", + + "features": { + "bootmagic": true, + "command": true, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "build": { + "debounce_type": "asym_eager_defer_pk" + }, + "matrix_pins": { + "cols": ["A5", "A0", "A1", "B7", "B11", "A8", "A9", "A10", "A15", "B3", "B4", "B5", "B8", "B9"], + "rows": ["B10", "B1", "B0", "A7", "A6"] + }, + "processor": "STM32F103", + "rgb_matrix": { + "animations": { + "breathing": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "rainbow_moving_chevron": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "raindrops": true, + "jellybean_raindrops": true, + "pixel_rain": true, + "typing_heatmap":true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive_multiwide": true, + "solid_reactive_multinexus": true, + "splash": true, + "solid_splash": true + }, + "driver": "aw20216", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 49, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 65, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 178, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 194, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 218, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 13, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 57, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 73, "y": 13, "flags": 4}, + {"matrix": [1, 5], "x": 89, "y": 13, "flags": 4}, + {"matrix": [1, 6], "x": 105, "y": 13, "flags": 4}, + {"matrix": [1, 7], "x": 121, "y": 13, "flags": 4}, + {"matrix": [1, 8], "x": 137, "y": 13, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 170, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 186, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 202, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 222, "y": 13, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 77, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 93, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 109, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 125, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 141, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 157, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 174, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 190, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 216, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 10, "y": 51, "flags": 4}, + {"matrix": [3, 1], "x": 36, "y": 51, "flags": 4}, + {"matrix": [3, 2], "x": 53, "y": 51, "flags": 4}, + {"matrix": [3, 3], "x": 69, "y": 51, "flags": 4}, + {"matrix": [3, 4], "x": 85, "y": 51, "flags": 4}, + {"matrix": [3, 5], "x": 101, "y": 51, "flags": 4}, + {"matrix": [3, 6], "x": 117, "y": 51, "flags": 4}, + {"matrix": [3, 7], "x": 133, "y": 51, "flags": 4}, + {"matrix": [3, 8], "x": 149, "y": 51, "flags": 4}, + {"matrix": [3, 9], "x": 166, "y": 51, "flags": 4}, + {"matrix": [3, 10], "x": 182, "y": 51, "flags": 4}, + {"matrix": [3, 12], "x": 212, "y": 51, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 75, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 103, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 131, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 163, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 184, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 204, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4} + ], + "max_brightness": 200, + "hue_steps": 20, + "sat_steps": 20, + "speed_steps": 20, + "val_steps": 20 + }, + "url": "https://github.com/JZ-Skyloong", + "usb": { + "device_version": "1.0.0", + "pid": "0x6062", + "vid": "0x1EA7", + "max_power": 380 + }, + "community_layouts": ["60_ansi"], + "layouts": { + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"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": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 3.125, "h": 0.5}, + {"matrix": [4, 5], "x": 3.75, "y": 4.5, "h": 0.5, "w":6.25}, + {"matrix": [4, 8], "x": 6.875, "y": 4.0, "w": 3.125, "h": 0.5}, + {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"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": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi_split_space": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"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": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 3.125}, + {"matrix": [4, 8], "x": 6.875, "y": 4, "w": 3.125}, + {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/default/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/default/keymap.c new file mode 100644 index 00000000000..8186079dcbf --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +// Copyright 2021 JZ-Skyloong (@JZ-Skyloong) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Ctl│GUI│Alt│ │Spc│Mut│ │ |Spc|Alt│App│Ctl│ │Mo1| + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(1) + ), + + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk b/keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk new file mode 100644 index 00000000000..3bbd2614291 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk @@ -0,0 +1 @@ +# File intentionally blank diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c new file mode 100644 index 00000000000..fd00b8b7394 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -0,0 +1,237 @@ +// Copyright 2023 NaturalZh (@NaturalZh) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +_Bool FN_WIN = 0; +_Bool FN_MAC = 0; +_Bool L_WIN = 0; +_Bool L_MAC = 0; + +enum layer_names { + _WIN, + _MAC, + _WIN_INDEX, + _MAC_INDEX, +}; + +enum tap_hold_keys { + _DN_MU //Tap--KC_DOWN and Hold--KC_APP +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │Ctl│GUI│Alt│ │Spc│Spc│Mut│ |Spc|Alt│App│Ctl│ │Mox| + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [_WIN] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_UP), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, LT(_WIN_INDEX, KC_LEFT), TD(_DN_MU), RCTL_T(KC_RIGHT) + ), + + [_MAC] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RSFT_T(KC_UP), + _______, KC_LALT, KC_LGUI, _______, _______, _______, KC_RGUI, LT(_MAC_INDEX, KC_LEFT), RALT_T(KC_DOWN), RCTL_T(KC_RIGHT) + ), + + [_WIN_INDEX] = LAYOUT_all( + KC_GRV , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, _______, KC_DOWN, KC_RIGHT + ), + + [_MAC_INDEX] = LAYOUT_all( + KC_GRV , KC_F14, KC_F15, C(KC_UP), G(KC_D), G(KC_SPC), LAG(KC_EJCT), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, + _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, _______, KC_DOWN, KC_RIGHT + ) +}; + + +typedef struct { + uint16_t tap; + uint16_t hold; + uint16_t held; +} tap_dance_tap_hold_t; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_action_t *action; + + switch (keycode) { + case TD(_DN_MU): + action = &tap_dance_actions[TD_INDEX(keycode)]; + if (!record->event.pressed && action->state.count && !action->state.finished) { + tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; + tap_code16(tap_hold->tap); + } + } + return true; +} + +void tap_dance_tap_hold_finished(tap_dance_state_t *state, void *user_data) { + tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data; + + if (state->pressed) { + if (state->count == 1 +#ifndef PERMISSIVE_HOLD + && !state->interrupted +#endif + ) { + register_code16(tap_hold->hold); + tap_hold->held = tap_hold->hold; + } else { + register_code16(tap_hold->tap); + tap_hold->held = tap_hold->tap; + } + } +} + +void tap_dance_tap_hold_reset(tap_dance_state_t *state, void *user_data) { + tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data; + + if (tap_hold->held) { + unregister_code16(tap_hold->held); + tap_hold->held = 0; + } +} + +#define ACTION_TAP_DANCE_TAP_HOLD(tap, hold) \ + { .fn = {NULL, tap_dance_tap_hold_finished, tap_dance_tap_hold_reset}, .user_data = (void *)&((tap_dance_tap_hold_t){tap, hold, 0}), } + +tap_dance_action_t tap_dance_actions[] = { + [_DN_MU] = ACTION_TAP_DANCE_TAP_HOLD(KC_DOWN, KC_APP), +}; + + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + + switch (get_highest_layer(layer_state)) { + case 2:{ + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); + } + } break; + case 3:{ + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); + } + } break; + + case 0:{ + if (L_WIN) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); + } + }else{ + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); + } + } + } break; + + case 1:{ + if (L_MAC) { + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); + } + }else{ + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); + } + } + } break; + + default:{ + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); + RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); + } + } + } + return true; +} + + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch (keycode) { +# ifdef RGB_MATRIX_ENABLE + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + } break; + } + } + return false; + case RGB_VAI: + rgb_matrix_set_flags(LED_FLAG_ALL); + return true; +# endif + case TO(0): + if (record->event.pressed) { + L_WIN = 1; + set_single_persistent_default_layer(0); // Save default layer 0 to eeprom + } else { + L_WIN = 0; + } + return true; // continue all further processing of this key + + case MO(2): + if (record->event.pressed) { + FN_WIN = 1; + } else { + FN_WIN = 0; + } + return true; // continue all further processing of this key + + case TO(1): + if (record->event.pressed) { + L_MAC = 1; + set_single_persistent_default_layer(1); //Save default layer 1 to eeprom + } else { + L_MAC = 0; + } + return true; // continue all further processing of this key + + case MO(3): + if (record->event.pressed) { + FN_MAC = 1; + } else { + FN_MAC = 0; + } + return true; // continue all further processing of this key + default: + return true; + } +} diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/rules.mk b/keyboards/skyloong/gk61/pro_ds/keymaps/via/rules.mk new file mode 100644 index 00000000000..791d5ab5021 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/skyloong/gk61/pro_ds/mcuconf.h b/keyboards/skyloong/gk61/pro_ds/mcuconf.h new file mode 100644 index 00000000000..92c1f724f3a --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/mcuconf.h @@ -0,0 +1,12 @@ +// Copyright 2023 NaturalZh (@NaturalZh) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 TRUE + +#undef STM32_SPI_USE_DMA +#define STM32_SPI_USE_DMA TRUE + diff --git a/keyboards/skyloong/gk61/pro_ds/pro_ds.c b/keyboards/skyloong/gk61/pro_ds/pro_ds.c new file mode 100644 index 00000000000..4f09eb7d5c9 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/pro_ds.c @@ -0,0 +1,120 @@ +// Copyright 2023 NaturalZh (@NaturalZh) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "quantum.h" + +#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ +const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { +/* Each AW20216 channel is controlled by a register at some offset between 0x00 + * and 0xD7 inclusive. + * See drivers/awinic/aw20216.h for the mapping between register offsets and + * driver pin locations. + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, CS1_SW1, CS2_SW1, CS3_SW1}, + {0, CS1_SW2, CS2_SW2, CS3_SW2}, + {0, CS1_SW3, CS2_SW3, CS3_SW3}, + {0, CS1_SW4, CS2_SW4, CS3_SW4}, + {0, CS1_SW5, CS2_SW5, CS3_SW5}, + {0, CS1_SW6, CS2_SW6, CS3_SW6}, + {0, CS1_SW7, CS2_SW7, CS3_SW7}, + {0, CS1_SW8, CS2_SW8, CS3_SW8}, + {0, CS1_SW9, CS2_SW9, CS3_SW9}, + {0, CS1_SW10, CS2_SW10, CS3_SW10}, + {0, CS1_SW11, CS2_SW11, CS3_SW11}, + {0, CS16_SW1, CS17_SW1, CS18_SW1}, + {0, CS16_SW2, CS17_SW2, CS18_SW2}, + {0, CS16_SW3, CS17_SW3, CS18_SW3}, + + {0, CS4_SW1, CS5_SW1, CS6_SW1}, + {0, CS4_SW2, CS5_SW2, CS6_SW2}, + {0, CS4_SW3, CS5_SW3, CS6_SW3}, + {0, CS4_SW4, CS5_SW4, CS6_SW4}, + {0, CS4_SW5, CS5_SW5, CS6_SW5}, + {0, CS4_SW6, CS5_SW6, CS6_SW6}, + {0, CS4_SW7, CS5_SW7, CS6_SW7}, + {0, CS4_SW8, CS5_SW8, CS6_SW8}, + {0, CS4_SW9, CS5_SW9, CS6_SW9}, + {0, CS4_SW10, CS5_SW10, CS6_SW10}, + {0, CS4_SW11, CS5_SW11, CS6_SW11}, + {0, CS16_SW4, CS17_SW4, CS18_SW4}, + {0, CS16_SW5, CS17_SW5, CS18_SW5}, + {0, CS16_SW6, CS17_SW6, CS18_SW6}, + + {0, CS7_SW1, CS8_SW1, CS9_SW1}, + {0, CS7_SW2, CS8_SW2, CS9_SW2}, + {0, CS7_SW3, CS8_SW3, CS9_SW3}, + {0, CS7_SW4, CS8_SW4, CS9_SW4}, + {0, CS7_SW5, CS8_SW5, CS9_SW5}, + {0, CS7_SW6, CS8_SW6, CS9_SW6}, + {0, CS7_SW7, CS8_SW7, CS9_SW7}, + {0, CS7_SW8, CS8_SW8, CS9_SW8}, + {0, CS7_SW9, CS8_SW9, CS9_SW9}, + {0, CS7_SW10, CS8_SW10, CS9_SW10}, + {0, CS7_SW11, CS8_SW11, CS9_SW11}, + {0, CS16_SW7, CS17_SW7, CS18_SW7}, + {0, CS16_SW8, CS17_SW8, CS18_SW8}, + + {0, CS10_SW1, CS11_SW1, CS12_SW1}, + {0, CS10_SW2, CS11_SW2, CS12_SW2}, + {0, CS10_SW3, CS11_SW3, CS12_SW3}, + {0, CS10_SW4, CS11_SW4, CS12_SW4}, + {0, CS10_SW5, CS11_SW5, CS12_SW5}, + {0, CS10_SW6, CS11_SW6, CS12_SW6}, + {0, CS10_SW7, CS11_SW7, CS12_SW7}, + {0, CS10_SW8, CS11_SW8, CS12_SW8}, + {0, CS10_SW9, CS11_SW9, CS12_SW9}, + {0, CS10_SW10, CS11_SW10, CS12_SW10}, + {0, CS10_SW11, CS11_SW11, CS12_SW11}, + {0, CS16_SW9, CS17_SW9, CS18_SW9}, + + {0, CS13_SW1, CS14_SW1, CS15_SW1}, + {0, CS13_SW2, CS14_SW2, CS15_SW2}, + {0, CS13_SW3, CS14_SW3, CS15_SW3}, + {0, CS13_SW4, CS14_SW4, CS15_SW4}, + {0, CS13_SW5, CS14_SW5, CS15_SW5}, + //{0, CS13_SW5, CS14_SW5, CS15_SW5}, + {0, CS13_SW6, CS14_SW6, CS15_SW6}, + {0, CS13_SW7, CS14_SW7, CS15_SW7}, + {0, CS13_SW8, CS14_SW8, CS15_SW8}, + {0, CS13_SW9, CS14_SW9, CS15_SW9}, + {0, CS13_SW10, CS14_SW10, CS15_SW10} +}; + +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } + + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0); + } + } + return false; +} + + +void suspend_power_down_kb(void) { + writePinLow(SDB); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + writePinHigh(SDB); + suspend_wakeup_init_user(); +} +#endif + +void board_init(void) { + // JTAG-DP Disabled and SW-DP Disabled + AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE; +# ifdef RGB_MATRIX_ENABLE + setPinOutput(SDB); + writePinHigh(SDB); +# endif +} diff --git a/keyboards/skyloong/gk61/pro_ds/readme.md b/keyboards/skyloong/gk61/pro_ds/readme.md new file mode 100644 index 00000000000..084fd31df8d --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/readme.md @@ -0,0 +1,33 @@ +# GK61 PRO DS + +![GK61 PRO DS](https://i.imgur.com/x7riwSeh.png) + +## The PCB features: +* QMK & VIA compatibility +* RGB Matrix backlight +* There are double 3.125 split space bars or a 6.25 long space bar in space position . + + +The following is the QMK Firmware for the Destop 60% keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd + +* Keyboard Maintainer: [NaturalZh](https://github.com/NaturalZh) +* Hardware Supported: DestopPCB for Skyloong keylayout 60%, STM32F103C8T6 +* Hardware Availability: http://www.skyloong.com.cn https://skyloong.vip + +Make example for this keyboard (after setting up your build environment): + + make skyloong/gk61/pro_ds:default + +Flashing example for this keyboard: + + make skyloong/gk61/pro_ds: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/skyloong/gk61/pro_ds/rules.mk b/keyboards/skyloong/gk61/pro_ds/rules.mk new file mode 100644 index 00000000000..3bbd2614291 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_ds/rules.mk @@ -0,0 +1 @@ +# File intentionally blank From 5f4352743e49b512dc7d5bce9dd8a98c6cdbd38a Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:17:49 +0800 Subject: [PATCH 02/29] Update keyboards/skyloong/gk61/pro_ds/config.h OK, Thank you. Co-authored-by: Joel Challis --- keyboards/skyloong/gk61/pro_ds/config.h | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/config.h b/keyboards/skyloong/gk61/pro_ds/config.h index 44f64958eab..4703806d182 100644 --- a/keyboards/skyloong/gk61/pro_ds/config.h +++ b/keyboards/skyloong/gk61/pro_ds/config.h @@ -3,17 +3,10 @@ #pragma once -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_LED_COUNT 64 -# define CAPS_LOCK_INDEX 28 -# define WIN_MOD_INDEX 16 -# define MAC_MOD_INDEX 17 -# define SDB A4 +#define CAPS_LOCK_INDEX 28 +#define WIN_MOD_INDEX 16 +#define MAC_MOD_INDEX 17 +#define SDB A4 -# define RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_MATRIX_KEYPRESSES -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS - -# define AW20216S_CS_PIN_1 B12 -# define AW20216S_EN_PIN_1 SDB -#endif // RGB_MATRIX_ENABLE +#define AW20216S_CS_PIN_1 B12 +#define AW20216S_EN_PIN_1 SDB From d48b24b49ca31f758d8fcf76a1df48e4474ca2ab Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:19:01 +0800 Subject: [PATCH 03/29] Update keyboards/skyloong/gk61/pro_ds/pro_ds.c OK. Co-authored-by: Joel Challis --- keyboards/skyloong/gk61/pro_ds/pro_ds.c | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/pro_ds.c b/keyboards/skyloong/gk61/pro_ds/pro_ds.c index 4f09eb7d5c9..6137145c003 100644 --- a/keyboards/skyloong/gk61/pro_ds/pro_ds.c +++ b/keyboards/skyloong/gk61/pro_ds/pro_ds.c @@ -75,7 +75,6 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {0, CS13_SW3, CS14_SW3, CS15_SW3}, {0, CS13_SW4, CS14_SW4, CS15_SW4}, {0, CS13_SW5, CS14_SW5, CS15_SW5}, - //{0, CS13_SW5, CS14_SW5, CS15_SW5}, {0, CS13_SW6, CS14_SW6, CS15_SW6}, {0, CS13_SW7, CS14_SW7, CS15_SW7}, {0, CS13_SW8, CS14_SW8, CS15_SW8}, From f438b2f26f839e4e607feefed46dc8290b648cda Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:19:25 +0800 Subject: [PATCH 04/29] Update keyboards/skyloong/gk61/pro_ds/pro_ds.c OK. Co-authored-by: Joel Challis --- keyboards/skyloong/gk61/pro_ds/pro_ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/pro_ds.c b/keyboards/skyloong/gk61/pro_ds/pro_ds.c index 6137145c003..7d87867185a 100644 --- a/keyboards/skyloong/gk61/pro_ds/pro_ds.c +++ b/keyboards/skyloong/gk61/pro_ds/pro_ds.c @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" -#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ +#if defined(RGB_MATRIX_ENABLE) const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { /* Each AW20216 channel is controlled by a register at some offset between 0x00 * and 0xD7 inclusive. From a62a52609fdb62272bee164501a2d36e9d6af59d Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Wed, 31 Jan 2024 14:27:40 +0800 Subject: [PATCH 05/29] deleted keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk. --- keyboards/skyloong/gk61/pro_ds/config.h | 1 + keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk diff --git a/keyboards/skyloong/gk61/pro_ds/config.h b/keyboards/skyloong/gk61/pro_ds/config.h index 4703806d182..46a0f8a5cf3 100644 --- a/keyboards/skyloong/gk61/pro_ds/config.h +++ b/keyboards/skyloong/gk61/pro_ds/config.h @@ -7,6 +7,7 @@ #define WIN_MOD_INDEX 16 #define MAC_MOD_INDEX 17 #define SDB A4 +#define DEBOUNCE 10 #define AW20216S_CS_PIN_1 B12 #define AW20216S_EN_PIN_1 SDB diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk b/keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk deleted file mode 100644 index 3bbd2614291..00000000000 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# File intentionally blank From 400a12f2b1594cc282f9761505e3bcf70644c93d Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:30:36 +0800 Subject: [PATCH 06/29] Update keyboards/skyloong/gk61/pro_ds/config.h OK Co-authored-by: Joel Challis --- keyboards/skyloong/gk61/pro_ds/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/config.h b/keyboards/skyloong/gk61/pro_ds/config.h index 46a0f8a5cf3..4703806d182 100644 --- a/keyboards/skyloong/gk61/pro_ds/config.h +++ b/keyboards/skyloong/gk61/pro_ds/config.h @@ -7,7 +7,6 @@ #define WIN_MOD_INDEX 16 #define MAC_MOD_INDEX 17 #define SDB A4 -#define DEBOUNCE 10 #define AW20216S_CS_PIN_1 B12 #define AW20216S_EN_PIN_1 SDB From 3267ca3cbe51b0fd146a08cbae22546f9c400211 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:31:10 +0800 Subject: [PATCH 07/29] Update keyboards/skyloong/gk61/pro_ds/info.json I see . Thank you. Co-authored-by: Joel Challis --- keyboards/skyloong/gk61/pro_ds/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/info.json b/keyboards/skyloong/gk61/pro_ds/info.json index 3c1e2becb31..469707301a8 100644 --- a/keyboards/skyloong/gk61/pro_ds/info.json +++ b/keyboards/skyloong/gk61/pro_ds/info.json @@ -3,7 +3,7 @@ "keyboard_name": "GK61 Pro DS_1.0.0", "maintainer": "NaturalZh", "bootloader": "stm32duino", - + "debounce": 10, "diode_direction": "ROW2COL", "features": { From 6fa88f242c36a359860e97810481107563dcba14 Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Mon, 19 Feb 2024 14:52:11 +0800 Subject: [PATCH 08/29] modified tapping term setting --- keyboards/skyloong/gk61/pro_ds/config.h | 1 + .../skyloong/gk61/pro_ds/keymaps/via/keymap.c | 41 ++++++++++--------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/config.h b/keyboards/skyloong/gk61/pro_ds/config.h index 4703806d182..1369d268829 100644 --- a/keyboards/skyloong/gk61/pro_ds/config.h +++ b/keyboards/skyloong/gk61/pro_ds/config.h @@ -7,6 +7,7 @@ #define WIN_MOD_INDEX 16 #define MAC_MOD_INDEX 17 #define SDB A4 +#define TAPPING_TERM_PER_KEY #define AW20216S_CS_PIN_1 B12 #define AW20216S_EN_PIN_1 SDB diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index fd00b8b7394..2ba73b0146e 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -18,6 +18,14 @@ enum tap_hold_keys { _DN_MU //Tap--KC_DOWN and Hold--KC_APP }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RSFT_T(KC_UP): + return TAPPING_TERM - 80; //right shift hold time less than default tapping term 80ms + default: + return TAPPING_TERM; + } +} const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* @@ -73,20 +81,6 @@ typedef struct { uint16_t held; } tap_dance_tap_hold_t; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_action_t *action; - - switch (keycode) { - case TD(_DN_MU): - action = &tap_dance_actions[TD_INDEX(keycode)]; - if (!record->event.pressed && action->state.count && !action->state.finished) { - tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; - tap_code16(tap_hold->tap); - } - } - return true; -} - void tap_dance_tap_hold_finished(tap_dance_state_t *state, void *user_data) { tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data; @@ -175,10 +169,9 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { - return false; - } +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_action_t *action; + switch (keycode) { # ifdef RGB_MATRIX_ENABLE case RGB_TOG: @@ -231,7 +224,15 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { FN_MAC = 0; } return true; // continue all further processing of this key - default: - return true; + + case TD(_DN_MU): + action = &tap_dance_actions[TD_INDEX(keycode)]; + if (!record->event.pressed && action->state.count && !action->state.finished) { + tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; + tap_code16(tap_hold->tap); + } + + default: + return true; } } From 606e72fd7de65bc45b238b6bfc825a314383a25c Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Wed, 28 Feb 2024 17:32:55 +0800 Subject: [PATCH 09/29] corrected rgb matrix driver --- keyboards/skyloong/gk61/pro_ds/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/info.json b/keyboards/skyloong/gk61/pro_ds/info.json index 469707301a8..96a3a76233e 100644 --- a/keyboards/skyloong/gk61/pro_ds/info.json +++ b/keyboards/skyloong/gk61/pro_ds/info.json @@ -47,7 +47,7 @@ "splash": true, "solid_splash": true }, - "driver": "aw20216", + "driver": "aw20216s", "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, From c6544591f78e944099cd7db69572201e72e36f15 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:54:25 +0800 Subject: [PATCH 10/29] Update keyboards/skyloong/gk61/pro_ds/config.h OK. Thanks. Co-authored-by: Ryan --- keyboards/skyloong/gk61/pro_ds/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/config.h b/keyboards/skyloong/gk61/pro_ds/config.h index 1369d268829..05d78acf74a 100644 --- a/keyboards/skyloong/gk61/pro_ds/config.h +++ b/keyboards/skyloong/gk61/pro_ds/config.h @@ -6,7 +6,7 @@ #define CAPS_LOCK_INDEX 28 #define WIN_MOD_INDEX 16 #define MAC_MOD_INDEX 17 -#define SDB A4 +#define AW20216S_SDB_PIN A4 #define TAPPING_TERM_PER_KEY #define AW20216S_CS_PIN_1 B12 From 6d2b47b11200a24eb93ba6f5a3409021b355afb1 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:54:52 +0800 Subject: [PATCH 11/29] Update keyboards/skyloong/gk61/pro_ds/pro_ds.c OK. Thanks. Co-authored-by: Ryan --- keyboards/skyloong/gk61/pro_ds/pro_ds.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/pro_ds.c b/keyboards/skyloong/gk61/pro_ds/pro_ds.c index 7d87867185a..8c8854b8d4c 100644 --- a/keyboards/skyloong/gk61/pro_ds/pro_ds.c +++ b/keyboards/skyloong/gk61/pro_ds/pro_ds.c @@ -112,8 +112,4 @@ void suspend_wakeup_init_kb(void) { void board_init(void) { // JTAG-DP Disabled and SW-DP Disabled AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE; -# ifdef RGB_MATRIX_ENABLE - setPinOutput(SDB); - writePinHigh(SDB); -# endif } From 0ef44f620f01e587bfeae7851546cc5b2ef6d61f Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:55:14 +0800 Subject: [PATCH 12/29] Update keyboards/skyloong/gk61/pro_ds/pro_ds.c OK, Thanks. Co-authored-by: Ryan --- keyboards/skyloong/gk61/pro_ds/pro_ds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/pro_ds.c b/keyboards/skyloong/gk61/pro_ds/pro_ds.c index 8c8854b8d4c..744cf4067cd 100644 --- a/keyboards/skyloong/gk61/pro_ds/pro_ds.c +++ b/keyboards/skyloong/gk61/pro_ds/pro_ds.c @@ -99,12 +99,12 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { void suspend_power_down_kb(void) { - writePinLow(SDB); + gpio_write_pin_low(AW20216S_SDB_PIN); suspend_power_down_user(); } void suspend_wakeup_init_kb(void) { - writePinHigh(SDB); + gpio_write_pin_high(AW20216S_SDB_PIN); suspend_wakeup_init_user(); } #endif From 4f2e5d8328244f628c4fec0c53f5ba1517e8d0ca Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Fri, 29 Mar 2024 20:15:23 +0800 Subject: [PATCH 13/29] update skyloong/gk61/pro_ds/config.h --- keyboards/skyloong/gk61/pro_ds/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/config.h b/keyboards/skyloong/gk61/pro_ds/config.h index 05d78acf74a..1109bc4af5c 100644 --- a/keyboards/skyloong/gk61/pro_ds/config.h +++ b/keyboards/skyloong/gk61/pro_ds/config.h @@ -10,4 +10,4 @@ #define TAPPING_TERM_PER_KEY #define AW20216S_CS_PIN_1 B12 -#define AW20216S_EN_PIN_1 SDB +#define AW20216S_EN_PIN_1 A4 From 51e2f09aa4873d7a7a9446d2045939d4744f4786 Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Tue, 11 Jun 2024 19:31:31 +0800 Subject: [PATCH 14/29] update skyloong/gk61/pro_ds/pro_ds.c --- keyboards/skyloong/gk61/pro_ds/pro_ds.c | 126 ++++++++++++------------ 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/pro_ds.c b/keyboards/skyloong/gk61/pro_ds/pro_ds.c index 744cf4067cd..bc0b3556810 100644 --- a/keyboards/skyloong/gk61/pro_ds/pro_ds.c +++ b/keyboards/skyloong/gk61/pro_ds/pro_ds.c @@ -13,73 +13,73 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { * | | G location * | | | B location * | | | | */ - {0, CS1_SW1, CS2_SW1, CS3_SW1}, - {0, CS1_SW2, CS2_SW2, CS3_SW2}, - {0, CS1_SW3, CS2_SW3, CS3_SW3}, - {0, CS1_SW4, CS2_SW4, CS3_SW4}, - {0, CS1_SW5, CS2_SW5, CS3_SW5}, - {0, CS1_SW6, CS2_SW6, CS3_SW6}, - {0, CS1_SW7, CS2_SW7, CS3_SW7}, - {0, CS1_SW8, CS2_SW8, CS3_SW8}, - {0, CS1_SW9, CS2_SW9, CS3_SW9}, - {0, CS1_SW10, CS2_SW10, CS3_SW10}, - {0, CS1_SW11, CS2_SW11, CS3_SW11}, - {0, CS16_SW1, CS17_SW1, CS18_SW1}, - {0, CS16_SW2, CS17_SW2, CS18_SW2}, - {0, CS16_SW3, CS17_SW3, CS18_SW3}, + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + {0, SW2_CS1, SW2_CS2, SW2_CS3}, + {0, SW3_CS1, SW3_CS2, SW3_CS3}, + {0, SW4_CS1, SW4_CS2, SW4_CS3}, + {0, SW5_CS1, SW5_CS2, SW5_CS3}, + {0, SW6_CS1, SW6_CS2, SW6_CS3}, + {0, SW7_CS1, SW7_CS2, SW7_CS3}, + {0, SW8_CS1, SW8_CS2, SW8_CS3}, + {0, SW9_CS1, SW9_CS2, SW9_CS3}, + {0, SW10_CS1, SW10_CS2, SW10_CS3}, + {0, SW11_CS1, SW11_CS2, SW11_CS3}, + {0, SW1_CS16, SW1_CS17, SW1_CS18}, + {0, SW2_CS16, SW2_CS17, SW2_CS18}, + {0, SW3_CS16, SW3_CS17, SW3_CS18}, - {0, CS4_SW1, CS5_SW1, CS6_SW1}, - {0, CS4_SW2, CS5_SW2, CS6_SW2}, - {0, CS4_SW3, CS5_SW3, CS6_SW3}, - {0, CS4_SW4, CS5_SW4, CS6_SW4}, - {0, CS4_SW5, CS5_SW5, CS6_SW5}, - {0, CS4_SW6, CS5_SW6, CS6_SW6}, - {0, CS4_SW7, CS5_SW7, CS6_SW7}, - {0, CS4_SW8, CS5_SW8, CS6_SW8}, - {0, CS4_SW9, CS5_SW9, CS6_SW9}, - {0, CS4_SW10, CS5_SW10, CS6_SW10}, - {0, CS4_SW11, CS5_SW11, CS6_SW11}, - {0, CS16_SW4, CS17_SW4, CS18_SW4}, - {0, CS16_SW5, CS17_SW5, CS18_SW5}, - {0, CS16_SW6, CS17_SW6, CS18_SW6}, + {0, SW1_CS4, SW1_CS5, SW1_CS6}, + {0, SW2_CS4, SW2_CS5, SW2_CS6}, + {0, SW3_CS4, SW3_CS5, SW3_CS6}, + {0, SW4_CS4, SW4_CS5, SW4_CS6}, + {0, SW5_CS4, SW5_CS5, SW5_CS6}, + {0, SW6_CS4, SW6_CS5, SW6_CS6}, + {0, SW7_CS4, SW7_CS5, SW7_CS6}, + {0, SW8_CS4, SW8_CS5, SW8_CS6}, + {0, SW9_CS4, SW9_CS5, SW9_CS6}, + {0, SW10_CS4, SW10_CS5, SW10_CS6}, + {0, SW11_CS4, SW11_CS5, SW11_CS6}, + {0, SW4_CS16, SW4_CS17, SW4_CS18}, + {0, SW5_CS16, SW5_CS17, SW5_CS18}, + {0, SW6_CS16, SW6_CS17, SW6_CS18}, - {0, CS7_SW1, CS8_SW1, CS9_SW1}, - {0, CS7_SW2, CS8_SW2, CS9_SW2}, - {0, CS7_SW3, CS8_SW3, CS9_SW3}, - {0, CS7_SW4, CS8_SW4, CS9_SW4}, - {0, CS7_SW5, CS8_SW5, CS9_SW5}, - {0, CS7_SW6, CS8_SW6, CS9_SW6}, - {0, CS7_SW7, CS8_SW7, CS9_SW7}, - {0, CS7_SW8, CS8_SW8, CS9_SW8}, - {0, CS7_SW9, CS8_SW9, CS9_SW9}, - {0, CS7_SW10, CS8_SW10, CS9_SW10}, - {0, CS7_SW11, CS8_SW11, CS9_SW11}, - {0, CS16_SW7, CS17_SW7, CS18_SW7}, - {0, CS16_SW8, CS17_SW8, CS18_SW8}, + {0, SW1_CS7, SW1_CS8, SW1_CS9}, + {0, SW2_CS7, SW2_CS8, SW2_CS9}, + {0, SW3_CS7, SW3_CS8, SW3_CS9}, + {0, SW4_CS7, SW4_CS8, SW4_CS9}, + {0, SW5_CS7, SW5_CS8, SW5_CS9}, + {0, SW6_CS7, SW6_CS8, SW6_CS9}, + {0, SW7_CS7, SW7_CS8, SW7_CS9}, + {0, SW8_CS7, SW8_CS8, SW8_CS9}, + {0, SW9_CS7, SW9_CS8, SW9_CS9}, + {0, SW10_CS7, SW10_CS8, SW10_CS9}, + {0, SW11_CS7, SW11_CS8, SW11_CS9}, + {0, SW7_CS16, SW7_CS17, SW7_CS18}, + {0, SW8_CS16, SW8_CS17, SW8_CS18}, - {0, CS10_SW1, CS11_SW1, CS12_SW1}, - {0, CS10_SW2, CS11_SW2, CS12_SW2}, - {0, CS10_SW3, CS11_SW3, CS12_SW3}, - {0, CS10_SW4, CS11_SW4, CS12_SW4}, - {0, CS10_SW5, CS11_SW5, CS12_SW5}, - {0, CS10_SW6, CS11_SW6, CS12_SW6}, - {0, CS10_SW7, CS11_SW7, CS12_SW7}, - {0, CS10_SW8, CS11_SW8, CS12_SW8}, - {0, CS10_SW9, CS11_SW9, CS12_SW9}, - {0, CS10_SW10, CS11_SW10, CS12_SW10}, - {0, CS10_SW11, CS11_SW11, CS12_SW11}, - {0, CS16_SW9, CS17_SW9, CS18_SW9}, + {0, SW1_CS10, SW1_CS11, SW1_CS12}, + {0, SW2_CS10, SW2_CS11, SW2_CS12}, + {0, SW3_CS10, SW3_CS11, SW3_CS12}, + {0, SW4_CS10, SW4_CS11, SW4_CS12}, + {0, SW5_CS10, SW5_CS11, SW5_CS12}, + {0, SW6_CS10, SW6_CS11, SW6_CS12}, + {0, SW7_CS10, SW7_CS11, SW7_CS12}, + {0, SW8_CS10, SW8_CS11, SW8_CS12}, + {0, SW9_CS10, SW9_CS11, SW9_CS12}, + {0, SW10_CS10, SW10_CS11, SW10_CS12}, + {0, SW11_CS10, SW11_CS11, SW11_CS12}, + {0, SW9_CS16, SW9_CS17, SW9_CS18}, - {0, CS13_SW1, CS14_SW1, CS15_SW1}, - {0, CS13_SW2, CS14_SW2, CS15_SW2}, - {0, CS13_SW3, CS14_SW3, CS15_SW3}, - {0, CS13_SW4, CS14_SW4, CS15_SW4}, - {0, CS13_SW5, CS14_SW5, CS15_SW5}, - {0, CS13_SW6, CS14_SW6, CS15_SW6}, - {0, CS13_SW7, CS14_SW7, CS15_SW7}, - {0, CS13_SW8, CS14_SW8, CS15_SW8}, - {0, CS13_SW9, CS14_SW9, CS15_SW9}, - {0, CS13_SW10, CS14_SW10, CS15_SW10} + {0, SW1_CS13, SW1_CS14, SW1_CS15}, + {0, SW2_CS13, SW2_CS14, SW2_CS15}, + {0, SW3_CS13, SW3_CS14, SW3_CS15}, + {0, SW4_CS13, SW4_CS14, SW4_CS15}, + {0, SW5_CS13, SW5_CS14, SW5_CS15}, + {0, SW6_CS13, SW6_CS14, SW6_CS15}, + {0, SW7_CS13, SW7_CS14, SW7_CS15}, + {0, SW8_CS13, SW8_CS14, SW8_CS15}, + {0, SW9_CS13, SW9_CS14, SW9_CS15}, + {0, SW10_CS13, SW10_CS14, SW10_CS15} }; bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { From 60b49583ed99b19bf1956748ac8ac41b7f0fd7e9 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:12:54 +0800 Subject: [PATCH 15/29] Update keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c OK, I agree with your advice. Co-authored-by: Daniel <1767914+iamdanielv@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index 2ba73b0146e..a2b7ab295ca 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; // continue all further processing of this key case TD(_DN_MU): - action = &tap_dance_actions[TD_INDEX(keycode)]; + action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; if (!record->event.pressed && action->state.count && !action->state.finished) { tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; tap_code16(tap_hold->tap); From 26c322296b4ad872fa3b150492ae7822ef19e791 Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Mon, 19 Aug 2024 16:08:30 +0800 Subject: [PATCH 16/29] update skyloong/gk61/pro_ds/keymaps/via/keymap.c --- .../skyloong/gk61/pro_ds/keymaps/via/keymap.c | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index a2b7ab295ca..0188278f917 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_WIN_INDEX] = LAYOUT_all( KC_GRV , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, + _______, _______, DF(0), DF(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, KC_DOWN, KC_RIGHT @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAC_INDEX] = LAYOUT_all( KC_GRV , KC_F14, KC_F15, C(KC_UP), G(KC_D), G(KC_SPC), LAG(KC_EJCT), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, - _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, + _______, _______, DF(0), DF(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, KC_DOWN, KC_RIGHT @@ -191,14 +191,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rgb_matrix_set_flags(LED_FLAG_ALL); return true; # endif - case TO(0): + case DF(0): if (record->event.pressed) { L_WIN = 1; + L_MAC = 0; + layer_move(0); set_single_persistent_default_layer(0); // Save default layer 0 to eeprom } else { L_WIN = 0; } - return true; // continue all further processing of this key + return false; // cancel all further processing of this key case MO(2): if (record->event.pressed) { @@ -208,14 +210,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; // continue all further processing of this key - case TO(1): + case DF(1): if (record->event.pressed) { L_MAC = 1; + L_WIN = 0; + layer_move(1); set_single_persistent_default_layer(1); //Save default layer 1 to eeprom } else { L_MAC = 0; } - return true; // continue all further processing of this key + return false; // cancel all further processing of this key case MO(3): if (record->event.pressed) { @@ -233,6 +237,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } default: - return true; + L_MAC = 0; + L_WIN = 0; + return true; } } From 4e017fa58a380ba56df01fdf7acc39a641608649 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:43:36 +0800 Subject: [PATCH 17/29] Update keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c OK, Thank you for your advice. Co-authored-by: Daniel <1767914+iamdanielv@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index 0188278f917..29472db8f93 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -202,13 +202,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; // cancel all further processing of this key - case MO(2): - if (record->event.pressed) { - FN_WIN = 1; - } else { - FN_WIN = 0; - } - return true; // continue all further processing of this key case DF(1): if (record->event.pressed) { From 22584421cd195b261a74d3ed867456002775d91b Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:44:33 +0800 Subject: [PATCH 18/29] Update keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c OK, Thank you. Co-authored-by: Daniel <1767914+iamdanielv@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index 29472db8f93..364fbc1facc 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -214,14 +214,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; // cancel all further processing of this key - case MO(3): - if (record->event.pressed) { - FN_MAC = 1; - } else { - FN_MAC = 0; - } - return true; // continue all further processing of this key - case TD(_DN_MU): action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; if (!record->event.pressed && action->state.count && !action->state.finished) { From 3b5b40d8971173dfda3e418a41cdbe25fecab6ae Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:47:18 +0800 Subject: [PATCH 19/29] Update keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c Yes, it`s better that way. Thank you. Co-authored-by: Daniel <1767914+iamdanielv@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index 364fbc1facc..daa643f909a 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -119,7 +119,7 @@ tap_dance_action_t tap_dance_actions[] = { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { switch (get_highest_layer(layer_state)) { - case 2:{ + case _WIN_INDEX:{ RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); if (!rgb_matrix_get_flags()) { RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); From 65d95ef7d40466cddac62fe6ddcac7a2c33281f7 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:48:14 +0800 Subject: [PATCH 20/29] Update keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c Okey. Co-authored-by: Daniel <1767914+iamdanielv@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index daa643f909a..b62748ff436 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -125,7 +125,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); } } break; - case 3:{ + case _MAC_INDEX:{ RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); if (!rgb_matrix_get_flags()) { RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); From 3bae63131c0bff499f915d3b7ec4da6decc8fdd7 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:48:37 +0800 Subject: [PATCH 21/29] Update keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c Okey! Co-authored-by: Daniel <1767914+iamdanielv@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index b62748ff436..dcbec0b6145 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -132,7 +132,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } } break; - case 0:{ + case _WIN:{ if (L_WIN) { RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); if (!rgb_matrix_get_flags()) { From fb452c7c379c4e30d7cae0ef6b64c2bbe222dc70 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:49:18 +0800 Subject: [PATCH 22/29] Update keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c OK, thank you very much. Co-authored-by: Daniel <1767914+iamdanielv@users.noreply.github.com> --- keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index dcbec0b6145..e65bb45e90f 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -145,7 +145,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } } break; - case 1:{ + case _MAC:{ if (L_MAC) { RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); if (!rgb_matrix_get_flags()) { From 0bfdaa5b74f11b12a89409d90a05cba29d7f09c2 Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Wed, 21 Aug 2024 09:11:32 +0800 Subject: [PATCH 23/29] update skyloong/gk61/pro_ds/keymaps/via/keymap.c --- keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c index e65bb45e90f..16e3ce74add 100644 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c @@ -2,8 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H -_Bool FN_WIN = 0; -_Bool FN_MAC = 0; _Bool L_WIN = 0; _Bool L_MAC = 0; From 10ebb19171f687ff1179b99cc428f5a4203a05db Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:59:12 +0800 Subject: [PATCH 24/29] Update keyboards/skyloong/gk61/pro_ds/info.json OK, Thank you for you advice. Co-authored-by: Ryan --- keyboards/skyloong/gk61/pro_ds/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/info.json b/keyboards/skyloong/gk61/pro_ds/info.json index 96a3a76233e..90d42cce2dc 100644 --- a/keyboards/skyloong/gk61/pro_ds/info.json +++ b/keyboards/skyloong/gk61/pro_ds/info.json @@ -130,7 +130,7 @@ "layouts": { "LAYOUT_all": { "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"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}, From e9a5309c1adca0de00a9cb0f9d0c40fbd0e5a3e8 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:59:46 +0800 Subject: [PATCH 25/29] Update keyboards/skyloong/gk61/pro_ds/info.json OK, thank you . Co-authored-by: Ryan --- keyboards/skyloong/gk61/pro_ds/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/info.json b/keyboards/skyloong/gk61/pro_ds/info.json index 90d42cce2dc..3cb14e11a73 100644 --- a/keyboards/skyloong/gk61/pro_ds/info.json +++ b/keyboards/skyloong/gk61/pro_ds/info.json @@ -197,7 +197,7 @@ }, "LAYOUT_60_ansi": { "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"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}, From cc4629b2edb6070ff28d949bebda414c68557148 Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:00:13 +0800 Subject: [PATCH 26/29] Update keyboards/skyloong/gk61/pro_ds/info.json OK , thank you. Co-authored-by: Ryan --- keyboards/skyloong/gk61/pro_ds/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/skyloong/gk61/pro_ds/info.json b/keyboards/skyloong/gk61/pro_ds/info.json index 3cb14e11a73..a5c25cfb121 100644 --- a/keyboards/skyloong/gk61/pro_ds/info.json +++ b/keyboards/skyloong/gk61/pro_ds/info.json @@ -262,7 +262,7 @@ }, "LAYOUT_60_ansi_split_space": { "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0, "w": 1}, + {"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}, From ca1bbe7ad73710ca889cf3c3c926cfc6d4f98e8e Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Mon, 26 Aug 2024 14:09:26 +0800 Subject: [PATCH 27/29] rename skyloong/gk61/pro_ds/info.json keyboard.json; delete skyloong/gk61/pro_ds/rule.mk --- keyboards/skyloong/gk61/pro_ds/{info.json => keyboard.json} | 0 keyboards/skyloong/gk61/pro_ds/rules.mk | 1 - 2 files changed, 1 deletion(-) rename keyboards/skyloong/gk61/pro_ds/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/skyloong/gk61/pro_ds/rules.mk diff --git a/keyboards/skyloong/gk61/pro_ds/info.json b/keyboards/skyloong/gk61/pro_ds/keyboard.json similarity index 100% rename from keyboards/skyloong/gk61/pro_ds/info.json rename to keyboards/skyloong/gk61/pro_ds/keyboard.json diff --git a/keyboards/skyloong/gk61/pro_ds/rules.mk b/keyboards/skyloong/gk61/pro_ds/rules.mk deleted file mode 100644 index 3bbd2614291..00000000000 --- a/keyboards/skyloong/gk61/pro_ds/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# File intentionally blank From a3e0e52d2fe0b17637c8ee94901422ea6e5b3263 Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Tue, 27 Aug 2024 10:03:23 +0800 Subject: [PATCH 28/29] Delete skyloong/gk61/pro_ds/keymaps/via keymap files --- .../skyloong/gk61/pro_ds/keymaps/via/keymap.c | 227 ------------------ .../skyloong/gk61/pro_ds/keymaps/via/rules.mk | 2 - 2 files changed, 229 deletions(-) delete mode 100644 keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c delete mode 100644 keyboards/skyloong/gk61/pro_ds/keymaps/via/rules.mk diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c deleted file mode 100644 index 16e3ce74add..00000000000 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/keymap.c +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2023 NaturalZh (@NaturalZh) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H -_Bool L_WIN = 0; -_Bool L_MAC = 0; - -enum layer_names { - _WIN, - _MAC, - _WIN_INDEX, - _MAC_INDEX, -}; - -enum tap_hold_keys { - _DN_MU //Tap--KC_DOWN and Hold--KC_APP -}; - -uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RSFT_T(KC_UP): - return TAPPING_TERM - 80; //right shift hold time less than default tapping term 80ms - default: - return TAPPING_TERM; - } -} - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│ - * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ - * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ - * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ - * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│ - * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ - * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │ - * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ - * │Ctl│GUI│Alt│ │Spc│Spc│Mut│ |Spc|Alt│App│Ctl│ │Mox| - * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ - */ - [_WIN] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_UP), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, LT(_WIN_INDEX, KC_LEFT), TD(_DN_MU), RCTL_T(KC_RIGHT) - ), - - [_MAC] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RSFT_T(KC_UP), - _______, KC_LALT, KC_LGUI, _______, _______, _______, KC_RGUI, LT(_MAC_INDEX, KC_LEFT), RALT_T(KC_DOWN), RCTL_T(KC_RIGHT) - ), - - [_WIN_INDEX] = LAYOUT_all( - KC_GRV , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, _______, DF(0), DF(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, - _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______, - _______, _______, _______, _______, _______, _______, KC_LEFT, _______, KC_DOWN, KC_RIGHT - ), - - [_MAC_INDEX] = LAYOUT_all( - KC_GRV , KC_F14, KC_F15, C(KC_UP), G(KC_D), G(KC_SPC), LAG(KC_EJCT), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, - _______, _______, DF(0), DF(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, - _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______, - _______, _______, _______, _______, _______, _______, KC_LEFT, _______, KC_DOWN, KC_RIGHT - ) -}; - - -typedef struct { - uint16_t tap; - uint16_t hold; - uint16_t held; -} tap_dance_tap_hold_t; - -void tap_dance_tap_hold_finished(tap_dance_state_t *state, void *user_data) { - tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data; - - if (state->pressed) { - if (state->count == 1 -#ifndef PERMISSIVE_HOLD - && !state->interrupted -#endif - ) { - register_code16(tap_hold->hold); - tap_hold->held = tap_hold->hold; - } else { - register_code16(tap_hold->tap); - tap_hold->held = tap_hold->tap; - } - } -} - -void tap_dance_tap_hold_reset(tap_dance_state_t *state, void *user_data) { - tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data; - - if (tap_hold->held) { - unregister_code16(tap_hold->held); - tap_hold->held = 0; - } -} - -#define ACTION_TAP_DANCE_TAP_HOLD(tap, hold) \ - { .fn = {NULL, tap_dance_tap_hold_finished, tap_dance_tap_hold_reset}, .user_data = (void *)&((tap_dance_tap_hold_t){tap, hold, 0}), } - -tap_dance_action_t tap_dance_actions[] = { - [_DN_MU] = ACTION_TAP_DANCE_TAP_HOLD(KC_DOWN, KC_APP), -}; - - -bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - - switch (get_highest_layer(layer_state)) { - case _WIN_INDEX:{ - RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); - if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); - } - } break; - case _MAC_INDEX:{ - RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); - if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); - } - } break; - - case _WIN:{ - if (L_WIN) { - RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255); - if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); - } - }else{ - if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); - } - } - } break; - - case _MAC:{ - if (L_MAC) { - RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255); - if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); - } - }else{ - if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); - } - } - } break; - - default:{ - if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0); - RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0); - } - } - } - return true; -} - - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_action_t *action; - - switch (keycode) { -# ifdef RGB_MATRIX_ENABLE - case RGB_TOG: - if (record->event.pressed) { - switch (rgb_matrix_get_flags()) { - case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_NONE); - rgb_matrix_set_color_all(0, 0, 0); - } break; - default: { - rgb_matrix_set_flags(LED_FLAG_ALL); - } break; - } - } - return false; - case RGB_VAI: - rgb_matrix_set_flags(LED_FLAG_ALL); - return true; -# endif - case DF(0): - if (record->event.pressed) { - L_WIN = 1; - L_MAC = 0; - layer_move(0); - set_single_persistent_default_layer(0); // Save default layer 0 to eeprom - } else { - L_WIN = 0; - } - return false; // cancel all further processing of this key - - - case DF(1): - if (record->event.pressed) { - L_MAC = 1; - L_WIN = 0; - layer_move(1); - set_single_persistent_default_layer(1); //Save default layer 1 to eeprom - } else { - L_MAC = 0; - } - return false; // cancel all further processing of this key - - case TD(_DN_MU): - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; - if (!record->event.pressed && action->state.count && !action->state.finished) { - tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; - tap_code16(tap_hold->tap); - } - - default: - L_MAC = 0; - L_WIN = 0; - return true; - } -} diff --git a/keyboards/skyloong/gk61/pro_ds/keymaps/via/rules.mk b/keyboards/skyloong/gk61/pro_ds/keymaps/via/rules.mk deleted file mode 100644 index 791d5ab5021..00000000000 --- a/keyboards/skyloong/gk61/pro_ds/keymaps/via/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -VIA_ENABLE = yes -TAP_DANCE_ENABLE = yes From 36039188bf9e1762e7006ee544a791d6266fe98d Mon Sep 17 00:00:00 2001 From: JIKEDINGZHI <52481939+NaturalZh@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:38:16 +0800 Subject: [PATCH 29/29] Update keyboards/skyloong/gk61/pro_ds/config.h OK, thank you. Co-authored-by: Joel Challis --- keyboards/skyloong/gk61/pro_ds/config.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/keyboards/skyloong/gk61/pro_ds/config.h b/keyboards/skyloong/gk61/pro_ds/config.h index 1109bc4af5c..fcdef67704f 100644 --- a/keyboards/skyloong/gk61/pro_ds/config.h +++ b/keyboards/skyloong/gk61/pro_ds/config.h @@ -4,10 +4,7 @@ #pragma once #define CAPS_LOCK_INDEX 28 -#define WIN_MOD_INDEX 16 -#define MAC_MOD_INDEX 17 -#define AW20216S_SDB_PIN A4 -#define TAPPING_TERM_PER_KEY +#define AW20216S_SDB_PIN A4 #define AW20216S_CS_PIN_1 B12 #define AW20216S_EN_PIN_1 A4