From 722bda1daa15e7c3b928e495dd637baaea300d85 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Wed, 15 Nov 2023 22:05:59 +0000 Subject: [PATCH 01/27] Added support for RK61-RGB --- keyboards/royal_kludge/rk61_rgb/config.h | 29 +++ keyboards/royal_kludge/rk61_rgb/config_led.c | 59 ++++++ keyboards/royal_kludge/rk61_rgb/config_led.h | 37 ++++ keyboards/royal_kludge/rk61_rgb/info.json | 192 ++++++++++++++++++ .../rk61_rgb/keymaps/default/keymap.c | 58 ++++++ .../rk61_rgb/keymaps/via/config.h | 20 ++ .../rk61_rgb/keymaps/via/keymap.c | 57 ++++++ .../rk61_rgb/keymaps/via/rk61-rgb_via.json | 16 ++ .../rk61_rgb/keymaps/via/rules.mk | 2 + keyboards/royal_kludge/rk61_rgb/rules.mk | 5 + 10 files changed, 475 insertions(+) create mode 100644 keyboards/royal_kludge/rk61_rgb/config.h create mode 100644 keyboards/royal_kludge/rk61_rgb/config_led.c create mode 100644 keyboards/royal_kludge/rk61_rgb/config_led.h create mode 100644 keyboards/royal_kludge/rk61_rgb/info.json create mode 100644 keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c create mode 100755 keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h create mode 100644 keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c create mode 100644 keyboards/royal_kludge/rk61_rgb/keymaps/via/rk61-rgb_via.json create mode 100644 keyboards/royal_kludge/rk61_rgb/keymaps/via/rules.mk create mode 100644 keyboards/royal_kludge/rk61_rgb/rules.mk diff --git a/keyboards/royal_kludge/rk61_rgb/config.h b/keyboards/royal_kludge/rk61_rgb/config.h new file mode 100644 index 000000000000..4612e79c223a --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/config.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2023 Benjamín Ausensi + * + * 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 configuration can't be fully expressed in JSON as of now */ +#define RGB_MATRIX_LED_COUNT 61 +//#define SN32_RGB_MATRIX_ROW_PINS { C5, C4, C6, C8, C7, C9, C11, C10, C12, C14, C13, B13, B15, D3, B14 } +#define SN32_RGB_MATRIX_ROW_PINS { C5, C6, C4, C8, C9, C7, C11, C12, C10, C14, B13, C13, B15, B14, D3 } + +/* Enable additional RGB effects */ +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES + +/* Configure the effects: */ +#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50 \ No newline at end of file diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.c b/keyboards/royal_kludge/rk61_rgb/config_led.c new file mode 100644 index 000000000000..d4b6016d9e16 --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/config_led.c @@ -0,0 +1,59 @@ +/* +Copyright 2020 euwbah + +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 . +*/ + +#ifdef RGB_MATRIX_ENABLE + +#include QMK_KEYBOARD_H + +# include "rgb_matrix.h" +# include "config_led.h" + +led_config_t g_led_config = { + { + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,}, + {14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,}, + {28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NO_LED, 40,}, + {41, NO_LED, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, NO_LED,}, + {53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, 59, NO_LED, 60,} + }, + { + {8, 0}, {24, 0}, {39, 0}, {55, 0}, {70, 0}, {86, 0}, {101, 0}, {117, 0}, {132, 0}, {148, 0}, {164, 0}, {180, 0}, {195, 0}, {218, 0}, + {11, 16}, {31, 16}, {47, 16}, {62, 16}, {78, 16}, {93, 16}, {109, 16}, {124, 16}, {140, 16}, {155, 16}, {171, 16}, {186, 16}, {202, 16}, {221, 16}, + {13, 32}, {34, 32}, {50, 32}, {65, 32}, {81, 32}, {96, 32}, {112, 32}, {128, 32}, {143, 32}, {159, 32}, {174, 32}, {190, 32}, {215, 32}, + {17, 48}, {42, 48}, {57, 48}, {73, 48}, {88, 48}, {104, 48}, {119, 48}, {135, 48}, {150, 48}, {166, 48}, {182, 48}, {211, 48}, + {10, 64}, {29, 64}, {49, 64}, {107, 64}, {165, 64}, {185, 64}, {204, 64}, {224, 64}, + }, + { + 4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4, + 4, + } +}; + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + // Set capslock key to orange (capslock is led number 28) + rgb_matrix_set_color(28, 255, 130, 15); + } + return false; +} + +#endif diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.h b/keyboards/royal_kludge/rk61_rgb/config_led.h new file mode 100644 index 000000000000..17eb50db6849 --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/config_led.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 euwbah + +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 + +// Backlight configuration +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define LED_MATRIX_ROWS 5 +#define LED_MATRIX_ROW_CHANNELS 3 +#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS) +#define LED_MATRIX_ROW_PINS { C5, C4, C6, C8, C7, C9, C11, C10, C12, C14, C13, B13, B15, D3, B14 } + +#define LED_MATRIX_COLS 14 +#define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 } + +#define DRIVER_LED_TOTAL (70) diff --git a/keyboards/royal_kludge/rk61_rgb/info.json b/keyboards/royal_kludge/rk61_rgb/info.json new file mode 100644 index 000000000000..f180d92f0572 --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/info.json @@ -0,0 +1,192 @@ +{ + "keyboard_name": "RK61-RGB", + "manufacturer": "Royal Kludge", + "url": "http://en.rkgaming.com", + "maintainer": "fpb", + "bootloader": "sn32-dfu", + + "processor": "SN32F248BF", + "usb": { + "vid": "0x0C45", + "pid": "0x024F", + "device_version": "1.0.0", + "force_nkro": true + }, + + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": true, + "rgb_matrix": true + }, + + "debounce": 5, + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": [ "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "B0", "B1", "B2", "B3", "B4", "B5" ], + "rows": [ "D11", "D10", "D9", "D8", "D7" ] + }, + + + "rgb_matrix": { + "animations": { + "band_val" : true, + "breathing" : true, + "cycle_left_right" : true, + "cycle_pinwheel" : true, + "cycle_spiral" : true, + "digital_rain" : true, + "gradient_left_right" : true, + "gradient_up_down" : true, + "raindrops" : true, + "solid_reactive_simple" : true, + "splash" : true, + "typing_heatmap" : true, + }, + "driver": "sn32f24xb", + "layout": [ + { "matrix":[0, 0], "flags":4, "x":0, "y":0 }, + { "matrix":[0, 1], "flags":4, "x":16, "y":0 }, + { "matrix":[0, 2], "flags":4, "x":32, "y":0 }, + { "matrix":[0, 3], "flags":4, "x":48, "y":0 }, + { "matrix":[0, 4], "flags":4, "x":64, "y":0 }, + { "matrix":[0, 5], "flags":4, "x":80, "y":0 }, + { "matrix":[0, 6], "flags":4, "x":96, "y":0 }, + { "matrix":[0, 7], "flags":4, "x":112, "y":0 }, + { "matrix":[0, 8], "flags":4, "x":128, "y":0 }, + { "matrix":[0, 9], "flags":4, "x":144, "y":0 }, + { "matrix":[0, 10], "flags":4, "x":160, "y":0 }, + { "matrix":[0, 11], "flags":4, "x":176, "y":0 }, + { "matrix":[0, 12], "flags":4, "x":192, "y":0 }, + { "matrix":[0, 13], "flags":4, "x":208, "y":0 }, + + { "matrix":[1, 0], "flags":4, "x":4, "y":16 }, + { "matrix":[1, 1], "flags":4, "x":24, "y":16 }, + { "matrix":[1, 2], "flags":4, "x":40, "y":16 }, + { "matrix":[1, 3], "flags":4, "x":56, "y":16 }, + { "matrix":[1, 4], "flags":4, "x":72, "y":16 }, + { "matrix":[1, 5], "flags":4, "x":88, "y":16 }, + { "matrix":[1, 6], "flags":4, "x":104, "y":16 }, + { "matrix":[1, 7], "flags":4, "x":120, "y":16 }, + { "matrix":[1, 8], "flags":4, "x":136, "y":16 }, + { "matrix":[1, 9], "flags":4, "x":152, "y":16 }, + { "matrix":[1, 10], "flags":4, "x":168, "y":16 }, + { "matrix":[1, 11], "flags":4, "x":184, "y":16 }, + { "matrix":[1, 12], "flags":4, "x":200, "y":16 }, + { "matrix":[1, 13], "flags":4, "x":216, "y":16 }, + + { "matrix":[2, 0], "flags":4, "x":6, "y":32 }, + { "matrix":[2, 1], "flags":4, "x":28, "y":32 }, + { "matrix":[2, 2], "flags":4, "x":44, "y":32 }, + { "matrix":[2, 3], "flags":4, "x":60, "y":32 }, + { "matrix":[2, 4], "flags":4, "x":76, "y":32 }, + { "matrix":[2, 5], "flags":4, "x":92, "y":32 }, + { "matrix":[2, 6], "flags":4, "x":108, "y":32 }, + { "matrix":[2, 7], "flags":4, "x":124, "y":32 }, + { "matrix":[2, 8], "flags":4, "x":140, "y":32 }, + { "matrix":[2, 9], "flags":4, "x":156, "y":32 }, + { "matrix":[2, 10], "flags":4, "x":172, "y":32 }, + { "matrix":[2, 11], "flags":4, "x":188, "y":32 }, + { "matrix":[2, 13], "flags":4, "x":204, "y":32 }, + + { "matrix":[3, 0], "flags":4, "x":10, "y":48 }, + { "matrix":[3, 2], "flags":4, "x":36, "y":48 }, + { "matrix":[3, 3], "flags":4, "x":52, "y":48 }, + { "matrix":[3, 4], "flags":4, "x":68, "y":48 }, + { "matrix":[3, 5], "flags":4, "x":84, "y":48 }, + { "matrix":[3, 6], "flags":4, "x":100, "y":48 }, + { "matrix":[3, 7], "flags":4, "x":116, "y":48 }, + { "matrix":[3, 8], "flags":4, "x":132, "y":48 }, + { "matrix":[3, 9], "flags":4, "x":148, "y":48 }, + { "matrix":[3, 10], "flags":4, "x":164, "y":48 }, + { "matrix":[3, 11], "flags":4, "x":180, "y":48 }, + { "matrix":[3, 13], "flags":4, "x":196, "y":48 }, + + { "matrix":[4, 0], "flags":4, "x":2, "y":64 }, + { "matrix":[4, 1], "flags":4, "x":22, "y":64 }, + { "matrix":[4, 2], "flags":4, "x":42, "y":64 }, + { "matrix":[4, 6], "flags":4, "x":102, "y":64 }, + { "matrix":[4, 10], "flags":4, "x":162, "y":64 }, + { "matrix":[4, 11], "flags":4, "x":182, "y":64 }, + { "matrix":[4, 12], "flags":4, "x":202, "y":64 }, + { "matrix":[4, 13], "flags":4, "x":222, "y":64 } + ] + }, + + "layouts": { + "LAYOUT_60_ansi": { + "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":[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, 2], "x":2.25, "y":3 }, + { "matrix":[3, 3], "x":3.25, "y":3 }, + { "matrix":[3, 4], "x":4.25, "y":3 }, + { "matrix":[3, 5], "x":5.25, "y":3 }, + { "matrix":[3, 6], "x":6.25, "y":3 }, + { "matrix":[3, 7], "x":7.25, "y":3 }, + { "matrix":[3, 8], "x":8.25, "y":3 }, + { "matrix":[3, 9], "x":9.25, "y":3 }, + { "matrix":[3, 10], "x":10.25, "y":3 }, + { "matrix":[3, 11], "x":11.25, "y":3 }, + { "matrix":[3, 13], "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, 6], "x":3.75, "y":4, "w":6.25 }, + { "matrix":[4, 10], "x":10, "y":4, "w":1.25 }, + { "matrix":[4, 11], "x":11.25, "y":4, "w":1.25 }, + { "matrix":[4, 12], "x":12.5, "y":4, "w":1.25 }, + { "matrix":[4, 13], "x":13.75, "y":4, "w":1.25 } + ] + } + } +} diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..e22ceaf0ae2b --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +/* Copyright (C) 2023 Benjamín Ausensi + * + * 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 + +enum layer_names { + _MAC_BASE, + _MAC_FN, + _WIN_BASE, + _WIN_FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAC_BASE] = { + { 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_NO, KC_ENT, }, + { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, + { KC_LCTL, KC_LALT, KC_LCMD, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RCMD, KC_RALT, KC_RCTL, KC_NO, MO(_MAC_FN), } + }, + [_MAC_FN] = { + { 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, }, + { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, + { QK_BOOT, DF(_WIN_BASE), KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } + }, + [_WIN_BASE] = { + { 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_NO, KC_ENT, }, + { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, + { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RALT, KC_APP, KC_RCTL, KC_NO, MO(_WIN_FN), } + }, + [_WIN_FN] = { + { 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, }, + { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, + { QK_BOOT, KC_NO, DF(_MAC_BASE), KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } + } + +}; + +/* vim: set noai ts=4 sw=4: */ diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h b/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h new file mode 100755 index 000000000000..0726eda8b596 --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* Copyright (C) 2023 Benjamín Ausensi + * + * 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 + +/* Enable VIA RGB matrix and configure EEPROM emulation for VIA */ +#define VIA_QMK_RGBLIGHT_ENABLE diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..4b978c313298 --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c @@ -0,0 +1,57 @@ +/* Copyright (C) 2023 Benjamín Ausensi + * + * 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 + +enum layer_names { + _MAC_BASE, + _MAC_FN, + _WIN_BASE, + _WIN_FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAC_BASE] = { + { 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_NO, KC_ENT, }, + { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, + { KC_LCTL, KC_LALT, KC_LCMD, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RCMD, KC_RALT, KC_RCTL, KC_NO, MO(_MAC_FN), } + }, + [_MAC_FN] = { + { 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, }, + { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, + { QK_BOOT, DF(_WIN_BASE), KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } + }, + [_WIN_BASE] = { + { 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_NO, KC_ENT, }, + { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, + { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RALT, KC_APP, KC_RCTL, KC_NO, MO(_WIN_FN), } + }, + [_WIN_FN] = { + { 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, }, + { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, + { QK_BOOT, KC_NO, DF(_MAC_BASE), KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } + } +}; + +/* vim: set noai ts=4 sw=4: */ diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/rk61-rgb_via.json b/keyboards/royal_kludge/rk61_rgb/keymaps/via/rk61-rgb_via.json new file mode 100644 index 000000000000..b305b260f4fa --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/rk61-rgb_via.json @@ -0,0 +1,16 @@ +{ + "name": "Royal Kludge RK61 RGB", + "vendorId": "0x0C45", + "productId": "0x024F", + "menus": ["qmk_rgb_matrix"], + "matrix": {"rows": 5, "cols": 14}, + "layouts": { + "keymap": [ + [ "0,0", "0,1", "0,2", "0,3", "0,4", "0,5", "0,6", "0,7", "0,8", "0,9", "0,10", "0,11", "0,12", {"w":2}, "0,13" ], + [ {"w":1.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w":1.5}, "1,13" ], + [ {"w":1.75}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", {"w":2.25}, "2,13" ], + [ {"w":2.25}, "3,0", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w":2.75}, "3,12" ], + [ {"w":1.25}, "4,0", {"w":1.25}, "4,1", {"w":1.25},"4,2", {"w":6.25}, "4,6", {"w":1.25},"4,9", {"w":1.25},"4,10", {"w":1.25},"4,11", {"w":1.25},"4,13" ] + ] + } +} \ No newline at end of file diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/rules.mk b/keyboards/royal_kludge/rk61_rgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..eb5b445ddf1a --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = yes diff --git a/keyboards/royal_kludge/rk61_rgb/rules.mk b/keyboards/royal_kludge/rk61_rgb/rules.mk new file mode 100644 index 000000000000..a330b03a2c39 --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/rules.mk @@ -0,0 +1,5 @@ +# Data-driven structure doesn't support EEPROM yet +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = sn32_flash + +SRC += config_led.c From 2cb66392c03430479d41649b692e25ba16344a70 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Wed, 15 Nov 2023 22:33:40 +0000 Subject: [PATCH 02/27] Added readme.md --- keyboards/royal_kludge/rk61_rgb/readme.md | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 keyboards/royal_kludge/rk61_rgb/readme.md diff --git a/keyboards/royal_kludge/rk61_rgb/readme.md b/keyboards/royal_kludge/rk61_rgb/readme.md new file mode 100644 index 000000000000..26a6aa5e0293 --- /dev/null +++ b/keyboards/royal_kludge/rk61_rgb/readme.md @@ -0,0 +1,39 @@ +# RK61 RGB + +![RK61 RGB](https://i.pinimg.com/originals/01/e2/1f/01e21f1ba56526a0f2fe5047b6d25f11.png) + +Royal Kludge RK61 non-hotswap rgb edition, original PID 0x24F. + +Tested on the Royal Kludge RK61 non-hotswap RGB dual-mode edition, original PID 0x24F (2019/11/04 PCB) + +- MCU: HFD2201KBA (rebrand SN32F248BF) +- PCB: RK61-JX-RGB-HFD; REV: 01; 2019/08/13 +- Wired only, no bluetooth support. + +Updated to work with SonixQMK/qmk_firmware:sn32_develop branch. Based on previous work by [euwbah](https://github.com/euwbah). Added VIA support. Added VIA support. Added VIA support. Added VIA 3.0 support. + +Keyboard Maintainer: [fpb](https://github.com/fpb) + +For the white-backlit non-rgb version of the RK61, check out [Diff-fusion's repo](https://github.com/Diff-fusion/qmk_firmware) + + +Note: keymap differs slightly from stock firmware for FN combinations + +See [keymap.c](keymaps/default/keymap.c), and refer to the [list +of QMK keycodes](https://beta.docs.qmk.fm/using-qmk/simple-keycodes/keycodes). + +----------------- + + +Make example for this keyboard (after setting up your build environment): + + make royal_kludge/rk61_rgb:default + +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: + +- Physical reset: short the two contacts to the left of the space bar switch with a wire/paperclip. Accessible from the front. +- Layout (after loading QMK): FN + CapsLock From 2f0321c6a4879b0f6647373cdd47a940e2e4cecf Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Thu, 16 Nov 2023 10:58:54 +0000 Subject: [PATCH 03/27] Fixed some typos. --- keyboards/royal_kludge/rk61_rgb/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/royal_kludge/rk61_rgb/readme.md b/keyboards/royal_kludge/rk61_rgb/readme.md index 26a6aa5e0293..339c20a87b8a 100644 --- a/keyboards/royal_kludge/rk61_rgb/readme.md +++ b/keyboards/royal_kludge/rk61_rgb/readme.md @@ -10,7 +10,7 @@ Tested on the Royal Kludge RK61 non-hotswap RGB dual-mode edition, original PID - PCB: RK61-JX-RGB-HFD; REV: 01; 2019/08/13 - Wired only, no bluetooth support. -Updated to work with SonixQMK/qmk_firmware:sn32_develop branch. Based on previous work by [euwbah](https://github.com/euwbah). Added VIA support. Added VIA support. Added VIA support. Added VIA 3.0 support. +Updated to work with SonixQMK/qmk_firmware:sn32_develop branch. Based on previous work by [euwbah](https://github.com/euwbah). Added VIA support. Added VIA 3.0 support. Keyboard Maintainer: [fpb](https://github.com/fpb) From b049ea3746c627ab479d6079c5d1d945f86fcc77 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Fri, 17 Nov 2023 20:26:12 +0000 Subject: [PATCH 04/27] Minor changes to VIA keymap --- keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c index 4b978c313298..eba36ce5cc29 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { 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, }, { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, { QK_BOOT, DF(_WIN_BASE), KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } }, [_WIN_BASE] = { @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { 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, }, { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, { QK_BOOT, KC_NO, DF(_MAC_BASE), KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } } }; From 55d29ace55b820401f19e2663d4cc94ce0d59f51 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 04:22:35 +0000 Subject: [PATCH 05/27] Added support for RK68 (RK855) with VID 0C45 and PID 024F or 8008 --- keyboards/royal_kludge/rk68_rgb/config.h | 29 ++++ keyboards/royal_kludge/rk68_rgb/config_led.c | 57 ++++++++ keyboards/royal_kludge/rk68_rgb/config_led.h | 37 +++++ keyboards/royal_kludge/rk68_rgb/info.json | 127 ++++++++++++++++++ .../rk68_rgb/keymaps/default/keymap.c | 34 +++++ .../rk68_rgb/keymaps/via/config.h | 20 +++ .../rk68_rgb/keymaps/via/keymap.c | 31 +++++ .../rk68_rgb/keymaps/via/rk68-rgb_via.json | 16 +++ .../rk68_rgb/keymaps/via/rules.mk | 2 + keyboards/royal_kludge/rk68_rgb/rules.mk | 5 + 10 files changed, 358 insertions(+) create mode 100644 keyboards/royal_kludge/rk68_rgb/config.h create mode 100644 keyboards/royal_kludge/rk68_rgb/config_led.c create mode 100644 keyboards/royal_kludge/rk68_rgb/config_led.h create mode 100644 keyboards/royal_kludge/rk68_rgb/info.json create mode 100644 keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c create mode 100755 keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h create mode 100644 keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c create mode 100644 keyboards/royal_kludge/rk68_rgb/keymaps/via/rk68-rgb_via.json create mode 100644 keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk create mode 100644 keyboards/royal_kludge/rk68_rgb/rules.mk diff --git a/keyboards/royal_kludge/rk68_rgb/config.h b/keyboards/royal_kludge/rk68_rgb/config.h new file mode 100644 index 000000000000..867617d2e53e --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/config.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2023 Benjamín Ausensi + * + * 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 configuration can't be fully expressed in JSON as of now */ +#define RGB_MATRIX_LED_COUNT 68 +#define SN32_RGB_MATRIX_ROW_PINS { C6, C4, C5, C9, C7, C8, C12, C10, C11, B13, C13, C14, B14, D3, B15 } + +/* Enable additional RGB effects */ +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES + +/* Configure the effects: */ +#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50 + diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.c b/keyboards/royal_kludge/rk68_rgb/config_led.c new file mode 100644 index 000000000000..cad1c86509c8 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/config_led.c @@ -0,0 +1,57 @@ +/* +Copyright 2020 euwbah + +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 . +*/ + +#ifdef RGB_MATRIX_ENABLE + +#include QMK_KEYBOARD_H + +# include "rgb_matrix.h" +# include "config_led.h" + +led_config_t g_led_config = { + { + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, + {15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}, + {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43}, + {44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57}, + {58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67} + }, + { + {0, 0}, {14, 0}, {29, 0}, { 44, 0}, { 59, 0}, { 74, 0}, { 89, 0}, {104, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {201, 0}, {224, 0}, + {3,16}, {22,16}, {37,16}, { 52,16}, { 67,16}, { 82,16}, { 97,16}, {112,16}, {126,16}, {141,16}, {156,16}, {171,16}, {186,16}, {205,16}, {224,16}, + {5,32}, {26,32}, {41,32}, { 55,32}, { 70,32}, { 85,32}, {100,32}, {115,32}, {130,32}, {145,32}, {160,32}, {175,32}, {199,32}, {224,32}, + {9,48}, {33,48}, {48,48}, { 63,48}, { 78,48}, { 93,48}, {108,48}, {123,48}, {138,48}, {153,48}, {167,48}, {188,48}, {209,48}, {224,48}, + {1,64}, {20,64}, {39,64}, { 95,64}, {149,64}, {164,64}, {179,64}, {194,64}, {209,64}, {224,64} + }, + { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + // Set capslock key to orange (capslock is led number 44) + rgb_matrix_set_color(30, 255, 130, 15); + } + return false; +} + +#endif diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.h b/keyboards/royal_kludge/rk68_rgb/config_led.h new file mode 100644 index 000000000000..96db3be16664 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/config_led.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 euwbah + +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 + +// Backlight configuration +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define LED_MATRIX_ROWS 5 +#define LED_MATRIX_ROW_CHANNELS 3 +#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS) +#define LED_MATRIX_ROW_PINS { C6, C4, C5, C9, C7, C8, C12, C10, C11, B13, C13, C14, B14, D3, B15 } + +#define LED_MATRIX_COLS 15 +#define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6 } + +#define DRIVER_LED_TOTAL (75) diff --git a/keyboards/royal_kludge/rk68_rgb/info.json b/keyboards/royal_kludge/rk68_rgb/info.json new file mode 100644 index 000000000000..ef6cb1669a4e --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/info.json @@ -0,0 +1,127 @@ +{ + "keyboard_name": "RK68-RGB", + "manufacturer": "Royal Kludge", + "url": "http://en.rkgaming.com", + "maintainer": "fpb", + "bootloader": "sn32-dfu", + + "processor": "SN32F248BF", + "usb": { + "vid": "0x0C45", + "pid": "0x8008", + "device_version": "1.0.0", + "force_nkro": true + }, + + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": true, + "rgb_matrix": true + }, + + "debounce": 5, + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": [ "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "B0", "B1", "B2", "B3", "B4", "B5", "B6"], + "rows": [ "D11", "D10", "D9", "D8", "D7" ] + }, + + + "rgb_matrix": { + "animations": { + "band_val" : true, + "breathing" : true, + "cycle_left_right" : true, + "cycle_pinwheel" : true, + "cycle_spiral" : true, + "digital_rain" : true, + "gradient_left_right" : true, + "gradient_up_down" : true, + "raindrops" : true, + "solid_reactive_simple" : true, + "splash" : true, + "typing_heatmap" : true, + }, + "driver": "sn32f24xb" + }, + "layouts": { + "LAYOUT": { + "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": [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": [0, 14], "x": 15, "y": 0}, + {"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": [1, 14], "x": 15, "y": 1}, + {"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": [2, 14], "x": 15, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 2], "x": 2.25, "y": 3}, + {"matrix": [3, 3], "x": 3.25, "y": 3}, + {"matrix": [3, 4], "x": 4.25, "y": 3}, + {"matrix": [3, 5], "x": 5.25, "y": 3}, + {"matrix": [3, 6], "x": 6.25, "y": 3}, + {"matrix": [3, 7], "x": 7.25, "y": 3}, + {"matrix": [3, 8], "x": 8.25, "y": 3}, + {"matrix": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [3, 14], "x": 15, "y": 3}, + {"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, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [4, 9], "x": 10, "y": 4}, + {"matrix": [4, 10], "x": 11, "y": 4}, + {"matrix": [4, 11], "x": 12, "y": 4}, + {"matrix": [4, 12], "x": 13, "y": 4}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c b/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..24b7ad2c4a97 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2022 DeskDaily + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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_GRV, + 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_DEL, + 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + KC_TRNS, 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_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, RGB_MOD, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI + ) +}; \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h b/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h new file mode 100755 index 000000000000..0726eda8b596 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* Copyright (C) 2023 Benjamín Ausensi + * + * 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 + +/* Enable VIA RGB matrix and configure EEPROM emulation for VIA */ +#define VIA_QMK_RGBLIGHT_ENABLE diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..b2ac2afa71b4 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _MAC_BASE, + _MAC_FN, + _VIA +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAC_BASE] = LAYOUT( + 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_GRV, + 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_DEL, + 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(_MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_MAC_FN] = LAYOUT( + KC_TRNS, 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_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, RGB_MOD, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI + ), + [_VIA] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/rk68-rgb_via.json b/keyboards/royal_kludge/rk68_rgb/keymaps/via/rk68-rgb_via.json new file mode 100644 index 000000000000..16f7db4fcac6 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/rk68-rgb_via.json @@ -0,0 +1,16 @@ +{ + "name": "Royal Kludge RK68 RGB", + "vendorId": "0x0C45", + "productId": "0x8008", + "menus": ["qmk_rgb_matrix"], + "matrix": {"rows": 5, "cols": 15}, + "layouts": { + "keymap": [ + [ "0,0", "0,1", "0,2", "0,3", "0,4", "0,5", "0,6", "0,7", "0,8", "0,9", "0,10", "0,11", "0,12", {"w":2}, "0,13", "0,14" ], + [ {"w":1.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w":1.5}, "1,13", "1,14" ], + [ {"w":1.75}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", {"w":2.25}, "2,13", "2,14" ], + [ {"w":2.25}, "3,0", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w":1.75}, "3,12", "3,13", "3,14" ], + [ {"w":1.25}, "4,0", {"w":1.25}, "4,1", {"w":1.25},"4,2", {"w":6.25}, "4,6", "4,9","4,10","4,11","4,12", "4,13", "4,14" ] + ] + } +} \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk b/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..b3925b814f09 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +OPT_DEFS += -DDYNAMIC_KEYMAP_LAYER_COUNT=3 \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/rules.mk b/keyboards/royal_kludge/rk68_rgb/rules.mk new file mode 100644 index 000000000000..a330b03a2c39 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/rules.mk @@ -0,0 +1,5 @@ +# Data-driven structure doesn't support EEPROM yet +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = sn32_flash + +SRC += config_led.c From 0efa6d203a366219c954a360ec7f0066efe30d14 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 08:58:34 +0000 Subject: [PATCH 06/27] Moved RESET to Fn+CTRL on RK61-RGB --- keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c index eba36ce5cc29..db2ee93441fc 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c @@ -34,9 +34,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAC_FN] = { { 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, }, { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, - { QK_BOOT, DF(_WIN_BASE), KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, + { KC_TRNS, DF(_WIN_BASE), KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } + { QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } }, [_WIN_BASE] = { { 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, }, @@ -48,9 +48,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_WIN_FN] = { { 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, }, { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, - { QK_BOOT, KC_NO, DF(_MAC_BASE), KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_NO, DF(_MAC_BASE), KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } + { QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } } }; From 575c52da6857acecb227e3cd358130bac8d59fe2 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 11:15:34 +0000 Subject: [PATCH 07/27] Corrected RGB LED pin order --- keyboards/royal_kludge/rk68_rgb/config.h | 2 +- keyboards/royal_kludge/rk68_rgb/config_led.c | 4 +- keyboards/royal_kludge/rk68_rgb/config_led.h | 2 +- .../rk68_rgb/keymaps/default/keymap.c | 22 +++++----- .../rk68_rgb/keymaps/via/keymap.c | 42 ++++++++----------- 5 files changed, 33 insertions(+), 39 deletions(-) diff --git a/keyboards/royal_kludge/rk68_rgb/config.h b/keyboards/royal_kludge/rk68_rgb/config.h index 867617d2e53e..b7d8d439ae60 100644 --- a/keyboards/royal_kludge/rk68_rgb/config.h +++ b/keyboards/royal_kludge/rk68_rgb/config.h @@ -18,7 +18,7 @@ /* RGB matrix configuration can't be fully expressed in JSON as of now */ #define RGB_MATRIX_LED_COUNT 68 -#define SN32_RGB_MATRIX_ROW_PINS { C6, C4, C5, C9, C7, C8, C12, C10, C11, B13, C13, C14, B14, D3, B15 } +#define SN32_RGB_MATRIX_ROW_PINS { C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14 } /* Enable additional RGB effects */ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.c b/keyboards/royal_kludge/rk68_rgb/config_led.c index cad1c86509c8..51de1bad32b6 100644 --- a/keyboards/royal_kludge/rk68_rgb/config_led.c +++ b/keyboards/royal_kludge/rk68_rgb/config_led.c @@ -40,7 +40,7 @@ led_config_t g_led_config = { { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, } @@ -48,7 +48,7 @@ led_config_t g_led_config = { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (host_keyboard_led_state().caps_lock) { - // Set capslock key to orange (capslock is led number 44) + // Set capslock key to orange (capslock is led number 30) rgb_matrix_set_color(30, 255, 130, 15); } return false; diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.h b/keyboards/royal_kludge/rk68_rgb/config_led.h index 96db3be16664..db634870d208 100644 --- a/keyboards/royal_kludge/rk68_rgb/config_led.h +++ b/keyboards/royal_kludge/rk68_rgb/config_led.h @@ -29,7 +29,7 @@ along with this program. If not, see . #define LED_MATRIX_ROWS 5 #define LED_MATRIX_ROW_CHANNELS 3 #define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS) -#define LED_MATRIX_ROW_PINS { C6, C4, C5, C9, C7, C8, C12, C10, C11, B13, C13, C14, B14, D3, B15 } +#define LED_MATRIX_ROW_PINS { C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14 } #define LED_MATRIX_COLS 15 #define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6 } diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c b/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c index 24b7ad2c4a97..47ba94f6166a 100644 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c @@ -18,17 +18,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - 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_GRV, - 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_DEL, - 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_PGUP, - 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_UP, KC_PGDN, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + 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_GRV, + 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_DEL, + 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - KC_TRNS, 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_TRNS, KC_PSCR, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, RGB_MOD, KC_INS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRK, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, - QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI - ) + KC_TRNS, 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_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, RGB_MOD, KC_INS, + KC_TRNS, AG_SWAP, AG_NORM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI + ), }; \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c index b2ac2afa71b4..aa265eaf30bf 100644 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c @@ -1,31 +1,25 @@ #include QMK_KEYBOARD_H -enum layer_names { - _MAC_BASE, - _MAC_FN, - _VIA -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_MAC_BASE] = LAYOUT( - 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_GRV, - 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_DEL, - 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_PGUP, - 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_UP, KC_PGDN, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(_MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + [0] = LAYOUT( + 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_GRV, + 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_DEL, + 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_MAC_FN] = LAYOUT( - KC_TRNS, 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_TRNS, KC_PSCR, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, RGB_MOD, KC_INS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRK, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, - QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI + [1] = LAYOUT( + KC_TRNS, 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_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, RGB_MOD, KC_INS, + KC_TRNS, AG_SWAP, AG_NORM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI ), - [_VIA] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; \ No newline at end of file From 14672d359e9a4f365550d2470fd67376f2e8d949 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 14:09:24 +0000 Subject: [PATCH 08/27] Updated readme.md file --- keyboards/royal_kludge/rk68_rgb/readme.md | 59 +++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 keyboards/royal_kludge/rk68_rgb/readme.md diff --git a/keyboards/royal_kludge/rk68_rgb/readme.md b/keyboards/royal_kludge/rk68_rgb/readme.md new file mode 100644 index 000000000000..8e2641955547 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/readme.md @@ -0,0 +1,59 @@ +# RK68 RGB + +![RK68 RGB](./imgs/IMG_20210321_025644.jpg) + +Royal Kludge RK68 hotswap dual mode, rgb edition, original PID 0x24F. Later updated to 0x8016. + +- MCU: HFD2201KBA (rebrand SN32F248BF) +- PCB: RK61-JX-RGB-HFD; REV: 01; 2020/11/04 +- Wired only, no bluetooth support. + +Updated to work with SonixQMK/qmk_firmware:sn32_develop branch. Based on previous work by [euwbah](https://github.com/euwbah). Added VIA 3.0 support. + +Keyboard Maintainer: [fpb](https://github.com/fpb) + +For the white-backlit non-rgb version of the RK68, check out [silasb' repo](https://github.com/silasb/qmk_firmware) + + +Note: keymap differs slightly from stock firmware for FN combinations + +See [keymap.c](keymaps/default/keymap.c), and refer to the [list +of QMK keycodes](https://beta.docs.qmk.fm/using-qmk/simple-keycodes/keycodes). + +Keyboard will always start in Mac mode but you can toggle between Windows (FN+A) and Mac (FN+S) layouts. Function keys work as function keys. + +Building instructions +----------------- + + +Make example for this keyboard (after setting up your build environment): + + $ make royal_kludge/rk68_rgb:all + +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: + +- Physical reset: short the two pins on the underside of the pcb, as indicated below. You need to remove some keycaps and 6 screws to be able to flip the PCB. +- Layout (after loading QMK): FN + CTRL + +![Bootloader mode](./imgs/bootmode.jpg) + +## Keymaps + +Keysmaps are identical in both VIA and default layouts. VIA version has one additional empty layer to customize. + +![Layer 0](./imgs/layer0.jpg) +![Layer 1](./imgs/layer1.jpg) + +## VIA Json file + +You need [this json file](./keymaps/via/rk68-rgb_via.json) to add your keyboard at https://usevia.app. Go to settings, Show Design TAB, Go to Design Tab and Load Draft Definition. + +## Final result + +Here is a picture of my RK68 with Mac style keycaps... + +![RK68 RGB running QMK/VIA firmware](./imgs/IMG_20231118_133253.jpg) \ No newline at end of file From be008eff9be05001406e77108f26d7d986092dd1 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 14:38:19 +0000 Subject: [PATCH 09/27] Moved readme.md images to cloud --- keyboards/royal_kludge/rk68_rgb/readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/royal_kludge/rk68_rgb/readme.md b/keyboards/royal_kludge/rk68_rgb/readme.md index 8e2641955547..4565120b33d6 100644 --- a/keyboards/royal_kludge/rk68_rgb/readme.md +++ b/keyboards/royal_kludge/rk68_rgb/readme.md @@ -1,6 +1,6 @@ # RK68 RGB -![RK68 RGB](./imgs/IMG_20210321_025644.jpg) +![RK68 RGB](https://i.ibb.co/bLYNDjb/IMG-20210321-025644.jpg) Royal Kludge RK68 hotswap dual mode, rgb edition, original PID 0x24F. Later updated to 0x8016. @@ -39,14 +39,14 @@ Enter the bootloader: - Physical reset: short the two pins on the underside of the pcb, as indicated below. You need to remove some keycaps and 6 screws to be able to flip the PCB. - Layout (after loading QMK): FN + CTRL -![Bootloader mode](./imgs/bootmode.jpg) +![Bootloader mode](https://i.ibb.co/BT7sj31/bootmode.jpg) ## Keymaps Keysmaps are identical in both VIA and default layouts. VIA version has one additional empty layer to customize. -![Layer 0](./imgs/layer0.jpg) -![Layer 1](./imgs/layer1.jpg) +![Layer 0](https://i.ibb.co/9wXbcmM/layer0.jpg) +![Layer 1](https://i.ibb.co/q9T33QJ/layer1.jpg) ## VIA Json file @@ -56,4 +56,4 @@ You need [this json file](./keymaps/via/rk68-rgb_via.json) to add your keyboard Here is a picture of my RK68 with Mac style keycaps... -![RK68 RGB running QMK/VIA firmware](./imgs/IMG_20231118_133253.jpg) \ No newline at end of file +![RK68 RGB running QMK/VIA firmware](https://i.ibb.co/HCrk3D3/IMG-20231118-133253.jpg) \ No newline at end of file From ddb1a1fe8d412405b7f39386c622ee325609f694 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 14:39:54 +0000 Subject: [PATCH 10/27] Keymap changes --- keyboards/royal_kludge/rk61_rgb/info.json | 2 +- .../rk61_rgb/keymaps/via/keymap.c | 56 +++++++++---------- .../rk61_rgb/keymaps/via/rk61-rgb_via.json | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/info.json b/keyboards/royal_kludge/rk61_rgb/info.json index f180d92f0572..d9257dc86e89 100644 --- a/keyboards/royal_kludge/rk61_rgb/info.json +++ b/keyboards/royal_kludge/rk61_rgb/info.json @@ -8,7 +8,7 @@ "processor": "SN32F248BF", "usb": { "vid": "0x0C45", - "pid": "0x024F", + "pid": "0x8016", "device_version": "1.0.0", "force_nkro": true }, diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c index db2ee93441fc..d85b7a511253 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c @@ -17,40 +17,40 @@ #include QMK_KEYBOARD_H enum layer_names { - _MAC_BASE, - _MAC_FN, - _WIN_BASE, - _WIN_FN + _MAC, + _MACFN, + _VIA1, + _VIA2 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_MAC_BASE] = { - { 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_NO, KC_ENT, }, - { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, - { KC_LCTL, KC_LALT, KC_LCMD, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RCMD, KC_RALT, KC_RCTL, KC_NO, MO(_MAC_FN), } + [_MAC] = { + { 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_NO, KC_ENT, }, + { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, + { KC_LCTL, KC_LALT, KC_LCMD, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RCMD, KC_RALT, KC_RCTL, KC_NO, MO(_MACFN), } }, - [_MAC_FN] = { - { 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, }, - { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, - { KC_TRNS, DF(_WIN_BASE), KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, - { QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } + [_MACFN] = { + { 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, }, + { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, + { KC_TRNS, AG_SWAP, AG_NORM, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, + { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, + { QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } }, - [_WIN_BASE] = { - { 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_NO, KC_ENT, }, - { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, - { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RALT, KC_APP, KC_RCTL, KC_NO, MO(_WIN_FN), } + [_VIA1] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, }, - [_WIN_FN] = { - { 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, }, - { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, - { KC_TRNS, KC_NO, DF(_MAC_BASE), KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, - { QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } + [_VIA2] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, } }; diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/rk61-rgb_via.json b/keyboards/royal_kludge/rk61_rgb/keymaps/via/rk61-rgb_via.json index b305b260f4fa..5c71333764bd 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/rk61-rgb_via.json +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/rk61-rgb_via.json @@ -1,7 +1,7 @@ { "name": "Royal Kludge RK61 RGB", "vendorId": "0x0C45", - "productId": "0x024F", + "productId": "0x8016", "menus": ["qmk_rgb_matrix"], "matrix": {"rows": 5, "cols": 14}, "layouts": { From 4373488859fc8cf82ee6766fac6a44c2247070b8 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 18:46:54 +0000 Subject: [PATCH 11/27] Moved RGB coords and flags into info.json --- keyboards/royal_kludge/rk68_rgb/config_led.c | 24 ------- keyboards/royal_kludge/rk68_rgb/info.json | 72 +++++++++++++++++++- 2 files changed, 71 insertions(+), 25 deletions(-) diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.c b/keyboards/royal_kludge/rk68_rgb/config_led.c index 51de1bad32b6..d043f7607191 100644 --- a/keyboards/royal_kludge/rk68_rgb/config_led.c +++ b/keyboards/royal_kludge/rk68_rgb/config_led.c @@ -22,30 +22,6 @@ along with this program. If not, see . # include "rgb_matrix.h" # include "config_led.h" -led_config_t g_led_config = { - { - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, - {15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}, - {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43}, - {44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57}, - {58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67} - }, - { - {0, 0}, {14, 0}, {29, 0}, { 44, 0}, { 59, 0}, { 74, 0}, { 89, 0}, {104, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {201, 0}, {224, 0}, - {3,16}, {22,16}, {37,16}, { 52,16}, { 67,16}, { 82,16}, { 97,16}, {112,16}, {126,16}, {141,16}, {156,16}, {171,16}, {186,16}, {205,16}, {224,16}, - {5,32}, {26,32}, {41,32}, { 55,32}, { 70,32}, { 85,32}, {100,32}, {115,32}, {130,32}, {145,32}, {160,32}, {175,32}, {199,32}, {224,32}, - {9,48}, {33,48}, {48,48}, { 63,48}, { 78,48}, { 93,48}, {108,48}, {123,48}, {138,48}, {153,48}, {167,48}, {188,48}, {209,48}, {224,48}, - {1,64}, {20,64}, {39,64}, { 95,64}, {149,64}, {164,64}, {179,64}, {194,64}, {209,64}, {224,64} - }, - { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - } -}; - bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (host_keyboard_led_state().caps_lock) { // Set capslock key to orange (capslock is led number 30) diff --git a/keyboards/royal_kludge/rk68_rgb/info.json b/keyboards/royal_kludge/rk68_rgb/info.json index ef6cb1669a4e..35af28687a4f 100644 --- a/keyboards/royal_kludge/rk68_rgb/info.json +++ b/keyboards/royal_kludge/rk68_rgb/info.json @@ -48,7 +48,77 @@ "splash" : true, "typing_heatmap" : true, }, - "driver": "sn32f24xb" + "driver": "sn32f24xb", + "layout": [ + { "matrix": [0,0], "x": 0, "y": 0, "flags": 4}, + { "matrix": [0,1], "x": 14, "y": 0, "flags": 4}, + { "matrix": [0,2], "x": 29, "y": 0, "flags": 4}, + { "matrix": [0,3], "x": 44, "y": 0, "flags": 4}, + { "matrix": [0,4], "x": 59, "y": 0, "flags": 4}, + { "matrix": [0,5], "x": 74, "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": 201, "y": 0, "flags": 4}, + { "matrix": [0,14], "x": 224, "y": 0, "flags": 4}, + { "matrix": [1,0], "x": 3, "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": 126, "y": 16, "flags": 4}, + { "matrix": [1,9], "x": 141, "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": 205, "y": 16, "flags": 4}, + { "matrix": [1,14], "x": 224, "y": 16, "flags": 4}, + { "matrix": [2,0], "x": 5, "y": 32, "flags": 8}, + { "matrix": [2,1], "x": 26, "y": 32, "flags": 4}, + { "matrix": [2,2], "x": 41, "y": 32, "flags": 4}, + { "matrix": [2,3], "x": 55, "y": 32, "flags": 4}, + { "matrix": [2,4], "x": 70, "y": 32, "flags": 4}, + { "matrix": [2,5], "x": 85, "y": 32, "flags": 4}, + { "matrix": [2,6], "x": 100, "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": 199, "y": 32, "flags": 4}, + { "matrix": [2,14], "x": 224, "y": 32, "flags": 4}, + { "matrix": [3,0], "x": 9, "y": 48, "flags": 4}, + { "matrix": [3,2], "x": 33, "y": 48, "flags": 4}, + { "matrix": [3,3], "x": 48, "y": 48, "flags": 4}, + { "matrix": [3,4], "x": 63, "y": 48, "flags": 4}, + { "matrix": [3,5], "x": 78, "y": 48, "flags": 4}, + { "matrix": [3,6], "x": 93, "y": 48, "flags": 4}, + { "matrix": [3,7], "x": 108, "y": 48, "flags": 4}, + { "matrix": [3,8], "x": 123, "y": 48, "flags": 4}, + { "matrix": [3,9], "x": 138, "y": 48, "flags": 4}, + { "matrix": [3,10], "x": 153, "y": 48, "flags": 4}, + { "matrix": [3,11], "x": 167, "y": 48, "flags": 4}, + { "matrix": [3,12], "x": 188, "y": 48, "flags": 4}, + { "matrix": [3,13], "x": 209, "y": 48, "flags": 4}, + { "matrix": [3,14], "x": 224, "y": 48, "flags": 4}, + { "matrix": [4,0], "x": 1, "y": 64, "flags": 4}, + { "matrix": [4,1], "x": 20, "y": 64, "flags": 4}, + { "matrix": [4,2], "x": 39, "y": 64, "flags": 4}, + { "matrix": [4,6], "x": 95, "y": 64, "flags": 4}, + { "matrix": [4,9], "x": 149, "y": 64, "flags": 4}, + { "matrix": [4,10], "x": 164, "y": 64, "flags": 4}, + { "matrix": [4,11], "x": 179, "y": 64, "flags": 4}, + { "matrix": [4,12], "x": 194, "y": 64, "flags": 4}, + { "matrix": [4,13], "x": 209, "y": 64, "flags": 4}, + { "matrix": [4,14], "x": 224, "y": 64, "flags": 4} + ] }, "layouts": { "LAYOUT": { From 981dc6aee4ce11840aed8a60601673fd98c66ae1 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 18:51:25 +0000 Subject: [PATCH 12/27] Removed unnecessary define for maximum brightness (default value is identical) --- keyboards/royal_kludge/rk61_rgb/config_led.h | 1 - keyboards/royal_kludge/rk68_rgb/config_led.h | 1 - 2 files changed, 2 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.h b/keyboards/royal_kludge/rk61_rgb/config_led.h index 17eb50db6849..e73c2e9f2ce9 100644 --- a/keyboards/royal_kludge/rk61_rgb/config_led.h +++ b/keyboards/royal_kludge/rk61_rgb/config_led.h @@ -20,7 +20,6 @@ along with this program. If not, see . // Backlight configuration #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_LIMIT_VAL 255 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.h b/keyboards/royal_kludge/rk68_rgb/config_led.h index db634870d208..ef2001082a48 100644 --- a/keyboards/royal_kludge/rk68_rgb/config_led.h +++ b/keyboards/royal_kludge/rk68_rgb/config_led.h @@ -20,7 +20,6 @@ along with this program. If not, see . // Backlight configuration #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_LIMIT_VAL 255 #define RGBLIGHT_SAT_STEP 17 From 140aa9451cfe97ebd0bc1dcd9fc7e98f67e219d4 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 19:00:52 +0000 Subject: [PATCH 13/27] Update keyboards/royal_kludge/rk61_rgb/config_led.h Removed outdated defines not needed. Co-authored-by: dexter93 --- keyboards/royal_kludge/rk61_rgb/config_led.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.h b/keyboards/royal_kludge/rk61_rgb/config_led.h index e73c2e9f2ce9..752d8bea89c2 100644 --- a/keyboards/royal_kludge/rk61_rgb/config_led.h +++ b/keyboards/royal_kludge/rk61_rgb/config_led.h @@ -20,10 +20,6 @@ along with this program. If not, see . // Backlight configuration #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_LIMIT_VAL 255 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 #define LED_MATRIX_ROWS 5 #define LED_MATRIX_ROW_CHANNELS 3 From 432d46d42bea21f11e855696ba0b270e98ffef4f Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 19:02:28 +0000 Subject: [PATCH 14/27] Removed outdated defines not needed. --- keyboards/royal_kludge/rk68_rgb/config_led.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.h b/keyboards/royal_kludge/rk68_rgb/config_led.h index ef2001082a48..8058d73562f8 100644 --- a/keyboards/royal_kludge/rk68_rgb/config_led.h +++ b/keyboards/royal_kludge/rk68_rgb/config_led.h @@ -20,10 +20,6 @@ along with this program. If not, see . // Backlight configuration #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_LIMIT_VAL 255 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 #define LED_MATRIX_ROWS 5 #define LED_MATRIX_ROW_CHANNELS 3 From edb1db05efd69cf09034c4334f7c7c46a5afbdb6 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 19:06:04 +0000 Subject: [PATCH 15/27] Removed NKRO force option --- keyboards/royal_kludge/rk61_rgb/info.json | 3 +-- keyboards/royal_kludge/rk68_rgb/info.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/info.json b/keyboards/royal_kludge/rk61_rgb/info.json index d9257dc86e89..cf94d40f7f6b 100644 --- a/keyboards/royal_kludge/rk61_rgb/info.json +++ b/keyboards/royal_kludge/rk61_rgb/info.json @@ -9,8 +9,7 @@ "usb": { "vid": "0x0C45", "pid": "0x8016", - "device_version": "1.0.0", - "force_nkro": true + "device_version": "1.0.0" }, "features": { diff --git a/keyboards/royal_kludge/rk68_rgb/info.json b/keyboards/royal_kludge/rk68_rgb/info.json index 35af28687a4f..76cfcf75928e 100644 --- a/keyboards/royal_kludge/rk68_rgb/info.json +++ b/keyboards/royal_kludge/rk68_rgb/info.json @@ -9,8 +9,7 @@ "usb": { "vid": "0x0C45", "pid": "0x8008", - "device_version": "1.0.0", - "force_nkro": true + "device_version": "1.0.0" }, "features": { From 3a1c005ba1ae5943dd00c5074d83917df1e90349 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 19:09:51 +0000 Subject: [PATCH 16/27] Removed leftover flag --- keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h | 5 +---- keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h b/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h index 0726eda8b596..14f0d279bde7 100755 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h @@ -14,7 +14,4 @@ * along with this program. If not, see . */ -#pragma once - -/* Enable VIA RGB matrix and configure EEPROM emulation for VIA */ -#define VIA_QMK_RGBLIGHT_ENABLE +#pragma once \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h b/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h index 0726eda8b596..b1beedd3c8bd 100755 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h @@ -15,6 +15,3 @@ */ #pragma once - -/* Enable VIA RGB matrix and configure EEPROM emulation for VIA */ -#define VIA_QMK_RGBLIGHT_ENABLE From facd0e97818c5f32329c6be853dfd81d667227fc Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 19:45:52 +0000 Subject: [PATCH 17/27] Updated license header and added missing one --- .../royal_kludge/rk61_rgb/keymaps/via/keymap.c | 2 +- .../royal_kludge/rk68_rgb/keymaps/via/keymap.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c index d85b7a511253..ae85f236e500 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2023 Benjamín Ausensi +/* Copyright (C) 2023 Fernando Birra * * 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 diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c index aa265eaf30bf..638562236cf5 100644 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c @@ -1,3 +1,19 @@ +/* Copyright (C) 2023 Fernando Birra + * + * 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 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { From 40a6bb351089e9fd46d3c918973de0f02d15b781 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 19:50:56 +0000 Subject: [PATCH 18/27] Removed empty VIA layers as they are automatically added. --- .../royal_kludge/rk61_rgb/keymaps/via/keymap.c | 14 -------------- .../royal_kludge/rk68_rgb/keymaps/via/keymap.c | 7 ------- 2 files changed, 21 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c index ae85f236e500..b67f7f9c1a6f 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c @@ -37,20 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { KC_TRNS, AG_SWAP, AG_NORM, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, { QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } - }, - [_VIA1] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - }, - [_VIA2] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, } }; diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c index 638562236cf5..3c1f3208258d 100644 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c @@ -30,12 +30,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, AG_SWAP, AG_NORM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI - ), - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; \ No newline at end of file From 94e3096573aac1f85e7039736049e57a75d2a9db Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sat, 18 Nov 2023 19:52:26 +0000 Subject: [PATCH 19/27] Update keyboards/royal_kludge/rk61_rgb/config_led.h Removed obsolete flags. Co-authored-by: dexter93 --- keyboards/royal_kludge/rk61_rgb/config_led.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.h b/keyboards/royal_kludge/rk61_rgb/config_led.h index 752d8bea89c2..4f54eea48aca 100644 --- a/keyboards/royal_kludge/rk61_rgb/config_led.h +++ b/keyboards/royal_kludge/rk61_rgb/config_led.h @@ -21,12 +21,7 @@ along with this program. If not, see . #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define LED_MATRIX_ROWS 5 -#define LED_MATRIX_ROW_CHANNELS 3 -#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS) -#define LED_MATRIX_ROW_PINS { C5, C4, C6, C8, C7, C9, C11, C10, C12, C14, C13, B13, B15, D3, B14 } - -#define LED_MATRIX_COLS 14 -#define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 } +#define SN32_RGB_MATRIX_ROW_PINS { C5, C4, C6, C8, C7, C9, C11, C10, C12, C14, C13, B13, B15, D3, B14 } +#define RGB_MATRIX_LED_COUNT (70) #define DRIVER_LED_TOTAL (70) From 67fc2c911325e3a8dedc97dc2fcbc67b48c65874 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sun, 19 Nov 2023 01:00:56 +0000 Subject: [PATCH 20/27] Moved Led coords and flags into info.json --- keyboards/royal_kludge/rk61_rgb/config.h | 1 - keyboards/royal_kludge/rk61_rgb/config_led.c | 26 -------------------- keyboards/royal_kludge/rk61_rgb/info.json | 8 +++--- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/config.h b/keyboards/royal_kludge/rk61_rgb/config.h index 4612e79c223a..dd8e28ec19b1 100644 --- a/keyboards/royal_kludge/rk61_rgb/config.h +++ b/keyboards/royal_kludge/rk61_rgb/config.h @@ -18,7 +18,6 @@ /* RGB matrix configuration can't be fully expressed in JSON as of now */ #define RGB_MATRIX_LED_COUNT 61 -//#define SN32_RGB_MATRIX_ROW_PINS { C5, C4, C6, C8, C7, C9, C11, C10, C12, C14, C13, B13, B15, D3, B14 } #define SN32_RGB_MATRIX_ROW_PINS { C5, C6, C4, C8, C9, C7, C11, C12, C10, C14, B13, C13, B15, B14, D3 } /* Enable additional RGB effects */ diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.c b/keyboards/royal_kludge/rk61_rgb/config_led.c index d4b6016d9e16..041c5c5e8b71 100644 --- a/keyboards/royal_kludge/rk61_rgb/config_led.c +++ b/keyboards/royal_kludge/rk61_rgb/config_led.c @@ -22,32 +22,6 @@ along with this program. If not, see . # include "rgb_matrix.h" # include "config_led.h" -led_config_t g_led_config = { - { - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,}, - {14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,}, - {28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NO_LED, 40,}, - {41, NO_LED, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, NO_LED,}, - {53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, 59, NO_LED, 60,} - }, - { - {8, 0}, {24, 0}, {39, 0}, {55, 0}, {70, 0}, {86, 0}, {101, 0}, {117, 0}, {132, 0}, {148, 0}, {164, 0}, {180, 0}, {195, 0}, {218, 0}, - {11, 16}, {31, 16}, {47, 16}, {62, 16}, {78, 16}, {93, 16}, {109, 16}, {124, 16}, {140, 16}, {155, 16}, {171, 16}, {186, 16}, {202, 16}, {221, 16}, - {13, 32}, {34, 32}, {50, 32}, {65, 32}, {81, 32}, {96, 32}, {112, 32}, {128, 32}, {143, 32}, {159, 32}, {174, 32}, {190, 32}, {215, 32}, - {17, 48}, {42, 48}, {57, 48}, {73, 48}, {88, 48}, {104, 48}, {119, 48}, {135, 48}, {150, 48}, {166, 48}, {182, 48}, {211, 48}, - {10, 64}, {29, 64}, {49, 64}, {107, 64}, {165, 64}, {185, 64}, {204, 64}, {224, 64}, - }, - { - 4,4,4,4,4,4,4,4,4,4, - 4,4,4,4,4,4,4,4,4,4, - 4,4,4,4,4,4,4,4,4,4, - 4,4,4,4,4,4,4,4,4,4, - 4,4,4,4,4,4,4,4,4,4, - 4,4,4,4,4,4,4,4,4,4, - 4, - } -}; - bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (host_keyboard_led_state().caps_lock) { // Set capslock key to orange (capslock is led number 28) diff --git a/keyboards/royal_kludge/rk61_rgb/info.json b/keyboards/royal_kludge/rk61_rgb/info.json index cf94d40f7f6b..e872c88d8f01 100644 --- a/keyboards/royal_kludge/rk61_rgb/info.json +++ b/keyboards/royal_kludge/rk61_rgb/info.json @@ -104,15 +104,15 @@ { "matrix":[3, 9], "flags":4, "x":148, "y":48 }, { "matrix":[3, 10], "flags":4, "x":164, "y":48 }, { "matrix":[3, 11], "flags":4, "x":180, "y":48 }, - { "matrix":[3, 13], "flags":4, "x":196, "y":48 }, + { "matrix":[3, 12], "flags":4, "x":196, "y":48 }, { "matrix":[4, 0], "flags":4, "x":2, "y":64 }, { "matrix":[4, 1], "flags":4, "x":22, "y":64 }, { "matrix":[4, 2], "flags":4, "x":42, "y":64 }, { "matrix":[4, 6], "flags":4, "x":102, "y":64 }, - { "matrix":[4, 10], "flags":4, "x":162, "y":64 }, - { "matrix":[4, 11], "flags":4, "x":182, "y":64 }, - { "matrix":[4, 12], "flags":4, "x":202, "y":64 }, + { "matrix":[4, 9], "flags":4, "x":162, "y":64 }, + { "matrix":[4, 10], "flags":4, "x":182, "y":64 }, + { "matrix":[4, 11], "flags":4, "x":202, "y":64 }, { "matrix":[4, 13], "flags":4, "x":222, "y":64 } ] }, From 74ed356cea5b950c91977d6b2407bfedb7e137d5 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sun, 19 Nov 2023 02:22:46 +0000 Subject: [PATCH 21/27] Cleanup --- keyboards/royal_kludge/rk61_rgb/config.h | 3 +- keyboards/royal_kludge/rk61_rgb/config_led.h | 7 +-- keyboards/royal_kludge/rk61_rgb/info.json | 10 ++-- .../rk61_rgb/keymaps/default/keymap.c | 50 ++++++------------- .../rk61_rgb/keymaps/via/keymap.c | 39 ++++++--------- .../rk61_rgb/keymaps/via/rules.mk | 1 - keyboards/royal_kludge/rk68_rgb/config.h | 2 +- keyboards/royal_kludge/rk68_rgb/config_led.h | 12 +---- keyboards/royal_kludge/rk68_rgb/info.json | 12 ++++- 9 files changed, 49 insertions(+), 87 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/config.h b/keyboards/royal_kludge/rk61_rgb/config.h index dd8e28ec19b1..60a58edc23bc 100644 --- a/keyboards/royal_kludge/rk61_rgb/config.h +++ b/keyboards/royal_kludge/rk61_rgb/config.h @@ -17,8 +17,9 @@ #pragma once /* RGB matrix configuration can't be fully expressed in JSON as of now */ -#define RGB_MATRIX_LED_COUNT 61 +//#define RGB_MATRIX_LED_COUNT 61 #define SN32_RGB_MATRIX_ROW_PINS { C5, C6, C4, C8, C9, C7, C11, C12, C10, C14, B13, C13, B15, B14, D3 } +#define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 } /* Enable additional RGB effects */ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.h b/keyboards/royal_kludge/rk61_rgb/config_led.h index 4f54eea48aca..3cd942692985 100644 --- a/keyboards/royal_kludge/rk61_rgb/config_led.h +++ b/keyboards/royal_kludge/rk61_rgb/config_led.h @@ -19,9 +19,4 @@ along with this program. If not, see . // Backlight configuration #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_KEYPRESSES - -#define SN32_RGB_MATRIX_ROW_PINS { C5, C4, C6, C8, C7, C9, C11, C10, C12, C14, C13, B13, B15, D3, B14 } -#define RGB_MATRIX_LED_COUNT (70) - -#define DRIVER_LED_TOTAL (70) +#define RGB_MATRIX_KEYPRESSES \ No newline at end of file diff --git a/keyboards/royal_kludge/rk61_rgb/info.json b/keyboards/royal_kludge/rk61_rgb/info.json index e872c88d8f01..85382f3a7ca3 100644 --- a/keyboards/royal_kludge/rk61_rgb/info.json +++ b/keyboards/royal_kludge/rk61_rgb/info.json @@ -45,7 +45,7 @@ "raindrops" : true, "solid_reactive_simple" : true, "splash" : true, - "typing_heatmap" : true, + "typing_heatmap" : true }, "driver": "sn32f24xb", "layout": [ @@ -175,15 +175,15 @@ { "matrix":[3, 9], "x":9.25, "y":3 }, { "matrix":[3, 10], "x":10.25, "y":3 }, { "matrix":[3, 11], "x":11.25, "y":3 }, - { "matrix":[3, 13], "x":12.25, "y":3, "w":2.75 }, + { "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, 6], "x":3.75, "y":4, "w":6.25 }, - { "matrix":[4, 10], "x":10, "y":4, "w":1.25 }, - { "matrix":[4, 11], "x":11.25, "y":4, "w":1.25 }, - { "matrix":[4, 12], "x":12.5, "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/royal_kludge/rk61_rgb/keymaps/default/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c index e22ceaf0ae2b..75865672d4df 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c @@ -16,43 +16,21 @@ #include QMK_KEYBOARD_H -enum layer_names { - _MAC_BASE, - _MAC_FN, - _WIN_BASE, - _WIN_FN -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_MAC_BASE] = { - { 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_NO, KC_ENT, }, - { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, - { KC_LCTL, KC_LALT, KC_LCMD, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RCMD, KC_RALT, KC_RCTL, KC_NO, MO(_MAC_FN), } - }, - [_MAC_FN] = { - { 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, }, - { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, - { QK_BOOT, DF(_WIN_BASE), KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } - }, - [_WIN_BASE] = { - { 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_NO, KC_ENT, }, - { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, - { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RALT, KC_APP, KC_RCTL, KC_NO, MO(_WIN_FN), } - }, - [_WIN_FN] = { - { 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, }, - { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, - { QK_BOOT, KC_NO, DF(_MAC_BASE), KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } - } - + [0] = LAYOUT_60_ansi( + 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_LALT, KC_LCMD, KC_SPC, KC_RCMD, KC_RALT, KC_RCTL, MO(1) + ), + [1] = LAYOUT_60_ansi( + 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, + KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, + KC_TRNS, AG_SWAP, AG_NORM, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS + ) }; /* vim: set noai ts=4 sw=4: */ diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c index b67f7f9c1a6f..393e8cb2e4bd 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c @@ -16,28 +16,19 @@ #include QMK_KEYBOARD_H -enum layer_names { - _MAC, - _MACFN, - _VIA1, - _VIA2 -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_MAC] = { - { 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_NO, KC_ENT, }, - { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, }, - { KC_LCTL, KC_LALT, KC_LCMD, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RCMD, KC_RALT, KC_RCTL, KC_NO, MO(_MACFN), } - }, - [_MACFN] = { - { 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, }, - { KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, }, - { KC_TRNS, AG_SWAP, AG_NORM, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, }, - { KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, KC_TRNS, }, - { QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, } - } -}; - -/* vim: set noai ts=4 sw=4: */ + [0] = LAYOUT_60_ansi( + 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_LALT, KC_LCMD, KC_SPC, KC_RCMD, KC_RALT, KC_RCTL, MO(1) + ), + [1] = LAYOUT_60_ansi( + 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, + KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_PSCR, KC_SCRL, KC_PAUS, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_MOD, + KC_TRNS, AG_SWAP, AG_NORM, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS + ) +}; \ No newline at end of file diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/rules.mk b/keyboards/royal_kludge/rk61_rgb/keymaps/via/rules.mk index eb5b445ddf1a..1e5b99807cb7 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/rules.mk +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = yes diff --git a/keyboards/royal_kludge/rk68_rgb/config.h b/keyboards/royal_kludge/rk68_rgb/config.h index b7d8d439ae60..e26da5dba35b 100644 --- a/keyboards/royal_kludge/rk68_rgb/config.h +++ b/keyboards/royal_kludge/rk68_rgb/config.h @@ -17,7 +17,7 @@ #pragma once /* RGB matrix configuration can't be fully expressed in JSON as of now */ -#define RGB_MATRIX_LED_COUNT 68 +//#define RGB_MATRIX_LED_COUNT 68 #define SN32_RGB_MATRIX_ROW_PINS { C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14 } /* Enable additional RGB effects */ diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.h b/keyboards/royal_kludge/rk68_rgb/config_led.h index 8058d73562f8..3cd942692985 100644 --- a/keyboards/royal_kludge/rk68_rgb/config_led.h +++ b/keyboards/royal_kludge/rk68_rgb/config_led.h @@ -19,14 +19,4 @@ along with this program. If not, see . // Backlight configuration #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_KEYPRESSES - -#define LED_MATRIX_ROWS 5 -#define LED_MATRIX_ROW_CHANNELS 3 -#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS) -#define LED_MATRIX_ROW_PINS { C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14 } - -#define LED_MATRIX_COLS 15 -#define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6 } - -#define DRIVER_LED_TOTAL (75) +#define RGB_MATRIX_KEYPRESSES \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/info.json b/keyboards/royal_kludge/rk68_rgb/info.json index 76cfcf75928e..34fe82ab7b7b 100644 --- a/keyboards/royal_kludge/rk68_rgb/info.json +++ b/keyboards/royal_kludge/rk68_rgb/info.json @@ -27,7 +27,7 @@ "debounce": 5, "diode_direction": "COL2ROW", "matrix_pins": { - "cols": [ "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "B0", "B1", "B2", "B3", "B4", "B5", "B6"], + "cols": [ "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "B0", "B1", "B2", "B3", "B4", "B5", "B6" ], "rows": [ "D11", "D10", "D9", "D8", "D7" ] }, @@ -45,7 +45,7 @@ "raindrops" : true, "solid_reactive_simple" : true, "splash" : true, - "typing_heatmap" : true, + "typing_heatmap" : true }, "driver": "sn32f24xb", "layout": [ @@ -64,6 +64,7 @@ { "matrix": [0,12], "x": 179, "y": 0, "flags": 4}, { "matrix": [0,13], "x": 201, "y": 0, "flags": 4}, { "matrix": [0,14], "x": 224, "y": 0, "flags": 4}, + { "matrix": [1,0], "x": 3, "y": 16, "flags": 4}, { "matrix": [1,1], "x": 22, "y": 16, "flags": 4}, { "matrix": [1,2], "x": 37, "y": 16, "flags": 4}, @@ -79,6 +80,7 @@ { "matrix": [1,12], "x": 186, "y": 16, "flags": 4}, { "matrix": [1,13], "x": 205, "y": 16, "flags": 4}, { "matrix": [1,14], "x": 224, "y": 16, "flags": 4}, + { "matrix": [2,0], "x": 5, "y": 32, "flags": 8}, { "matrix": [2,1], "x": 26, "y": 32, "flags": 4}, { "matrix": [2,2], "x": 41, "y": 32, "flags": 4}, @@ -93,6 +95,7 @@ { "matrix": [2,11], "x": 175, "y": 32, "flags": 4}, { "matrix": [2,13], "x": 199, "y": 32, "flags": 4}, { "matrix": [2,14], "x": 224, "y": 32, "flags": 4}, + { "matrix": [3,0], "x": 9, "y": 48, "flags": 4}, { "matrix": [3,2], "x": 33, "y": 48, "flags": 4}, { "matrix": [3,3], "x": 48, "y": 48, "flags": 4}, @@ -107,6 +110,7 @@ { "matrix": [3,12], "x": 188, "y": 48, "flags": 4}, { "matrix": [3,13], "x": 209, "y": 48, "flags": 4}, { "matrix": [3,14], "x": 224, "y": 48, "flags": 4}, + { "matrix": [4,0], "x": 1, "y": 64, "flags": 4}, { "matrix": [4,1], "x": 20, "y": 64, "flags": 4}, { "matrix": [4,2], "x": 39, "y": 64, "flags": 4}, @@ -137,6 +141,7 @@ {"matrix": [0, 12], "x": 12, "y": 0}, {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, {"matrix": [0, 14], "x": 15, "y": 0}, + {"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}, @@ -152,6 +157,7 @@ {"matrix": [1, 12], "x": 12.5, "y": 1}, {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, {"matrix": [1, 14], "x": 15, "y": 1}, + {"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}, @@ -166,6 +172,7 @@ {"matrix": [2, 11], "x": 11.75, "y": 2}, {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, {"matrix": [2, 14], "x": 15, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, {"matrix": [3, 2], "x": 2.25, "y": 3}, {"matrix": [3, 3], "x": 3.25, "y": 3}, @@ -180,6 +187,7 @@ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, {"matrix": [3, 13], "x": 14, "y": 3}, {"matrix": [3, 14], "x": 15, "y": 3}, + {"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}, From fe769ba061a26b1a2e1fe7bec4c726029de5366e Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sun, 19 Nov 2023 02:47:15 +0000 Subject: [PATCH 22/27] Moved _user function into keymaps. Small corrections --- keyboards/royal_kludge/rk61_rgb/config_led.c | 8 -------- .../royal_kludge/rk61_rgb/keymaps/default/keymap.c | 8 +++++++- keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c | 10 +++++++++- keyboards/royal_kludge/rk68_rgb/config_led.c | 8 -------- .../royal_kludge/rk68_rgb/keymaps/default/keymap.c | 10 +++++++++- keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c | 10 +++++++++- 6 files changed, 34 insertions(+), 20 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.c b/keyboards/royal_kludge/rk61_rgb/config_led.c index 041c5c5e8b71..6ef1810449fc 100644 --- a/keyboards/royal_kludge/rk61_rgb/config_led.c +++ b/keyboards/royal_kludge/rk61_rgb/config_led.c @@ -22,12 +22,4 @@ along with this program. If not, see . # include "rgb_matrix.h" # include "config_led.h" -bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - if (host_keyboard_led_state().caps_lock) { - // Set capslock key to orange (capslock is led number 28) - rgb_matrix_set_color(28, 255, 130, 15); - } - return false; -} - #endif diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c index 75865672d4df..f5da0c54a565 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/default/keymap.c @@ -33,4 +33,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -/* vim: set noai ts=4 sw=4: */ +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + // Set capslock key to orange (capslock is led number 30) + rgb_matrix_set_color(28, 255, 130, 15); + } + return false; +} diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c index 393e8cb2e4bd..f1c99454ec5b 100644 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk61_rgb/keymaps/via/keymap.c @@ -31,4 +31,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_DEL, KC_END, KC_PGDN, RGB_HUI, KC_UP, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS ) -}; \ No newline at end of file +}; + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + // Set capslock key to orange (capslock is led number 30) + rgb_matrix_set_color(28, 255, 130, 15); + } + return false; +} \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.c b/keyboards/royal_kludge/rk68_rgb/config_led.c index d043f7607191..6ef1810449fc 100644 --- a/keyboards/royal_kludge/rk68_rgb/config_led.c +++ b/keyboards/royal_kludge/rk68_rgb/config_led.c @@ -22,12 +22,4 @@ along with this program. If not, see . # include "rgb_matrix.h" # include "config_led.h" -bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - if (host_keyboard_led_state().caps_lock) { - // Set capslock key to orange (capslock is led number 30) - rgb_matrix_set_color(30, 255, 130, 15); - } - return false; -} - #endif diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c b/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c index 47ba94f6166a..facb2d4fa4a1 100644 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/default/keymap.c @@ -31,4 +31,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI ), -}; \ No newline at end of file +}; + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + // Set capslock key to orange (capslock is led number 30) + rgb_matrix_set_color(30, 255, 130, 15); + } + return false; +} \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c index 3c1f3208258d..72b9227ac3fd 100644 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/keymap.c @@ -31,4 +31,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_SCRL, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI ) -}; \ No newline at end of file +}; + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + // Set capslock key to orange (capslock is led number 30) + rgb_matrix_set_color(30, 255, 130, 15); + } + return false; +} \ No newline at end of file From a96a0abcb929028211731edd6c1bd3ed474aacb5 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sun, 19 Nov 2023 22:41:53 +0000 Subject: [PATCH 23/27] More cleanup --- keyboards/royal_kludge/rk61_rgb/config.h | 2 -- keyboards/royal_kludge/rk61_rgb/readme.md | 6 +++--- keyboards/royal_kludge/rk68_rgb/config.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/keyboards/royal_kludge/rk61_rgb/config.h b/keyboards/royal_kludge/rk61_rgb/config.h index 60a58edc23bc..85b96fecd5ea 100644 --- a/keyboards/royal_kludge/rk61_rgb/config.h +++ b/keyboards/royal_kludge/rk61_rgb/config.h @@ -17,9 +17,7 @@ #pragma once /* RGB matrix configuration can't be fully expressed in JSON as of now */ -//#define RGB_MATRIX_LED_COUNT 61 #define SN32_RGB_MATRIX_ROW_PINS { C5, C6, C4, C8, C9, C7, C11, C12, C10, C14, B13, C13, B15, B14, D3 } -#define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 } /* Enable additional RGB effects */ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS diff --git a/keyboards/royal_kludge/rk61_rgb/readme.md b/keyboards/royal_kludge/rk61_rgb/readme.md index 339c20a87b8a..4099e0b10f6a 100644 --- a/keyboards/royal_kludge/rk61_rgb/readme.md +++ b/keyboards/royal_kludge/rk61_rgb/readme.md @@ -4,13 +4,13 @@ Royal Kludge RK61 non-hotswap rgb edition, original PID 0x24F. -Tested on the Royal Kludge RK61 non-hotswap RGB dual-mode edition, original PID 0x24F (2019/11/04 PCB) +Tested on the Royal Kludge RK61 non-hotswap RGB dual-mode edition, original PID 0x24F - MCU: HFD2201KBA (rebrand SN32F248BF) - PCB: RK61-JX-RGB-HFD; REV: 01; 2019/08/13 - Wired only, no bluetooth support. -Updated to work with SonixQMK/qmk_firmware:sn32_develop branch. Based on previous work by [euwbah](https://github.com/euwbah). Added VIA support. Added VIA 3.0 support. +Based on previous work by [euwbah](https://github.com/euwbah). Added VIA 3.0 support. Keyboard Maintainer: [fpb](https://github.com/fpb) @@ -36,4 +36,4 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to Enter the bootloader: - Physical reset: short the two contacts to the left of the space bar switch with a wire/paperclip. Accessible from the front. -- Layout (after loading QMK): FN + CapsLock +- Layout (after loading QMK): FN + Left Control diff --git a/keyboards/royal_kludge/rk68_rgb/config.h b/keyboards/royal_kludge/rk68_rgb/config.h index e26da5dba35b..72cb3ab669a3 100644 --- a/keyboards/royal_kludge/rk68_rgb/config.h +++ b/keyboards/royal_kludge/rk68_rgb/config.h @@ -17,7 +17,6 @@ #pragma once /* RGB matrix configuration can't be fully expressed in JSON as of now */ -//#define RGB_MATRIX_LED_COUNT 68 #define SN32_RGB_MATRIX_ROW_PINS { C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14 } /* Enable additional RGB effects */ From 69c15a8477991b086af43ed08920a03091cecd88 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sun, 19 Nov 2023 23:02:23 +0000 Subject: [PATCH 24/27] Update keyboards/royal_kludge/rk68_rgb/rules.mk removing file no longer needed Co-authored-by: dexter93 --- keyboards/royal_kludge/rk68_rgb/rules.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/royal_kludge/rk68_rgb/rules.mk b/keyboards/royal_kludge/rk68_rgb/rules.mk index a330b03a2c39..8b64fe6715a1 100644 --- a/keyboards/royal_kludge/rk68_rgb/rules.mk +++ b/keyboards/royal_kludge/rk68_rgb/rules.mk @@ -2,4 +2,3 @@ EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = sn32_flash -SRC += config_led.c From 17e917d60ab93d95f27311b6a7e30b442a2331f2 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Sun, 19 Nov 2023 23:11:32 +0000 Subject: [PATCH 25/27] Code cleanup --- keyboards/royal_kludge/rk61_rgb/config_led.c | 25 ------------------- keyboards/royal_kludge/rk61_rgb/config_led.h | 22 ---------------- .../rk61_rgb/keymaps/via/config.h | 17 ------------- keyboards/royal_kludge/rk61_rgb/rules.mk | 2 -- keyboards/royal_kludge/rk68_rgb/config_led.c | 25 ------------------- keyboards/royal_kludge/rk68_rgb/config_led.h | 22 ---------------- .../rk68_rgb/keymaps/via/config.h | 17 ------------- .../rk68_rgb/keymaps/via/rules.mk | 2 +- 8 files changed, 1 insertion(+), 131 deletions(-) delete mode 100644 keyboards/royal_kludge/rk61_rgb/config_led.c delete mode 100644 keyboards/royal_kludge/rk61_rgb/config_led.h delete mode 100755 keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h delete mode 100644 keyboards/royal_kludge/rk68_rgb/config_led.c delete mode 100644 keyboards/royal_kludge/rk68_rgb/config_led.h delete mode 100755 keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.c b/keyboards/royal_kludge/rk61_rgb/config_led.c deleted file mode 100644 index 6ef1810449fc..000000000000 --- a/keyboards/royal_kludge/rk61_rgb/config_led.c +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 euwbah - -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 . -*/ - -#ifdef RGB_MATRIX_ENABLE - -#include QMK_KEYBOARD_H - -# include "rgb_matrix.h" -# include "config_led.h" - -#endif diff --git a/keyboards/royal_kludge/rk61_rgb/config_led.h b/keyboards/royal_kludge/rk61_rgb/config_led.h deleted file mode 100644 index 3cd942692985..000000000000 --- a/keyboards/royal_kludge/rk61_rgb/config_led.h +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2020 euwbah - -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 - -// Backlight configuration -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_KEYPRESSES \ No newline at end of file diff --git a/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h b/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h deleted file mode 100755 index 14f0d279bde7..000000000000 --- a/keyboards/royal_kludge/rk61_rgb/keymaps/via/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 2023 Benjamín Ausensi - * - * 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 \ No newline at end of file diff --git a/keyboards/royal_kludge/rk61_rgb/rules.mk b/keyboards/royal_kludge/rk61_rgb/rules.mk index a330b03a2c39..e0c218e90f4d 100644 --- a/keyboards/royal_kludge/rk61_rgb/rules.mk +++ b/keyboards/royal_kludge/rk61_rgb/rules.mk @@ -1,5 +1,3 @@ # Data-driven structure doesn't support EEPROM yet EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = sn32_flash - -SRC += config_led.c diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.c b/keyboards/royal_kludge/rk68_rgb/config_led.c deleted file mode 100644 index 6ef1810449fc..000000000000 --- a/keyboards/royal_kludge/rk68_rgb/config_led.c +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 euwbah - -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 . -*/ - -#ifdef RGB_MATRIX_ENABLE - -#include QMK_KEYBOARD_H - -# include "rgb_matrix.h" -# include "config_led.h" - -#endif diff --git a/keyboards/royal_kludge/rk68_rgb/config_led.h b/keyboards/royal_kludge/rk68_rgb/config_led.h deleted file mode 100644 index 3cd942692985..000000000000 --- a/keyboards/royal_kludge/rk68_rgb/config_led.h +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2020 euwbah - -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 - -// Backlight configuration -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_KEYPRESSES \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h b/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h deleted file mode 100755 index b1beedd3c8bd..000000000000 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 2023 Benjamín Ausensi - * - * 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 diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk b/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk index b3925b814f09..2e5ba164ed61 100644 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -OPT_DEFS += -DDYNAMIC_KEYMAP_LAYER_COUNT=3 \ No newline at end of file +#OPT_DEFS += -DDYNAMIC_KEYMAP_LAYER_COUNT=3 \ No newline at end of file From 0c927629f412d7c32a648a13acf93be50cd6a82d Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Mon, 20 Nov 2023 19:53:36 +0000 Subject: [PATCH 26/27] Moved layout limits into config.h --- keyboards/royal_kludge/rk68_rgb/config.h | 1 + keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk | 3 +-- keyboards/royal_kludge/rk68_rgb/rules.mk | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/keyboards/royal_kludge/rk68_rgb/config.h b/keyboards/royal_kludge/rk68_rgb/config.h index 72cb3ab669a3..d042136ef19b 100644 --- a/keyboards/royal_kludge/rk68_rgb/config.h +++ b/keyboards/royal_kludge/rk68_rgb/config.h @@ -26,3 +26,4 @@ /* Configure the effects: */ #define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50 +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk b/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk index 2e5ba164ed61..036bd6d1c3ec 100644 --- a/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/rules.mk @@ -1,2 +1 @@ -VIA_ENABLE = yes -#OPT_DEFS += -DDYNAMIC_KEYMAP_LAYER_COUNT=3 \ No newline at end of file +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/rules.mk b/keyboards/royal_kludge/rk68_rgb/rules.mk index 8b64fe6715a1..e0c218e90f4d 100644 --- a/keyboards/royal_kludge/rk68_rgb/rules.mk +++ b/keyboards/royal_kludge/rk68_rgb/rules.mk @@ -1,4 +1,3 @@ # Data-driven structure doesn't support EEPROM yet EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = sn32_flash - From 5a1adf2790710d3ce4996051f064a41c2d11f73e Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Tue, 21 Nov 2023 15:37:40 +0000 Subject: [PATCH 27/27] Moved layer count limit to specific via keymap folder. --- keyboards/royal_kludge/rk68_rgb/config.h | 4 +--- .../rk68_rgb/keymaps/via/config.h | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h diff --git a/keyboards/royal_kludge/rk68_rgb/config.h b/keyboards/royal_kludge/rk68_rgb/config.h index d042136ef19b..df8e1cfee17a 100644 --- a/keyboards/royal_kludge/rk68_rgb/config.h +++ b/keyboards/royal_kludge/rk68_rgb/config.h @@ -24,6 +24,4 @@ #define RGB_MATRIX_KEYPRESSES /* Configure the effects: */ -#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 3 +#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50 \ No newline at end of file diff --git a/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h b/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h new file mode 100644 index 000000000000..c1c5c9162f98 --- /dev/null +++ b/keyboards/royal_kludge/rk68_rgb/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* Copyright (C) 2023 Benjamín Ausensi + * + * 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 DYNAMIC_KEYMAP_LAYER_COUNT 3