From 234e099c7242550dd0f662d9647ab9dda00f0c41 Mon Sep 17 00:00:00 2001 From: skyloong <92424712+JZ-Skyloong@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:28:08 +0800 Subject: Added skyloong/Qk21 v1 Number Pad (#21467) Co-authored-by: Duncan Sutherland Co-authored-by: Ryan Co-authored-by: Drashna Jaelre --- keyboards/skyloong/qk21/v1/config.h | 12 ++ keyboards/skyloong/qk21/v1/info.json | 129 +++++++++++++++++++++ .../skyloong/qk21/v1/keymaps/default/keymap.c | 54 +++++++++ keyboards/skyloong/qk21/v1/keymaps/via/keymap.c | 54 +++++++++ keyboards/skyloong/qk21/v1/keymaps/via/rules.mk | 1 + keyboards/skyloong/qk21/v1/readme.md | 27 +++++ keyboards/skyloong/qk21/v1/rules.mk | 1 + keyboards/skyloong/qk21/v1/v1.c | 49 ++++++++ 8 files changed, 327 insertions(+) create mode 100644 keyboards/skyloong/qk21/v1/config.h create mode 100644 keyboards/skyloong/qk21/v1/info.json create mode 100644 keyboards/skyloong/qk21/v1/keymaps/default/keymap.c create mode 100644 keyboards/skyloong/qk21/v1/keymaps/via/keymap.c create mode 100644 keyboards/skyloong/qk21/v1/keymaps/via/rules.mk create mode 100644 keyboards/skyloong/qk21/v1/readme.md create mode 100644 keyboards/skyloong/qk21/v1/rules.mk create mode 100644 keyboards/skyloong/qk21/v1/v1.c (limited to 'keyboards/skyloong') diff --git a/keyboards/skyloong/qk21/v1/config.h b/keyboards/skyloong/qk21/v1/config.h new file mode 100644 index 0000000000..c74d5cce78 --- /dev/null +++ b/keyboards/skyloong/qk21/v1/config.h @@ -0,0 +1,12 @@ +// Copyright 2021 JZ-Skyloong (@JZ-Skyloong) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Enable num-lock LED */ +#define NUM_LOCK_INDEX 13 + +#define RGB_MATRIX_LED_COUNT 21 +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS //Enable frame effects +#define RGB_MATRIX_KEYPRESSES //Reacts to keypress +#define RGB_DISABLE_WHEN_USB_SUSPENDED //turn off effects when suspended diff --git a/keyboards/skyloong/qk21/v1/info.json b/keyboards/skyloong/qk21/v1/info.json new file mode 100644 index 0000000000..d5aa5e8be9 --- /dev/null +++ b/keyboards/skyloong/qk21/v1/info.json @@ -0,0 +1,129 @@ +{ + "manufacturer": "JZ-Skyloong", + "keyboard_name": "qk21", + "maintainer": "linlin012", + "bootloader": "atmel-dfu", + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["F7", "E6", "C7", "D5"], + "rows": ["F0", "F1", "F4", "F5", "F6", "B4"] + }, + "processor": "atmega32u4", + "ws2812": { + "pin": "B7" + }, + "rgb_matrix":{ + "driver": "ws2812", + "animations": { + "alphas_mods": false, + "band_pinwheel_sat": false, + "band_pinwheel_val": false, + "band_sat": false, + "band_spiral_sat": false, + "band_spiral_val": false, + "breathing": true, + "cycle_all": true, + "cycle_left_right": false, + "cycle_out_in": false, + "cycle_out_in_dual": false, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "dual_beacom": false, + "gradient_left_right": false, + "gradient_up_down": false, + "hue_breathing": false, + "hue_pendulum": false, + "hue_wave": false, + "jellybean_raindrops": true, + "pixel_fractal": false, + "pixel_rain": true, + "rainbow_moving_chevron":false, + "rainbow_pinwheels": true, + "raindrops": true, + "ranbow_beacon": true, + "typing_heatmap": true, + "solid_reactive_simple": true, + "solid_reactive_cross": true, + "splash": true + }, + "layout": [ + {"matrix": [5, 0], "x": 37, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 149, "y": 64, "flags": 4}, + {"matrix": [5, 3], "x": 224, "y": 58, "flags": 4}, + + {"matrix": [4, 0], "x": 0, "y": 51, "flags": 4}, + {"matrix": [4, 1], "x": 75, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 149, "y": 51, "flags": 4}, + + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 75, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 149, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 224, "y": 31, "flags": 4}, + + {"matrix": [2, 0], "x": 0, "y": 25, "flags": 4}, + {"matrix": [2, 1], "x": 75, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 149, "y": 25, "flags": 4}, + + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 8}, + {"matrix": [1, 1], "x": 75, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 149, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 224, "y": 12, "flags": 4}, + + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 224, "y": 0, "flags": 4} + + ], + "hue_steps": 20, + "max_brightness": 200, + "sat_steps": 20, + "speed_steps": 20, + "val_steps": 20 + }, + "url": "https://github.com/JZ-Skyloong", + "usb": { + "device_version": "1.0.0", + "pid": "0x6021", + "vid": "0x1EA7", + "max_power": 250 + }, + "community_layouts": ["numpad_6x4"], + "layouts": { + "LAYOUT_numpad_6x4": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 2, "h": 2 }, + { "matrix": [4, 0], "x": 0, "y": 4 }, + { "matrix": [4, 1], "x": 1, "y": 4 }, + { "matrix": [4, 2], "x": 2, "y": 4 }, + { "matrix": [5, 0], "x": 0, "y": 5, "w": 2 }, + { "matrix": [5, 2], "x": 2, "y": 5 }, + { "matrix": [5, 3], "x": 3, "y": 4, "h": 2 } + ] + } + } +} diff --git a/keyboards/skyloong/qk21/v1/keymaps/default/keymap.c b/keyboards/skyloong/qk21/v1/keymaps/default/keymap.c new file mode 100644 index 0000000000..8cb1d20085 --- /dev/null +++ b/keyboards/skyloong/qk21/v1/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │Esc│Tab│MO1│Bsp│ + * ├───┼───┼───┼───┤ + * │Num│ / │ * │ - │ + * ├───┼───┼───┼───┤ + * │ 7 │ 8 │ 9 │ │ + * ├───┼───┼───┤ + │ + * │ 4 │ 5 │ 6 │ │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ │ + * ├───┴───┼───┤Ent│ + * │ 0 │ . │ │ + * └───────┴───┴───┘ + */ + [0] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, MO(1), KC_BSPC, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + + /* + * ┌───┐───┬───┬───┐ + * │Rst│MOD│MO1│Bsp│ + * └───┘───┼───┼───┤ + * │Num│HUD│HUI│VAD│ + * ┌───┬───┬───┐───┤ + * │Hom│ ↑ │PgU│ │ + * ├───┼───┼───┤VAI│ + * │ ← │ │ → │ │ + * ├───┼───┼───┤───┤ + * │End│ ↓ │PgD│ │ + * ├───┴───┼───┤TOG│ + * │Insert │Del│ │ + * └───────┴───┘───┘ + */ + [1] = LAYOUT_numpad_6x4( + QK_BOOT, RGB_MOD, _______, _______, + _______, RGB_HUD, RGB_HUI, RGB_VAD, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, RGB_M_SW, KC_RGHT, RGB_VAI, + KC_END, KC_DOWN, KC_PGDN, + KC_INS, KC_DEL, RGB_TOG + ) +}; diff --git a/keyboards/skyloong/qk21/v1/keymaps/via/keymap.c b/keyboards/skyloong/qk21/v1/keymaps/via/keymap.c new file mode 100644 index 0000000000..8cb1d20085 --- /dev/null +++ b/keyboards/skyloong/qk21/v1/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │Esc│Tab│MO1│Bsp│ + * ├───┼───┼───┼───┤ + * │Num│ / │ * │ - │ + * ├───┼───┼───┼───┤ + * │ 7 │ 8 │ 9 │ │ + * ├───┼───┼───┤ + │ + * │ 4 │ 5 │ 6 │ │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ │ + * ├───┴───┼───┤Ent│ + * │ 0 │ . │ │ + * └───────┴───┴───┘ + */ + [0] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, MO(1), KC_BSPC, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + + /* + * ┌───┐───┬───┬───┐ + * │Rst│MOD│MO1│Bsp│ + * └───┘───┼───┼───┤ + * │Num│HUD│HUI│VAD│ + * ┌───┬───┬───┐───┤ + * │Hom│ ↑ │PgU│ │ + * ├───┼───┼───┤VAI│ + * │ ← │ │ → │ │ + * ├───┼───┼───┤───┤ + * │End│ ↓ │PgD│ │ + * ├───┴───┼───┤TOG│ + * │Insert │Del│ │ + * └───────┴───┘───┘ + */ + [1] = LAYOUT_numpad_6x4( + QK_BOOT, RGB_MOD, _______, _______, + _______, RGB_HUD, RGB_HUI, RGB_VAD, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, RGB_M_SW, KC_RGHT, RGB_VAI, + KC_END, KC_DOWN, KC_PGDN, + KC_INS, KC_DEL, RGB_TOG + ) +}; diff --git a/keyboards/skyloong/qk21/v1/keymaps/via/rules.mk b/keyboards/skyloong/qk21/v1/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/skyloong/qk21/v1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/skyloong/qk21/v1/readme.md b/keyboards/skyloong/qk21/v1/readme.md new file mode 100644 index 0000000000..871a819f66 --- /dev/null +++ b/keyboards/skyloong/qk21/v1/readme.md @@ -0,0 +1,27 @@ +# qk21_V1 + +![qk21](https://i.imgur.com/d65CJC5h.jpg) + +The following is the QMK Firmware for the number pad 6x4 keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd + +* Keyboard Maintainer: [linlin012](https://github.com/linlin012) +* Hardware Supported: JK172-RGB(4028)-U PCBs, MEGA32U4-MU +* Hardware Availability: http://www.skyloong.com.cn + +Make example for this keyboard (after setting up your build environment): + + make skyloong/qk21/v1:default + +Flashing example for this keyboard: + + make skyloong/qk21/v1: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/qk21/v1/rules.mk b/keyboards/skyloong/qk21/v1/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/skyloong/qk21/v1/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/skyloong/qk21/v1/v1.c b/keyboards/skyloong/qk21/v1/v1.c new file mode 100644 index 0000000000..9630d3e223 --- /dev/null +++ b/keyboards/skyloong/qk21/v1/v1.c @@ -0,0 +1,49 @@ +// Copyright 2021 JZ-Skyloong (@JZ-Skyloong) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +#if defined(RGB_MATRIX_ENABLE) && defined(NUM_LOCK_INDEX) + +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; +# endif + } + return true; +} + +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; + } + // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); + + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_INDEX, 0, 0, 0); + } + } + return true; +} + +#endif // NUM_LOCK_INDEX + -- cgit v1.2.3 From 2ba0a75c2f7a1218f9bf2a1cdb5ef0280f9f68ab Mon Sep 17 00:00:00 2001 From: skyloong <92424712+JZ-Skyloong@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:01:10 +0800 Subject: add Skyloong/GK61_V1 keyboard (#21364) Co-authored-by: Joel Challis Co-authored-by: Sergey Vlasov Co-authored-by: Drashna Jaelre Co-authored-by: Duncan Sutherland Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Fix and Matrix Diagram (#21255) --- keyboards/skyloong/gk61/v1/config.h | 39 +++ keyboards/skyloong/gk61/v1/halconf.h | 21 ++ keyboards/skyloong/gk61/v1/info.json | 331 +++++++++++++++++++++ .../skyloong/gk61/v1/keymaps/default/keymap.c | 47 +++ keyboards/skyloong/gk61/v1/keymaps/via/keymap.c | 47 +++ keyboards/skyloong/gk61/v1/keymaps/via/rules.mk | 1 + keyboards/skyloong/gk61/v1/mcuconf.h | 21 ++ keyboards/skyloong/gk61/v1/readme.md | 33 ++ keyboards/skyloong/gk61/v1/rules.mk | 1 + keyboards/skyloong/gk61/v1/v1.c | 119 ++++++++ 10 files changed, 660 insertions(+) create mode 100644 keyboards/skyloong/gk61/v1/config.h create mode 100644 keyboards/skyloong/gk61/v1/halconf.h create mode 100644 keyboards/skyloong/gk61/v1/info.json create mode 100644 keyboards/skyloong/gk61/v1/keymaps/default/keymap.c create mode 100644 keyboards/skyloong/gk61/v1/keymaps/via/keymap.c create mode 100644 keyboards/skyloong/gk61/v1/keymaps/via/rules.mk create mode 100644 keyboards/skyloong/gk61/v1/mcuconf.h create mode 100644 keyboards/skyloong/gk61/v1/readme.md create mode 100644 keyboards/skyloong/gk61/v1/rules.mk create mode 100644 keyboards/skyloong/gk61/v1/v1.c (limited to 'keyboards/skyloong') diff --git a/keyboards/skyloong/gk61/v1/config.h b/keyboards/skyloong/gk61/v1/config.h new file mode 100644 index 0000000000..f648bf80d4 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/config.h @@ -0,0 +1,39 @@ +/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong) + * + * 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 + +/* + * RGB matrix driver config (CKLED2001) + * + * This is a 7-bit address, that gets left-shifted and bit 0 + * set to 0 for write, 1 for read (as per I2C protocol) + * The address will vary depending on your wiring: + * 00 <-> GND + * 01 <-> SCL + * 10 <-> SDA + * 11 <-> VCC + * ADDR/CS represents A1:A0 of the 7-bit address. + * The result is: 0b11101(ADDR/CS) + */ +#define DRIVER_ADDR_1 0b1110100 + +#define DRIVER_COUNT 1 +#define RGB_MATRIX_LED_COUNT 64 + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS //Enable frame effects +#define RGB_MATRIX_KEYPRESSES //Reacts to keypress +#define RGB_DISABLE_WHEN_USB_SUSPENDED //turn off effects when suspended +#define SDB C1 diff --git a/keyboards/skyloong/gk61/v1/halconf.h b/keyboards/skyloong/gk61/v1/halconf.h new file mode 100644 index 0000000000..74dddca8a5 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong) + * + * 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 + +#define HAL_USE_I2C TRUE + +#include_next + diff --git a/keyboards/skyloong/gk61/v1/info.json b/keyboards/skyloong/gk61/v1/info.json new file mode 100644 index 0000000000..8e30cc3bc0 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/info.json @@ -0,0 +1,331 @@ +{ + "manufacturer": "JZ-Skyloong", + "keyboard_name": "GK61", + "maintainer": "JZ-Skyloong", + "bootloader": "stm32duino", + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "command": false, + "console": false, + "rgb_matrix": true + }, + "processor": "STM32F103", + "matrix_pins": { + "cols": ["B11", "C6", "C7", "B12", "B13", "B14", "B15", "B10", "B2", "B1", "D2", "B3", "B4", "B5"], + "rows": ["A15", "C10", "C11", "C12", "A3"] + }, + "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": "ckled2001", + "hue_steps": 20, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 89, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 104, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 134, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 164, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 179, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 209, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 22, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 67, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 82, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 97, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 127, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 142, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 156, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 171, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 186, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x":216, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 115, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 130, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 145, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 175, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 208, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 63, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 78, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 93, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 108, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 123, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 153, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 168, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 205, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 19, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 37, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 56, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x":95, "y": 64, "flags": 4}, + {"matrix": [3, 5], "x": 107, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 130, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 149, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 175, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 198, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 220, "y": 64, "flags": 4} + ], + "max_brightness": 200, + "sat_steps": 20, + "speed_steps": 20, + "val_steps": 20 + }, + "url": "https://github.com/JZ-Skyloong", + "usb": { + "vid": "0x1EA7", + "device_version": "1.0.0", + "pid": "0x6061", + "max_power": 380, + "force_nkro": true + }, + "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, 6], "x": 6.25, "y": 3}, + {"matrix": [4, 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": 2.6}, + {"matrix": [4, 5], "x": 6.35, "y": 4, "w": 0.7}, + {"matrix": [3, 5], "x": 7.15, "y": 4, "w": 1.5}, + {"matrix": [4, 8], "x": 8.75, "y": 4, "w": 1.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": { + "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, 6], "x": 6.25, "y": 3}, + {"matrix": [4, 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, 6], "x": 6.25, "y": 3}, + {"matrix": [4, 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": 2.5}, + {"matrix": [3, 5], "x": 6.25, "y": 4, "w": 2.5}, + {"matrix": [4, 8], "x": 8.75, "y": 4, "w": 1.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} + ] + } + } + +} + diff --git a/keyboards/skyloong/gk61/v1/keymaps/default/keymap.c b/keyboards/skyloong/gk61/v1/keymaps/default/keymap.c new file mode 100644 index 0000000000..4ddb35f6f4 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong) + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, 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_SLASH, KC_RSFT, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(1) + ), + /* Fn+ */ + [_FN] = LAYOUT_all( + KC_ESC, 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_PSCR, + RGB_TOG, RGB_VAD, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, + RGB_MOD, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MNXT, KC_MPLY, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_UP, KC_RSFT, + KC_CALC, KC_MAIL, KC_NO, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO + ), + +}; + + diff --git a/keyboards/skyloong/gk61/v1/keymaps/via/keymap.c b/keyboards/skyloong/gk61/v1/keymaps/via/keymap.c new file mode 100644 index 0000000000..4ddb35f6f4 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong) + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, 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_SLASH, KC_RSFT, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(1) + ), + /* Fn+ */ + [_FN] = LAYOUT_all( + KC_ESC, 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_PSCR, + RGB_TOG, RGB_VAD, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, + RGB_MOD, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MNXT, KC_MPLY, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_UP, KC_RSFT, + KC_CALC, KC_MAIL, KC_NO, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO + ), + +}; + + diff --git a/keyboards/skyloong/gk61/v1/keymaps/via/rules.mk b/keyboards/skyloong/gk61/v1/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/skyloong/gk61/v1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/skyloong/gk61/v1/mcuconf.h b/keyboards/skyloong/gk61/v1/mcuconf.h new file mode 100644 index 0000000000..92905e0b11 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/mcuconf.h @@ -0,0 +1,21 @@ +/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong) + * + * 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_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/skyloong/gk61/v1/readme.md b/keyboards/skyloong/gk61/v1/readme.md new file mode 100644 index 0000000000..95917ad957 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/readme.md @@ -0,0 +1,33 @@ +# GK61 + +![GK61](https://i.imgur.com/hEufouph.jpg) + +## The PCB features: +* QMK & VIA compatibility +* RGB Matrix backlight + + +The following is the QMK Firmware for the Destop 60% keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd +* Keyboard Maintainer: [JZ-Skyloong](https://github.com/JZ-Skyloong) +* Hardware Supported: DestopPCB for Skyloong keylayout 60%, STM32F103C8T6 +* Hardware Availability: http://www.skyloong.com.cn + +Make example for this keyboard (after setting up your build environment): + + make skyloong/gk61/v1:default + make skyloong/gk61/v1:via + +Flashing example for this keyboard: + + make skyloong/gk61/v1:default:flash + make skyloong/gk61/v1:via: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/v1/rules.mk b/keyboards/skyloong/gk61/v1/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/skyloong/gk61/v1/v1.c b/keyboards/skyloong/gk61/v1/v1.c new file mode 100644 index 0000000000..5fed5701b2 --- /dev/null +++ b/keyboards/skyloong/gk61/v1/v1.c @@ -0,0 +1,119 @@ +/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong) + * + * 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 "quantum.h" + +#ifdef RGB_MATRIX_ENABLE + +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to CKLED2001 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C_1, B_1, A_1}, + {0, C_2, B_2, A_2}, + {0, C_3, B_3, A_3}, + {0, C_4, B_4, A_4}, + {0, C_5, B_5, A_5}, + {0, C_6, B_6, A_6}, + {0, C_7, B_7, A_7}, + {0, C_8, B_8, A_8}, + {0, C_9, B_9, A_9}, + {0, C_10, B_10, A_10}, + {0, C_11, B_11, A_11}, + {0, C_12, B_12, A_12}, + {0, C_13, B_13, A_13}, + {0, C_14, B_14, A_14}, + + + {0, F_1, E_1, D_1}, + {0, F_2, E_2, D_2}, + {0, F_3, E_3, D_3}, + {0, F_4, E_4, D_4}, + {0, F_5, E_5, D_5}, + {0, F_6, E_6, D_6}, + {0, F_7, E_7, D_7}, + {0, F_8, E_8, D_8}, + {0, F_9, E_9, D_9}, + {0, F_10, E_10, D_10}, + {0, F_11, E_11, D_11}, + {0, F_12, E_12, D_12}, + {0, F_13, E_13, D_13}, + {0, F_14, E_14, D_14}, + + + {0, I_1, H_1, G_1}, + {0, I_2, H_2, G_2}, + {0, I_3, H_3, G_3}, + {0, I_4, H_4, G_4}, + {0, I_5, H_5, G_5}, + {0, I_6, H_6, G_6}, + {0, I_7, H_7, G_7}, + {0, I_8, H_8, G_8}, + {0, I_9, H_9, G_9}, + {0, I_10, H_10, G_10}, + {0, I_11, H_11, G_11}, + {0, I_12, H_12, G_12}, + {0, I_13, H_13, G_13}, + + + + {0, L_1, K_1, J_1}, + {0, L_2, K_2, J_2}, + {0, L_3, K_3, J_3}, + {0, L_4, K_4, J_4}, + {0, L_5, K_5, J_5}, + {0, L_6, K_6, J_6}, + {0, L_7, K_7, J_7}, + {0, L_8, K_8, J_8}, + {0, L_9, K_9, J_9}, + {0, L_10, K_10, J_10}, + {0, L_11, K_11, J_11}, + {0, L_13, K_13, J_13}, + + {0, L_15, K_15, J_15}, + {0, L_16, K_16, J_16}, + {0, I_15, H_15, G_15}, + {0, I_16, H_16, G_16}, + {0, F_15, E_15, D_15}, + {0, F_16, E_16, D_16}, + {0, C_15, B_15, A_15}, + {0, C_16, B_16, A_16}, + {0, I_14, H_14, G_14}, + {0, L_12, K_12, J_12}, + {0, L_14, K_14, J_14}, + + +}; +#endif // RGB_MATRIX_ENABLE + +void suspend_power_down_kb() { + writePinLow(SDB); + + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb() { + writePinHigh(SDB); + + suspend_wakeup_init_user(); +} + +void board_init(void) { + setPinOutput(SDB); + writePinHigh(SDB); +} -- cgit v1.2.3 From c0f16be50fec33cdb30386ac512efb900f3f7470 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 4 Oct 2023 20:10:05 +1100 Subject: Rename CKLED2001 driver to SNLED27351 (#22071) --- keyboards/skyloong/gk61/v1/config.h | 17 ++--------------- keyboards/skyloong/gk61/v1/info.json | 2 +- keyboards/skyloong/gk61/v1/v1.c | 4 ++-- 3 files changed, 5 insertions(+), 18 deletions(-) (limited to 'keyboards/skyloong') diff --git a/keyboards/skyloong/gk61/v1/config.h b/keyboards/skyloong/gk61/v1/config.h index f648bf80d4..153bd8d0eb 100644 --- a/keyboards/skyloong/gk61/v1/config.h +++ b/keyboards/skyloong/gk61/v1/config.h @@ -15,22 +15,9 @@ */ #pragma once -/* - * RGB matrix driver config (CKLED2001) - * - * This is a 7-bit address, that gets left-shifted and bit 0 - * set to 0 for write, 1 for read (as per I2C protocol) - * The address will vary depending on your wiring: - * 00 <-> GND - * 01 <-> SCL - * 10 <-> SDA - * 11 <-> VCC - * ADDR/CS represents A1:A0 of the 7-bit address. - * The result is: 0b11101(ADDR/CS) - */ -#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND -#define DRIVER_COUNT 1 +#define SNLED27351_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 64 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS //Enable frame effects diff --git a/keyboards/skyloong/gk61/v1/info.json b/keyboards/skyloong/gk61/v1/info.json index 8e30cc3bc0..6015efa12c 100644 --- a/keyboards/skyloong/gk61/v1/info.json +++ b/keyboards/skyloong/gk61/v1/info.json @@ -42,7 +42,7 @@ "splash": true, "solid_splash": true }, - "driver": "ckled2001", + "driver": "snled27351", "hue_steps": 20, "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, diff --git a/keyboards/skyloong/gk61/v1/v1.c b/keyboards/skyloong/gk61/v1/v1.c index 5fed5701b2..cb3772f6b4 100644 --- a/keyboards/skyloong/gk61/v1/v1.c +++ b/keyboards/skyloong/gk61/v1/v1.c @@ -17,8 +17,8 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to CKLED2001 manual for these locations +const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to SNLED27351 manual for these locations * driver * | R location * | | G location -- cgit v1.2.3 From ed78c13b5f33c9143ad83d0a1695f63f92163b92 Mon Sep 17 00:00:00 2001 From: skyloong <92424712+JZ-Skyloong@users.noreply.github.com> Date: Fri, 13 Oct 2023 05:22:36 +0800 Subject: [Keyboard] Skyloong GK61 PRO (#21450) * Add GK61 PRO keyboard * Update info.json regarding to dunk2k suggestion * Update keymap files regarding to dunk2k suggestion * Update keyboards/skyloong/gk61/pro/config.h OK, thanks for your suggestion. * Update keyboards/skyloong/gk61/pro/keymaps/default/keymap.c OK, thanks. * Update keyboards/skyloong/gk61/pro/keymaps/via/keymap.c OK, thanks. * Update keyboards/skyloong/gk61/pro/rules.mk OK, thank you for your suggestion. * Update keyboards/skyloong/gk61/pro/info.json OK,thanks. * Update keyboards/skyloong/gk61/pro/keymaps/default/keymap.c OK, thanks. * Update keyboards/skyloong/gk61/pro/info.json I see , thanks for your guidance. * Update keyboards/skyloong/gk61/pro/config.h OK, thank you. * Update keyboards/skyloong/gk61/pro/info.json OK, thank you for your suggestion. * Update keyboards/skyloong/gk61/pro/info.json I see, thank you. * Update keyboards/skyloong/gk61/pro/config.h OK, thank you for your suggestion. * Update keyboards/skyloong/gk61/pro/pro.c I see , thank you. * Correct PCB feature description in readme. * Update keyboards/skyloong/gk61/pro/config.h It doesn't seem to be a problem to compile without defining DRIVER_COUNT. Thank you for your rigor and seriousness. * Update keyboards/skyloong/gk61/pro/keymaps/default/keymap.c OK, thank you. * update config.h to define __flash. * Update keyboards/skyloong/gk61/pro/config.h I see, thanks for your suggestion. * add hardware availabilty international website * update via/rules.mk for encoder map * Revert "update via/rules.mk for encoder map" This reverts commit 66601242af3df8aecc747e790d7649970c12a443. * Update keyboards/skyloong/gk61/pro/config.h OK, thanks. * Update rules.mk Enable the encoder map. * 1.update readme to correct mcu type ; 2. update pro.c to improve indicator function. * update pro.c and config.h to save power when USB suspend. * update info.json * Update RGB animations---delete rainbow_beacon and rainbow_pinwheels * Update keymap.c and layer indication. * Enable I2C DMA * Update keyboards/skyloong/gk61/pro/info.json OK,Thank you for your suggestion. * Update keyboards/skyloong/gk61/pro/info.json OK,Thanks. * enable encoder map in default keymaps * Update keyboards/skyloong/gk61/pro/info.json OK. Thank you for your suggestion. --- keyboards/skyloong/gk61/pro/config.h | 21 ++ keyboards/skyloong/gk61/pro/halconf.h | 7 + keyboards/skyloong/gk61/pro/info.json | 338 +++++++++++++++++++++ .../skyloong/gk61/pro/keymaps/default/keymap.c | 44 +++ .../skyloong/gk61/pro/keymaps/default/rules.mk | 1 + keyboards/skyloong/gk61/pro/keymaps/via/keymap.c | 67 ++++ keyboards/skyloong/gk61/pro/keymaps/via/rules.mk | 2 + keyboards/skyloong/gk61/pro/mcuconf.h | 11 + keyboards/skyloong/gk61/pro/pro.c | 235 ++++++++++++++ keyboards/skyloong/gk61/pro/readme.md | 33 ++ keyboards/skyloong/gk61/pro/rules.mk | 1 + 11 files changed, 760 insertions(+) create mode 100644 keyboards/skyloong/gk61/pro/config.h create mode 100644 keyboards/skyloong/gk61/pro/halconf.h create mode 100644 keyboards/skyloong/gk61/pro/info.json create mode 100644 keyboards/skyloong/gk61/pro/keymaps/default/keymap.c create mode 100644 keyboards/skyloong/gk61/pro/keymaps/default/rules.mk create mode 100644 keyboards/skyloong/gk61/pro/keymaps/via/keymap.c create mode 100644 keyboards/skyloong/gk61/pro/keymaps/via/rules.mk create mode 100644 keyboards/skyloong/gk61/pro/mcuconf.h create mode 100644 keyboards/skyloong/gk61/pro/pro.c create mode 100644 keyboards/skyloong/gk61/pro/readme.md create mode 100644 keyboards/skyloong/gk61/pro/rules.mk (limited to 'keyboards/skyloong') diff --git a/keyboards/skyloong/gk61/pro/config.h b/keyboards/skyloong/gk61/pro/config.h new file mode 100644 index 0000000000..4d180bb662 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/config.h @@ -0,0 +1,21 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + + +#define DRIVER_COUNT 1 +#define RGB_MATRIX_LED_COUNT 64 +#define CAPS_LOCK_INDEX 28 +#define WIN_MOD_INDEX 16 +#define MAC_MOD_INDEX 17 +#define WIN_LOCK_INDEX 54 +#define SDB C1 //RGB matrix Power control PIN + +/* RGB Matrix Animation modes. Explicitly enabled + * For full list of effects, see: + * https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects + */ + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS diff --git a/keyboards/skyloong/gk61/pro/halconf.h b/keyboards/skyloong/gk61/pro/halconf.h new file mode 100644 index 0000000000..5ac56913fc --- /dev/null +++ b/keyboards/skyloong/gk61/pro/halconf.h @@ -0,0 +1,7 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/skyloong/gk61/pro/info.json b/keyboards/skyloong/gk61/pro/info.json new file mode 100644 index 0000000000..7d507f1e8c --- /dev/null +++ b/keyboards/skyloong/gk61/pro/info.json @@ -0,0 +1,338 @@ +{ + "manufacturer": "skyloong", + "keyboard_name": "gk61 pro", + "maintainer": "linlin012", + "bootloader": "stm32duino", + + "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + {"pin_a": "C5", "pin_b": "C4", "resolution": 2} + ] + }, + "features": { + "bootmagic": true, + "command": true, + "console": false, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "build": { + "debounce_type": "asym_eager_defer_pk" + }, + "matrix_pins": { + "cols": ["B11", "C6", "C7", "B12", "B13", "B14", "B15", "B10", "B1", "B0", "D2", "B3", "B4", "B5"], + "rows": ["A15", "C10", "C11", "C12", "A3"] + }, + "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": "is31fl3743a", + "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, 6], "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": "0x6A61", + "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.5, "h": 0.5, "w": 2.5}, + {"matrix": [4, 5], "x": 3.75, "y": 4, "h": 0.5, "w":6.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5, "h": 0.5, "w":1.25}, + {"matrix": [4, 8], "x": 7.5, "y": 4.5, "h": 0.5, "w": 2.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": 2.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25}, + {"matrix": [4, 8], "x": 7.5, "y": 4, "w": 2.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} + ] + } + } +} diff --git a/keyboards/skyloong/gk61/pro/keymaps/default/keymap.c b/keyboards/skyloong/gk61/pro/keymaps/default/keymap.c new file mode 100644 index 0000000000..9534f25d80 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +// 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_MUTE, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) } +}; +#endif + diff --git a/keyboards/skyloong/gk61/pro/keymaps/default/rules.mk b/keyboards/skyloong/gk61/pro/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/skyloong/gk61/pro/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro/keymaps/via/keymap.c new file mode 100644 index 0000000000..e16bcc7105 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/keymaps/via/keymap.c @@ -0,0 +1,67 @@ +// Copyright 2021 JZ-Skyloong (@JZ-Skyloong) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layer_names { + _WIN, + _MAC, + _WIN_INDEX, + _MAC_INDEX +}; + +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│ │Mo3| + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [_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, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_MUTE, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(_WIN_INDEX) + ), + + [_MAC] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, MO(_MAC_INDEX) + ), + + [_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), LSG(KC_4), 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, _______ + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_WIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_MAC] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_WIN_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }, + [_MAC_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) } +}; +#endif diff --git a/keyboards/skyloong/gk61/pro/keymaps/via/rules.mk b/keyboards/skyloong/gk61/pro/keymaps/via/rules.mk new file mode 100644 index 0000000000..f1adcab005 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/skyloong/gk61/pro/mcuconf.h b/keyboards/skyloong/gk61/pro/mcuconf.h new file mode 100644 index 0000000000..91dde6cc42 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_I2C_USE_DMA +#define STM32_I2C_USE_DMA TRUE diff --git a/keyboards/skyloong/gk61/pro/pro.c b/keyboards/skyloong/gk61/pro/pro.c new file mode 100644 index 0000000000..1936964b32 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/pro.c @@ -0,0 +1,235 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "quantum.h" +int FN_WIN = 0; +int FN_MAC = 0; +int L_WIN = 0; +int L_MAC = 0; + +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to IS31 manual for these 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} +}; + +#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ + +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; +# 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; + } + +} + +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); + } + } + + switch (get_highest_layer(layer_state)) { + 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; + + + 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; + + 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 false; +} + +#endif + +void suspend_power_down_kb() { +# ifdef RGB_MATRIX_ENABLE + writePinLow(SDB); +# endif + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb() { +# ifdef RGB_MATRIX_ENABLE + writePinHigh(SDB); +# endif + suspend_wakeup_init_user(); +} + +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/readme.md b/keyboards/skyloong/gk61/pro/readme.md new file mode 100644 index 0000000000..529f6f32c4 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/readme.md @@ -0,0 +1,33 @@ +# GK61 PRO + +![GK61 PRO](https://i.imgur.com/DTetyVLh.jpg) + +## The PCB features: +* QMK & VIA compatibility +* RGB Matrix backlight +* The space bar position switch can be interchanged with encoder module. + + +The following is the QMK Firmware for the Destop 60% keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd + +* Keyboard Maintainer: [linlin012](https://github.com/linlin012) +* Hardware Supported: DestopPCB for Skyloong keylayout 60%, STM32F103R8T6 +* 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:default + +Flashing example for this keyboard: + + make skyloong/gk61/pro: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/rules.mk b/keyboards/skyloong/gk61/pro/rules.mk new file mode 100644 index 0000000000..3bbd261429 --- /dev/null +++ b/keyboards/skyloong/gk61/pro/rules.mk @@ -0,0 +1 @@ +# File intentionally blank -- cgit v1.2.3 From f150258e5ab6bf04c2e724389465f7a8ef5759ef Mon Sep 17 00:00:00 2001 From: skyloong <92424712+JZ-Skyloong@users.noreply.github.com> Date: Fri, 13 Oct 2023 12:59:10 +0800 Subject: [Keyboard] Skyloong GK61 Pro 48 (#21654) * Create GK61 PRO_48 Keyboard. * update pro.c and config.h to save power when USB suspend. * Update keyboards/skyloong/gk61/pro_48/info.json OK,thank you. * update info.json * update layer indicator * Update RGB animations---delete rainbow_beacon and rainbo_pinwheels. * Cancel force_nkro * Add caps lock indicator in rgb matrix. * Update keyboards/skyloong/gk61/pro_48/pro_48.c OK, thank you for your suggestion. * Enable I2C DMA; Modified pro_48.c * Update keyboards/skyloong/gk61/pro_48/info.json OK, thank you for your suggestion. * Update keyboards/skyloong/gk61/pro_48/info.json OK, thanks. * enable encoder map in default keymap. * define g_suspend_state --- keyboards/skyloong/gk61/pro_48/config.h | 18 ++ keyboards/skyloong/gk61/pro_48/halconf.h | 7 + keyboards/skyloong/gk61/pro_48/info.json | 338 +++++++++++++++++++++ .../skyloong/gk61/pro_48/keymaps/default/keymap.c | 44 +++ .../skyloong/gk61/pro_48/keymaps/default/rules.mk | 1 + .../skyloong/gk61/pro_48/keymaps/via/keymap.c | 68 +++++ .../skyloong/gk61/pro_48/keymaps/via/rules.mk | 2 + keyboards/skyloong/gk61/pro_48/mcuconf.h | 11 + keyboards/skyloong/gk61/pro_48/pro_48.c | 227 ++++++++++++++ keyboards/skyloong/gk61/pro_48/readme.md | 33 ++ keyboards/skyloong/gk61/pro_48/rules.mk | 1 + 11 files changed, 750 insertions(+) create mode 100644 keyboards/skyloong/gk61/pro_48/config.h create mode 100644 keyboards/skyloong/gk61/pro_48/halconf.h create mode 100644 keyboards/skyloong/gk61/pro_48/info.json create mode 100644 keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c create mode 100644 keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk create mode 100644 keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c create mode 100644 keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk create mode 100644 keyboards/skyloong/gk61/pro_48/mcuconf.h create mode 100644 keyboards/skyloong/gk61/pro_48/pro_48.c create mode 100644 keyboards/skyloong/gk61/pro_48/readme.md create mode 100644 keyboards/skyloong/gk61/pro_48/rules.mk (limited to 'keyboards/skyloong') diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h new file mode 100644 index 0000000000..dc31521627 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/config.h @@ -0,0 +1,18 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + + +#define DRIVER_COUNT 1 +#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 g_suspend_state rgb_matrix_get_suspend_state() diff --git a/keyboards/skyloong/gk61/pro_48/halconf.h b/keyboards/skyloong/gk61/pro_48/halconf.h new file mode 100644 index 0000000000..5ac56913fc --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/halconf.h @@ -0,0 +1,7 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json new file mode 100644 index 0000000000..0e49e005aa --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/info.json @@ -0,0 +1,338 @@ +{ + "manufacturer": "skyloong", + "keyboard_name": "gk61 pro 48", + "maintainer": "NaturalZh", + "bootloader": "stm32duino", + + "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + {"pin_a": "A2", "pin_b": "A3", "resolution": 2} + ] + }, + "features": { + "bootmagic": true, + "command": true, + "console": false, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "build": { + "debounce_type": "asym_eager_defer_pk" + }, + "matrix_pins": { + "cols": ["B13", "A0", "A1", "B14", "B15", "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": "is31fl3743a", + "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, 6], "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": "0x6A62", + "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.5, "w": 2.5, "h": 0.5}, + {"matrix": [4, 5], "x": 3.75, "y": 4, "h": 0.5, "w":6.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5, "h": 0.5, "w":1.25}, + {"matrix": [4, 8], "x": 7.5, "y": 4.5, "w": 2.5, "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": 2.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25}, + {"matrix": [4, 8], "x": 7.5, "y": 4, "w": 2.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} + ] + } + } +} diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c b/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c new file mode 100644 index 0000000000..9534f25d80 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +// 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_MUTE, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) } +}; +#endif + diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk b/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c new file mode 100644 index 0000000000..e63830f519 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c @@ -0,0 +1,68 @@ +// Copyright 2021 JZ-Skyloong (@JZ-Skyloong) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layer_names { + _WIN, + _MAC, + _WIN_INDEX, + _MAC_INDEX +}; + +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, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_MUTE, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(_WIN_INDEX) + ), + + [_MAC] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, MO(_MAC_INDEX) + ), + + [_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), LSG(KC_4), 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, _______ + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_WIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_MAC] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_WIN_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }, + [_MAC_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) } +}; +#endif + diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk b/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk new file mode 100644 index 0000000000..f1adcab005 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/skyloong/gk61/pro_48/mcuconf.h b/keyboards/skyloong/gk61/pro_48/mcuconf.h new file mode 100644 index 0000000000..91dde6cc42 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_I2C_USE_DMA +#define STM32_I2C_USE_DMA TRUE diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c new file mode 100644 index 0000000000..e4f64c022f --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/pro_48.c @@ -0,0 +1,227 @@ +// Copyright 2023 linlin012 (@linlin012) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "quantum.h" +_Bool FN_WIN = 0; +_Bool FN_MAC = 0; +_Bool L_WIN = 0; +_Bool L_MAC = 0; + +#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/ +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to IS31 manual for these 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); + } + } + + 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 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 + +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; +# 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; + } +} + +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_48/readme.md b/keyboards/skyloong/gk61/pro_48/readme.md new file mode 100644 index 0000000000..babfec4a3b --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/readme.md @@ -0,0 +1,33 @@ +# GK61 PRO 48 + +![GK61 PRO](https://i.imgur.com/DTetyVLh.jpg) + +## The PCB features: +* QMK & VIA compatibility +* RGB Matrix backlight +* The space bar position switch can be interchanged with encoder module. + + +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_48:default + +Flashing example for this keyboard: + + make skyloong/gk61/pro_48: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_48/rules.mk b/keyboards/skyloong/gk61/pro_48/rules.mk new file mode 100644 index 0000000000..3bbd261429 --- /dev/null +++ b/keyboards/skyloong/gk61/pro_48/rules.mk @@ -0,0 +1 @@ +# File intentionally blank -- cgit v1.2.3 From d56ee70c524b4fc4d1638e5e8c4bdeb89e752993 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 21 Oct 2023 21:41:59 +1000 Subject: Rename `DRIVER_ADDR_n` defines (#22200) Co-authored-by: Nick Brassel --- keyboards/skyloong/gk61/v1/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/skyloong') diff --git a/keyboards/skyloong/gk61/v1/config.h b/keyboards/skyloong/gk61/v1/config.h index 153bd8d0eb..c274ffa1fb 100644 --- a/keyboards/skyloong/gk61/v1/config.h +++ b/keyboards/skyloong/gk61/v1/config.h @@ -15,7 +15,7 @@ */ #pragma once -#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND +#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND #define SNLED27351_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 64 -- cgit v1.2.3 From b35bac6afbadc88cf6e8e3d1c8cc7494a510bb60 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 22 Nov 2023 21:37:32 +0000 Subject: Remove unnecessary driver counts (#22435) --- keyboards/skyloong/gk61/pro/config.h | 2 -- keyboards/skyloong/gk61/pro_48/config.h | 2 -- keyboards/skyloong/gk61/v1/config.h | 1 - 3 files changed, 5 deletions(-) (limited to 'keyboards/skyloong') diff --git a/keyboards/skyloong/gk61/pro/config.h b/keyboards/skyloong/gk61/pro/config.h index 4d180bb662..8e9b5f9258 100644 --- a/keyboards/skyloong/gk61/pro/config.h +++ b/keyboards/skyloong/gk61/pro/config.h @@ -3,8 +3,6 @@ #pragma once - -#define DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 64 #define CAPS_LOCK_INDEX 28 #define WIN_MOD_INDEX 16 diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h index dc31521627..df94455a9e 100644 --- a/keyboards/skyloong/gk61/pro_48/config.h +++ b/keyboards/skyloong/gk61/pro_48/config.h @@ -3,8 +3,6 @@ #pragma once - -#define DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 64 #define CAPS_LOCK_INDEX 28 #define WIN_MOD_INDEX 16 diff --git a/keyboards/skyloong/gk61/v1/config.h b/keyboards/skyloong/gk61/v1/config.h index c274ffa1fb..bd9cab743f 100644 --- a/keyboards/skyloong/gk61/v1/config.h +++ b/keyboards/skyloong/gk61/v1/config.h @@ -17,7 +17,6 @@ #define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND -#define SNLED27351_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 64 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS //Enable frame effects -- cgit v1.2.3