From c2bf1397ef81c30c714562daabf8d696aca5e1a4 Mon Sep 17 00:00:00 2001 From: Ciaanh Date: Fri, 19 May 2023 22:43:16 +0200 Subject: [PATCH] Review comments --- keyboards/ciaanh/kanagawa/ansi/ansi.c | 6 +- keyboards/ciaanh/kanagawa/ansi/ansi.h | 17 --- keyboards/ciaanh/kanagawa/ansi/config.h | 5 + .../ciaanh/kanagawa/{ => ansi}/info.json | 100 +------------- .../kanagawa/ansi/keymaps/default/keymap.c | 33 ++++- .../ciaanh/kanagawa/ansi/keymaps/via/keymap.c | 35 ++++- keyboards/ciaanh/kanagawa/ansi/rules.mk | 2 +- keyboards/ciaanh/kanagawa/config.h | 11 +- keyboards/ciaanh/kanagawa/iso/config.h | 5 + keyboards/ciaanh/kanagawa/iso/info.json | 126 ++++++++++++++++++ keyboards/ciaanh/kanagawa/iso/iso.c | 5 +- keyboards/ciaanh/kanagawa/iso/iso.h | 17 --- .../kanagawa/iso/keymaps/default/keymap.c | 33 ++++- keyboards/ciaanh/kanagawa/iso/rules.mk | 1 + keyboards/ciaanh/kanagawa/kanagawa.c | 17 --- keyboards/ciaanh/kanagawa/kanagawa.h | 51 ------- keyboards/ciaanh/kanagawa/kanagawa.json | 23 ---- keyboards/ciaanh/kanagawa/rules.mk | 6 - 18 files changed, 228 insertions(+), 265 deletions(-) delete mode 100644 keyboards/ciaanh/kanagawa/ansi/ansi.h create mode 100644 keyboards/ciaanh/kanagawa/ansi/config.h rename keyboards/ciaanh/kanagawa/{ => ansi}/info.json (52%) create mode 100644 keyboards/ciaanh/kanagawa/iso/config.h create mode 100644 keyboards/ciaanh/kanagawa/iso/info.json delete mode 100644 keyboards/ciaanh/kanagawa/iso/iso.h delete mode 100644 keyboards/ciaanh/kanagawa/kanagawa.c delete mode 100644 keyboards/ciaanh/kanagawa/kanagawa.h delete mode 100644 keyboards/ciaanh/kanagawa/kanagawa.json diff --git a/keyboards/ciaanh/kanagawa/ansi/ansi.c b/keyboards/ciaanh/kanagawa/ansi/ansi.c index faac5f0f995..1766ba18857 100644 --- a/keyboards/ciaanh/kanagawa/ansi/ansi.c +++ b/keyboards/ciaanh/kanagawa/ansi/ansi.c @@ -13,11 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - - #include "kanagawa.h" +#include "quantum.h" + +#define NA NO_LED #ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_LED_COUNT 82 led_config_t g_led_config = { { diff --git a/keyboards/ciaanh/kanagawa/ansi/ansi.h b/keyboards/ciaanh/kanagawa/ansi/ansi.h deleted file mode 100644 index 1de201d1c0a..00000000000 --- a/keyboards/ciaanh/kanagawa/ansi/ansi.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2023 Ciaanh (@ciaanh) - * - * 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/ciaanh/kanagawa/ansi/config.h b/keyboards/ciaanh/kanagawa/ansi/config.h new file mode 100644 index 00000000000..158d54d5120 --- /dev/null +++ b/keyboards/ciaanh/kanagawa/ansi/config.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_LED_COUNT 82 +#endif \ No newline at end of file diff --git a/keyboards/ciaanh/kanagawa/info.json b/keyboards/ciaanh/kanagawa/ansi/info.json similarity index 52% rename from keyboards/ciaanh/kanagawa/info.json rename to keyboards/ciaanh/kanagawa/ansi/info.json index d0da504a473..6922138a10b 100644 --- a/keyboards/ciaanh/kanagawa/info.json +++ b/keyboards/ciaanh/kanagawa/ansi/info.json @@ -25,7 +25,7 @@ "bootloader": "rp2040", "layouts": { - "LAYOUT_ansi": { + "LAYOUT": { "layout": [ { "label": "Esc", "matrix": [0, 0], "x": 0, "y": 0 }, { "label": "F1", "matrix": [0, 1], "x": 1.5, "y": 0 }, @@ -108,104 +108,6 @@ { "label": "Up", "matrix": [5, 12], "x": 14.25, "y": 4.25 }, - { "label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5 }, - { "label": "Win", "matrix": [5, 1], "x": 1, "y": 5 }, - { "label": "Alt", "matrix": [5, 2], "x": 2, "y": 5 }, - { "label": "Fn1", "matrix": [5, 3], "x": 3, "y": 5 }, - { "label": "LSpace", "matrix": [5, 4], "x": 4.25, "y": 5.5, "w": 2.25 }, - { "label": "RSpace", "matrix": [5, 5], "x": 7, "y": 5.5, "w": 2.75 }, - { "label": "Ralt", "matrix": [5, 6], "x": 10, "y": 5 }, - { "label": "Fn2", "matrix": [5, 7], "x": 11, "y": 5 }, - { "label": "Ctrl", "matrix": [5, 8], "x": 12, "y": 5 }, - { "label": "Left", "matrix": [5, 9], "x": 13.25, "y": 5.25 }, - { "label": "Down", "matrix": [5, 10], "x": 14.25, "y": 5.25 }, - { "label": "Right", "matrix": [5, 11], "x": 15.25, "y": 5.25 } - ] - }, - - "LAYOUT_iso": { - "layout": [ - { "label": "Esc", "matrix": [0, 0], "x": 0, "y": 0 }, - { "label": "F1", "matrix": [0, 1], "x": 1.5, "y": 0 }, - { "label": "F2", "matrix": [0, 2], "x": 2.5, "y": 0 }, - { "label": "F3", "matrix": [0, 3], "x": 3.5, "y": 0 }, - { "label": "F4", "matrix": [0, 4], "x": 4.5, "y": 0 }, - { "label": "F5", "matrix": [0, 5], "x": 6, "y": 0 }, - { "label": "F6", "matrix": [0, 6], "x": 7, "y": 0 }, - { "label": "F7", "matrix": [0, 7], "x": 8, "y": 0 }, - { "label": "F8", "matrix": [0, 8], "x": 9, "y": 0 }, - { "label": "F9", "matrix": [0, 9], "x": 10.5, "y": 0 }, - { "label": "F10", "matrix": [0, 10], "x": 11.5, "y": 0 }, - { "label": "F11", "matrix": [0, 11], "x": 12.5, "y": 0 }, - { "label": "F12", "matrix": [0, 12], "x": 13.5, "y": 0 }, - { "label": "Encoder", "matrix": [0, 13], "x": 16, "y": 0 }, - - { "label": "²", "matrix": [1, 0], "x": 0, "y": 1 }, - { "label": "&", "matrix": [1, 1], "x": 1, "y": 1 }, - { "label": "é", "matrix": [1, 2], "x": 2, "y": 1 }, - { "label": "\"", "matrix": [1, 3], "x": 3, "y": 1 }, - { "label": "'", "matrix": [1, 4], "x": 4, "y": 1 }, - { "label": "(", "matrix": [1, 5], "x": 5, "y": 1 }, - { "label": "-", "matrix": [1, 6], "x": 6, "y": 1 }, - { "label": "è", "matrix": [1, 7], "x": 7, "y": 1 }, - { "label": "_", "matrix": [1, 8], "x": 8, "y": 1 }, - { "label": "ç", "matrix": [1, 9], "x": 9, "y": 1 }, - { "label": "à", "matrix": [1, 10], "x": 10, "y": 1 }, - { "label": ")", "matrix": [1, 11], "x": 11, "y": 1 }, - { "label": "=", "matrix": [1, 12], "x": 12, "y": 1 }, - { "label": "BSpace", "matrix": [1, 13], "x": 13, "y": 1, "w": 2 }, - - { "label": "Del", "matrix": [3, 13], "x": 16, "y": 1 }, - - { "label": "Tab", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5 }, - { "label": "A", "matrix": [2, 1], "x": 1.5, "y": 2 }, - { "label": "Z", "matrix": [2, 2], "x": 2.5, "y": 2 }, - { "label": "E", "matrix": [2, 3], "x": 3.5, "y": 2 }, - { "label": "R", "matrix": [2, 4], "x": 4.5, "y": 2 }, - { "label": "T", "matrix": [2, 5], "x": 5.5, "y": 2 }, - { "label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2 }, - { "label": "U", "matrix": [2, 7], "x": 7.5, "y": 2 }, - { "label": "I", "matrix": [2, 8], "x": 8.5, "y": 2 }, - { "label": "O", "matrix": [2, 9], "x": 9.5, "y": 2 }, - { "label": "P", "matrix": [2, 10], "x": 10.5, "y": 2 }, - { "label": "^", "matrix": [2, 11], "x": 11.5, "y": 2 }, - { "label": "$", "matrix": [2, 12], "x": 12.5, "y": 2 }, - { "label": "Enter", "matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5 }, - - { "label": "Home", "matrix": [4, 13], "x": 16, "y": 2 }, - - { "label": "Caps Lock", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.75 }, - { "label": "Q", "matrix": [3, 1], "x": 1.75, "y": 3 }, - { "label": "S", "matrix": [3, 2], "x": 2.75, "y": 3 }, - { "label": "D", "matrix": [3, 3], "x": 3.75, "y": 3 }, - { "label": "F", "matrix": [3, 4], "x": 4.75, "y": 3 }, - { "label": "G", "matrix": [3, 5], "x": 5.75, "y": 3 }, - { "label": "H", "matrix": [3, 6], "x": 6.75, "y": 3 }, - { "label": "J", "matrix": [3, 7], "x": 7.75, "y": 3 }, - { "label": "K", "matrix": [3, 8], "x": 8.75, "y": 3 }, - { "label": "L", "matrix": [3, 9], "x": 9.75, "y": 3 }, - { "label": "M", "matrix": [3, 10], "x": 10.75, "y": 3 }, - { "label": "ù", "matrix": [3, 11], "x": 11.75, "y": 3 }, - { "label": "*", "matrix": [3, 12], "x": 12.75, "y": 3 }, - - { "label": "End", "matrix": [5, 13], "x": 16, "y": 3 }, - - { "label": "Shift", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25 }, - { "label": "<", "matrix": [4, 1], "x": 1.25, "y": 4 }, - { "label": "W", "matrix": [4, 2], "x": 2.25, "y": 4 }, - { "label": "X", "matrix": [4, 3], "x": 3.25, "y": 4 }, - { "label": "C", "matrix": [4, 4], "x": 4.25, "y": 4 }, - { "label": "V", "matrix": [4, 5], "x": 5.25, "y": 4 }, - { "label": "B", "matrix": [4, 6], "x": 6.25, "y": 4 }, - { "label": "N", "matrix": [4, 7], "x": 7.25, "y": 4 }, - { "label": ",", "matrix": [4, 8], "x": 8.25, "y": 4 }, - { "label": ";", "matrix": [4, 9], "x": 9.25, "y": 4 }, - { "label": ":", "matrix": [4, 10], "x": 10.25, "y": 4 }, - { "label": "!", "matrix": [4, 11], "x": 11.25, "y": 4 }, - { "label": "Shift", "matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75 }, - - { "label": "Up", "matrix": [5, 12], "x": 14.25, "y": 4.25 }, - { "label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5 }, { "label": "Win", "matrix": [5, 1], "x": 1, "y": 5 }, { "label": "Alt", "matrix": [5, 2], "x": 2, "y": 5 }, diff --git a/keyboards/ciaanh/kanagawa/ansi/keymaps/default/keymap.c b/keyboards/ciaanh/kanagawa/ansi/keymaps/default/keymap.c index 371f09cd19e..fe69fa413c9 100644 --- a/keyboards/ciaanh/kanagawa/ansi/keymaps/default/keymap.c +++ b/keyboards/ciaanh/kanagawa/ansi/keymaps/default/keymap.c @@ -13,8 +13,29 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - - #include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H + +#define ___ KC_NO + +enum layers +{ + _BASE, + _CODE, + _FUNC, + _TOP +}; + +enum custom_keycodes +{ + CUSTOMKEY = SAFE_RANGE, + NEW_SAFE_RANGE, +}; + +#define TO_BASE TO(_BASE) +#define TO_FUNC TG(_FUNC) +#define L_CODE MO(_CODE) + +#define _SCRNSHOT LSFT(LGUI(KC_S)) /* Keyboard layout * ,---------. ,---------------------------------------. ,---------------------------------------. ,---------------------------------------. ,---------. @@ -52,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+---------+---------+---------+ | Space | | Space | +---------+---------+---------' | LEFT | DOWN | RIGHT | * `---------' `---------' `---------+---------+---------' */ - [_BASE] = LAYOUT_ansi( + [_BASE] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, \ KC_GRV, 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_DEL, \ @@ -62,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, L_CODE, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, TO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT \ ), - [_CODE] = LAYOUT_ansi( + [_CODE] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ _SCRNSHOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -72,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ ), - [_FUNC] = LAYOUT_ansi( + [_FUNC] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -82,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, RGB_SPD, RGB_SPI, TO_BASE, RGB_SAD, RGB_HUD, RGB_SAI \ ), - [_TOP] = LAYOUT_ansi( + [_TOP] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ diff --git a/keyboards/ciaanh/kanagawa/ansi/keymaps/via/keymap.c b/keyboards/ciaanh/kanagawa/ansi/keymaps/via/keymap.c index 371f09cd19e..741676ed746 100644 --- a/keyboards/ciaanh/kanagawa/ansi/keymaps/via/keymap.c +++ b/keyboards/ciaanh/kanagawa/ansi/keymaps/via/keymap.c @@ -12,9 +12,30 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - */ - - #include QMK_KEYBOARD_H + */ +#include QMK_KEYBOARD_H + +#define ___ KC_NO + +enum layers +{ + _BASE, + _CODE, + _FUNC, + _TOP +}; + +enum custom_keycodes +{ + CUSTOMKEY = SAFE_RANGE, + NEW_SAFE_RANGE, +}; + +#define TO_BASE TO(_BASE) +#define TO_FUNC TG(_FUNC) +#define L_CODE MO(_CODE) + +#define _SCRNSHOT LSFT(LGUI(KC_S)) /* Keyboard layout * ,---------. ,---------------------------------------. ,---------------------------------------. ,---------------------------------------. ,---------. @@ -52,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+---------+---------+---------+ | Space | | Space | +---------+---------+---------' | LEFT | DOWN | RIGHT | * `---------' `---------' `---------+---------+---------' */ - [_BASE] = LAYOUT_ansi( + [_BASE] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, \ KC_GRV, 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_DEL, \ @@ -62,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, L_CODE, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, TO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT \ ), - [_CODE] = LAYOUT_ansi( + [_CODE] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ _SCRNSHOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -72,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ ), - [_FUNC] = LAYOUT_ansi( + [_FUNC] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -82,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, RGB_SPD, RGB_SPI, TO_BASE, RGB_SAD, RGB_HUD, RGB_SAI \ ), - [_TOP] = LAYOUT_ansi( + [_TOP] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ diff --git a/keyboards/ciaanh/kanagawa/ansi/rules.mk b/keyboards/ciaanh/kanagawa/ansi/rules.mk index 14ace897304..a40474b4d5c 100644 --- a/keyboards/ciaanh/kanagawa/ansi/rules.mk +++ b/keyboards/ciaanh/kanagawa/ansi/rules.mk @@ -1 +1 @@ -RGB_MATRIX_CUSTOM_USER = no +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ciaanh/kanagawa/config.h b/keyboards/ciaanh/kanagawa/config.h index 60b87421133..b9b5b654f63 100644 --- a/keyboards/ciaanh/kanagawa/config.h +++ b/keyboards/ciaanh/kanagawa/config.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - - #pragma once +#pragma once /* OLED SPI Defines */ #ifdef OLED_ENABLE @@ -33,14 +32,6 @@ /* RGB Defines */ # define RGB_DI_PIN GP4 -# ifdef KEYBOARD_ciaanh_kanagawa_ansi -# define RGB_MATRIX_LED_COUNT 82 -# endif - -# ifdef KEYBOARD_ciaanh_kanagawa_iso -# define RGB_MATRIX_LED_COUNT 83 -# endif - # define RGB_MATRIX_CENTER { 90, 28 } /* Enable Framebuffer and keypress effects */ diff --git a/keyboards/ciaanh/kanagawa/iso/config.h b/keyboards/ciaanh/kanagawa/iso/config.h new file mode 100644 index 00000000000..0be2bc82a63 --- /dev/null +++ b/keyboards/ciaanh/kanagawa/iso/config.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_LED_COUNT 83 +#endif \ No newline at end of file diff --git a/keyboards/ciaanh/kanagawa/iso/info.json b/keyboards/ciaanh/kanagawa/iso/info.json new file mode 100644 index 00000000000..cfc06d5c8ae --- /dev/null +++ b/keyboards/ciaanh/kanagawa/iso/info.json @@ -0,0 +1,126 @@ +{ + "keyboard_name": "Kanagawa", + "url": "https://github.com/Ciaanh/keyboards/tree/main/Kanagawa", + "manufacturer": "Ciaanh", + "maintainer": "Ciaanh", + "usb": { + "vid": "0xC1E0", + "pid": "0x0010", + "device_version": "2.1.0" + }, + "bootmagic": { + "matrix": [0, 13] + }, + "encoder": { + "rotary": [ + {"pin_a": "GP2", "pin_b": "GP3"} + ] + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "rows": ["GP28", "GP27", "GP26", "GP22", "GP21", "GP20"], + "cols": ["GP5", "GP6", "GP7", "GP8", "GP9", "GP10", "GP11", "GP12", "GP13", "GP14", "GP15", "GP16", "GP17", "GP18"] + }, + "processor": "RP2040", + "bootloader": "rp2040", + + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "F1", "matrix": [0, 1], "x": 1.5, "y": 0 }, + { "label": "F2", "matrix": [0, 2], "x": 2.5, "y": 0 }, + { "label": "F3", "matrix": [0, 3], "x": 3.5, "y": 0 }, + { "label": "F4", "matrix": [0, 4], "x": 4.5, "y": 0 }, + { "label": "F5", "matrix": [0, 5], "x": 6, "y": 0 }, + { "label": "F6", "matrix": [0, 6], "x": 7, "y": 0 }, + { "label": "F7", "matrix": [0, 7], "x": 8, "y": 0 }, + { "label": "F8", "matrix": [0, 8], "x": 9, "y": 0 }, + { "label": "F9", "matrix": [0, 9], "x": 10.5, "y": 0 }, + { "label": "F10", "matrix": [0, 10], "x": 11.5, "y": 0 }, + { "label": "F11", "matrix": [0, 11], "x": 12.5, "y": 0 }, + { "label": "F12", "matrix": [0, 12], "x": 13.5, "y": 0 }, + { "label": "Encoder", "matrix": [0, 13], "x": 16, "y": 0 }, + + { "label": "²", "matrix": [1, 0], "x": 0, "y": 1 }, + { "label": "&", "matrix": [1, 1], "x": 1, "y": 1 }, + { "label": "é", "matrix": [1, 2], "x": 2, "y": 1 }, + { "label": "\"", "matrix": [1, 3], "x": 3, "y": 1 }, + { "label": "'", "matrix": [1, 4], "x": 4, "y": 1 }, + { "label": "(", "matrix": [1, 5], "x": 5, "y": 1 }, + { "label": "-", "matrix": [1, 6], "x": 6, "y": 1 }, + { "label": "è", "matrix": [1, 7], "x": 7, "y": 1 }, + { "label": "_", "matrix": [1, 8], "x": 8, "y": 1 }, + { "label": "ç", "matrix": [1, 9], "x": 9, "y": 1 }, + { "label": "à", "matrix": [1, 10], "x": 10, "y": 1 }, + { "label": ")", "matrix": [1, 11], "x": 11, "y": 1 }, + { "label": "=", "matrix": [1, 12], "x": 12, "y": 1 }, + { "label": "BSpace", "matrix": [1, 13], "x": 13, "y": 1, "w": 2 }, + + { "label": "Del", "matrix": [3, 13], "x": 16, "y": 1 }, + + { "label": "Tab", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5 }, + { "label": "A", "matrix": [2, 1], "x": 1.5, "y": 2 }, + { "label": "Z", "matrix": [2, 2], "x": 2.5, "y": 2 }, + { "label": "E", "matrix": [2, 3], "x": 3.5, "y": 2 }, + { "label": "R", "matrix": [2, 4], "x": 4.5, "y": 2 }, + { "label": "T", "matrix": [2, 5], "x": 5.5, "y": 2 }, + { "label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2 }, + { "label": "U", "matrix": [2, 7], "x": 7.5, "y": 2 }, + { "label": "I", "matrix": [2, 8], "x": 8.5, "y": 2 }, + { "label": "O", "matrix": [2, 9], "x": 9.5, "y": 2 }, + { "label": "P", "matrix": [2, 10], "x": 10.5, "y": 2 }, + { "label": "^", "matrix": [2, 11], "x": 11.5, "y": 2 }, + { "label": "$", "matrix": [2, 12], "x": 12.5, "y": 2 }, + { "label": "Enter", "matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5 }, + + { "label": "Home", "matrix": [4, 13], "x": 16, "y": 2 }, + + { "label": "Caps Lock", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.75 }, + { "label": "Q", "matrix": [3, 1], "x": 1.75, "y": 3 }, + { "label": "S", "matrix": [3, 2], "x": 2.75, "y": 3 }, + { "label": "D", "matrix": [3, 3], "x": 3.75, "y": 3 }, + { "label": "F", "matrix": [3, 4], "x": 4.75, "y": 3 }, + { "label": "G", "matrix": [3, 5], "x": 5.75, "y": 3 }, + { "label": "H", "matrix": [3, 6], "x": 6.75, "y": 3 }, + { "label": "J", "matrix": [3, 7], "x": 7.75, "y": 3 }, + { "label": "K", "matrix": [3, 8], "x": 8.75, "y": 3 }, + { "label": "L", "matrix": [3, 9], "x": 9.75, "y": 3 }, + { "label": "M", "matrix": [3, 10], "x": 10.75, "y": 3 }, + { "label": "ù", "matrix": [3, 11], "x": 11.75, "y": 3 }, + { "label": "*", "matrix": [3, 12], "x": 12.75, "y": 3 }, + + { "label": "End", "matrix": [5, 13], "x": 16, "y": 3 }, + + { "label": "Shift", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25 }, + { "label": "<", "matrix": [4, 1], "x": 1.25, "y": 4 }, + { "label": "W", "matrix": [4, 2], "x": 2.25, "y": 4 }, + { "label": "X", "matrix": [4, 3], "x": 3.25, "y": 4 }, + { "label": "C", "matrix": [4, 4], "x": 4.25, "y": 4 }, + { "label": "V", "matrix": [4, 5], "x": 5.25, "y": 4 }, + { "label": "B", "matrix": [4, 6], "x": 6.25, "y": 4 }, + { "label": "N", "matrix": [4, 7], "x": 7.25, "y": 4 }, + { "label": ",", "matrix": [4, 8], "x": 8.25, "y": 4 }, + { "label": ";", "matrix": [4, 9], "x": 9.25, "y": 4 }, + { "label": ":", "matrix": [4, 10], "x": 10.25, "y": 4 }, + { "label": "!", "matrix": [4, 11], "x": 11.25, "y": 4 }, + { "label": "Shift", "matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75 }, + + { "label": "Up", "matrix": [5, 12], "x": 14.25, "y": 4.25 }, + + { "label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5 }, + { "label": "Win", "matrix": [5, 1], "x": 1, "y": 5 }, + { "label": "Alt", "matrix": [5, 2], "x": 2, "y": 5 }, + { "label": "Fn1", "matrix": [5, 3], "x": 3, "y": 5 }, + { "label": "LSpace", "matrix": [5, 4], "x": 4.25, "y": 5.5, "w": 2.25 }, + { "label": "RSpace", "matrix": [5, 5], "x": 7, "y": 5.5, "w": 2.75 }, + { "label": "Ralt", "matrix": [5, 6], "x": 10, "y": 5 }, + { "label": "Fn2", "matrix": [5, 7], "x": 11, "y": 5 }, + { "label": "Ctrl", "matrix": [5, 8], "x": 12, "y": 5 }, + { "label": "Left", "matrix": [5, 9], "x": 13.25, "y": 5.25 }, + { "label": "Down", "matrix": [5, 10], "x": 14.25, "y": 5.25 }, + { "label": "Right", "matrix": [5, 11], "x": 15.25, "y": 5.25 } + ] + } + } +} diff --git a/keyboards/ciaanh/kanagawa/iso/iso.c b/keyboards/ciaanh/kanagawa/iso/iso.c index 712029d8846..bbcfaed4323 100644 --- a/keyboards/ciaanh/kanagawa/iso/iso.c +++ b/keyboards/ciaanh/kanagawa/iso/iso.c @@ -13,8 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - - #include "kanagawa.h" +#include "quantum.h" + +#define NA NO_LED #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/ciaanh/kanagawa/iso/iso.h b/keyboards/ciaanh/kanagawa/iso/iso.h deleted file mode 100644 index 69cbd9c747c..00000000000 --- a/keyboards/ciaanh/kanagawa/iso/iso.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2023 Ciaanh (@ciaanh) - * - * 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/ciaanh/kanagawa/iso/keymaps/default/keymap.c b/keyboards/ciaanh/kanagawa/iso/keymaps/default/keymap.c index a8265e6694b..5bdfe62ae9a 100644 --- a/keyboards/ciaanh/kanagawa/iso/keymaps/default/keymap.c +++ b/keyboards/ciaanh/kanagawa/iso/keymaps/default/keymap.c @@ -13,8 +13,29 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - - #include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H + +#define ___ KC_NO + +enum layers +{ + _BASE, + _CODE, + _FUNC, + _TOP +}; + +enum custom_keycodes +{ + CUSTOMKEY = SAFE_RANGE, + NEW_SAFE_RANGE, +}; + +#define TO_BASE TO(_BASE) +#define TO_FUNC TG(_FUNC) +#define L_CODE MO(_CODE) + +#define _SCRNSHOT LSFT(LGUI(KC_S)) /* Keyboard layout * ,---------. ,---------------------------------------. ,---------------------------------------. ,---------------------------------------. ,---------. @@ -52,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+---------+---------+---------+ | Space | | Space | +---------+---------+---------' | LEFT | DOWN | RIGHT | * `---------' `---------' `---------+---------+---------' */ - [_BASE] = LAYOUT_iso( + [_BASE] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, \ KC_GRV, 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_DEL, \ @@ -62,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, L_CODE, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, TO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT \ ), - [_CODE] = LAYOUT_iso( + [_CODE] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ _SCRNSHOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -72,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ ), - [_FUNC] = LAYOUT_iso( + [_FUNC] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -82,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, RGB_SPD, RGB_SPI, TO_BASE, RGB_SAD, RGB_HUD, RGB_SAI \ ), - [_TOP] = LAYOUT_iso( + [_TOP] = LAYOUT( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ diff --git a/keyboards/ciaanh/kanagawa/iso/rules.mk b/keyboards/ciaanh/kanagawa/iso/rules.mk index e69de29bb2d..a40474b4d5c 100644 --- a/keyboards/ciaanh/kanagawa/iso/rules.mk +++ b/keyboards/ciaanh/kanagawa/iso/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ciaanh/kanagawa/kanagawa.c b/keyboards/ciaanh/kanagawa/kanagawa.c deleted file mode 100644 index d5fa70946ba..00000000000 --- a/keyboards/ciaanh/kanagawa/kanagawa.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2023 Ciaanh (@ciaanh) - * - * 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 "kanagawa.h" diff --git a/keyboards/ciaanh/kanagawa/kanagawa.h b/keyboards/ciaanh/kanagawa/kanagawa.h deleted file mode 100644 index cc3fa9ffc0b..00000000000 --- a/keyboards/ciaanh/kanagawa/kanagawa.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2023 Ciaanh (@ciaanh) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - - #pragma once - -#include "quantum.h" - -#ifdef KEYBOARD_ciaanh_kanagawa_ansi - #include "ansi.h" -#endif - -#ifdef KEYBOARD_ciaanh_kanagawa_iso - #include "iso.h" -#endif - -#define ___ KC_NO -#define NA NO_LED - -enum layers -{ - _BASE, - _CODE, - _FUNC, - _TOP -}; - -enum custom_keycodes -{ - CUSTOMKEY = SAFE_RANGE, - NEW_SAFE_RANGE, -}; - -#define TO_BASE TO(_BASE) -#define TO_FUNC TG(_FUNC) - -#define L_CODE MO(_CODE) - -#define _SCRNSHOT LSFT(LGUI(KC_S)) \ No newline at end of file diff --git a/keyboards/ciaanh/kanagawa/kanagawa.json b/keyboards/ciaanh/kanagawa/kanagawa.json deleted file mode 100644 index 82e887b9c3b..00000000000 --- a/keyboards/ciaanh/kanagawa/kanagawa.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "Kanagawa", - "vendorId": "0xC1E0", - "productId": "0x0010", - "matrix": { "rows": 6, "cols": 14 }, - "menus": [ "qmk_rgb_matrix" ], - "keycodes": [ "qmk_lighting" ], - "layouts": { - "keymap": [ - [{"x":2.75,"c":"#777777"},"0,0",{"x":0.5,"c":"#cccccc"},"0,1","0,2","0,3","0,4",{"x":0.25},"0,5","0,6","0,7","0,8",{"x":0.25},"0,9","0,10","0,11","0,12",{"x":2.25,"c":"#777777"},"0,13\n\n\n\n\n\n\n\n\ne0"], - [{"y":0.25,"x":2.75,"c":"#cccccc"},"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",{"c":"#aaaaaa","w":2},"1,13",{"x":1.25,"c":"#777777"},"3,13"], - [{"x":2.75,"c":"#aaaaaa","w":1.5},"2,0",{"c":"#cccccc"},"2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12",{"w":1.5},"2,13\n\n\n1,0",{"x":1.25,"c":"#777777"},"4,13",{"x":1.75,"c":"#cccccc","w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25},"2,13\n\n\n1,1"], - [{"x":2.75,"c":"#aaaaaa","w":1.75},"3,0",{"c":"#cccccc"},"3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10","3,11",{"c":"#777777","w":2.25},"3,12\n\n\n1,0",{"x":1.25},"5,13",{"x":0.75},"3,12\n\n\n1,1"], - [{"c":"#aaaaaa","w":1.25},"4,0\n\n\n0,1",{"c":"#cccccc"},"4,1\n\n\n0,1",{"x":0.5,"c":"#aaaaaa","w":2.25},"4,0\n\n\n0,0",{"c":"#cccccc"},"4,2","4,3","4,4","4,5","4,6","4,7","4,8","4,9","4,10","4,11",{"c":"#aaaaaa","w":1.75},"4,12"], - [{"y":-0.75,"x":17,"c":"#777777"},"5,12"], - [{"y":-0.25,"x":2.75,"c":"#aaaaaa"},"5,0","5,1","5,2",{"x":7},"5,6","5,7","5,8"], - [{"y":-0.75,"x":16,"c":"#777777"},"5,9","5,10","5,11"], - [{"ry":5.5,"y":-0.25,"x":5.75},"5,3"], - [{"r":15,"rx":6.5,"y":-0.25,"x":0.75,"w":2.25},"5,4"], - [{"r":-15,"rx":12.5,"y":-0.25,"x":-3,"w":2.75},"5,5"] - ] - } -} \ No newline at end of file diff --git a/keyboards/ciaanh/kanagawa/rules.mk b/keyboards/ciaanh/kanagawa/rules.mk index d0d448472b0..51265838985 100644 --- a/keyboards/ciaanh/kanagawa/rules.mk +++ b/keyboards/ciaanh/kanagawa/rules.mk @@ -1,7 +1,3 @@ -# RP2040-specific options -ALLOW_WARNINGS = yes -PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. - BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control @@ -24,8 +20,6 @@ OLED_DRIVER = SSD1306 OPT_DEFS += -DHAL_USE_I2C=TRUE -ENCODER_MAP_ENABLE = yes - LTO_ENABLE = no # reduce size DEFAULT_FOLDER = ciaanh/kanagawa/ansi