diff options
author | Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> | 2022-02-05 00:59:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 07:59:38 -0800 |
commit | 405c04e0d2966eaa3ad7d96f53863ed7d9618bc4 (patch) | |
tree | ab7b7ebd79db1d70e1e1dfb5a6dd1eeb90230995 /keyboards/gl516/j73gl | |
parent | 1cb423c424363f758d0f988b3c7e7a4e16ced74b (diff) |
[Keyboard] Add Keyboards GL516s (#14950)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/gl516/j73gl')
-rw-r--r-- | keyboards/gl516/j73gl/config.h | 63 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/info.json | 84 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/j73gl.c | 55 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/j73gl.h | 40 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/keymaps/default/keymap.c | 57 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/keymaps/via/keymap.c | 74 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/keymaps/via_rgb_matrix/config.h | 43 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/keymaps/via_rgb_matrix/keymap.c | 74 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk | 7 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/matrix.c | 158 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/readme.md | 27 | ||||
-rw-r--r-- | keyboards/gl516/j73gl/rules.mk | 22 |
13 files changed, 705 insertions, 0 deletions
diff --git a/keyboards/gl516/j73gl/config.h b/keyboards/gl516/j73gl/config.h new file mode 100644 index 0000000000..50d745ebb1 --- /dev/null +++ b/keyboards/gl516/j73gl/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2021 Salicylic_Acid + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xE8D0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT j73gl + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, E6 } +#define UNUSED_PINS + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifndef RGBLED_NUM + #define RGBLED_NUM 73 +#endif + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE + diff --git a/keyboards/gl516/j73gl/info.json b/keyboards/gl516/j73gl/info.json new file mode 100644 index 0000000000..fc79f923a5 --- /dev/null +++ b/keyboards/gl516/j73gl/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "j73gl", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"0,0", "x":0, "y":0}, + {"label":"0,1", "x":1, "y":0}, + {"label":"0,2", "x":2, "y":0}, + {"label":"0,3", "x":3, "y":0}, + {"label":"0,4", "x":4, "y":0}, + {"label":"0,5", "x":5, "y":0}, + {"label":"0,6", "x":6, "y":0}, + {"label":"5,0", "x":7, "y":0}, + {"label":"5,1", "x":8, "y":0}, + {"label":"5,2", "x":9, "y":0}, + {"label":"5,3", "x":10, "y":0}, + {"label":"5,4", "x":11, "y":0}, + {"label":"5,5", "x":12, "y":0}, + {"label":"5,6", "x":13, "y":0}, + {"label":"6,6", "x":14, "y":0}, + {"label":"5,7", "x":15, "y":0}, + {"label":"1,0", "x":0, "y":1, "w":1.5}, + {"label":"1,1", "x":1.5, "y":1}, + {"label":"1,2", "x":2.5, "y":1}, + {"label":"1,3", "x":3.5, "y":1}, + {"label":"1,4", "x":4.5, "y":1}, + {"label":"1,5", "x":5.5, "y":1}, + {"label":"1,6", "x":6.5, "y":1}, + {"label":"6,0", "x":7.5, "y":1}, + {"label":"6,1", "x":8.5, "y":1}, + {"label":"6,2", "x":9.5, "y":1}, + {"label":"6,3", "x":10.5, "y":1}, + {"label":"6,4", "x":11.5, "y":1}, + {"label":"6,5", "x":12.5, "y":1}, + {"label":"7,6", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"6,7", "x":15, "y":1}, + {"label":"2,0", "x":0, "y":2, "w":1.75}, + {"label":"2,1", "x":1.75, "y":2}, + {"label":"2,2", "x":2.75, "y":2}, + {"label":"2,3", "x":3.75, "y":2}, + {"label":"2,4", "x":4.75, "y":2}, + {"label":"2,5", "x":5.75, "y":2}, + {"label":"2,6", "x":6.75, "y":2}, + {"label":"7,0", "x":7.75, "y":2}, + {"label":"7,1", "x":8.75, "y":2}, + {"label":"7,2", "x":9.75, "y":2}, + {"label":"7,3", "x":10.75, "y":2}, + {"label":"7,4", "x":11.75, "y":2}, + {"label":"7,5", "x":12.75, "y":2}, + {"label":"7,7", "x":15, "y":2}, + {"label":"3,0", "x":0, "y":3, "w":2.25}, + {"label":"3,1", "x":2.25, "y":3}, + {"label":"3,2", "x":3.25, "y":3}, + {"label":"3,3", "x":4.25, "y":3}, + {"label":"3,4", "x":5.25, "y":3}, + {"label":"3,5", "x":6.25, "y":3}, + {"label":"3,6", "x":7.25, "y":3}, + {"label":"8,0", "x":8.25, "y":3}, + {"label":"8,1", "x":9.25, "y":3}, + {"label":"8,2", "x":10.25, "y":3}, + {"label":"8,3", "x":11.25, "y":3}, + {"label":"8,5", "x":12.25, "y":3, "w":1.75}, + {"label":"8,6", "x":14, "y":3}, + {"label":"8,7", "x":15, "y":3}, + {"label":"4,0", "x":0, "y":4, "w":1.25}, + {"label":"4,1", "x":1.25, "y":4}, + {"label":"4,2", "x":2.25, "y":4, "w":1.25}, + {"label":"4,3", "x":3.5, "y":4}, + {"label":"4,4", "x":4.5, "y":4, "w":1.25}, + {"label":"4,5", "x":5.75, "y":4}, + {"label":"4,6", "x":6.75, "y":4}, + {"label":"9,0", "x":7.75, "y":4, "w":1.25}, + {"label":"9,1", "x":9, "y":4}, + {"label":"9,2", "x":10, "y":4, "w":1.25}, + {"label":"9,3", "x":11.25, "y":4, "w":1.25}, + {"label":"9,5", "x":13, "y":4}, + {"label":"9,6", "x":14, "y":4}, + {"label":"9,7", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/gl516/j73gl/j73gl.c b/keyboards/gl516/j73gl/j73gl.c new file mode 100644 index 0000000000..483b005844 --- /dev/null +++ b/keyboards/gl516/j73gl/j73gl.c @@ -0,0 +1,55 @@ +/* +Copyright 2021 Salicylic_Acid + +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 <http://www.gnu.org/licenses/>. +*/ + +#include "j73gl.h" + +#ifdef RGB_MATRIX_ENABLE + led_config_t g_led_config = { { + // Key Matrix to LED Index + { 67,66,60,59,50,49,40,39 }, + { 68,65,61,58,51,46,48,41 }, + { 69,64,62,57,52,45,47,42 }, + { 70,63,56,53,46,43,36,33 }, + { 71, 72, 55, 54, 45,44,35,34 }, + { 30,29,20,19,10, 9, 8, 0 }, + { 38,31,28,21,18,11, 1 }, + { 37,32,27,22,17,12,7,2 }, + { 26,23,16, 13, 6,3 }, + { 25, 24, 15, 14,5,4 } + }, { + // LED Index to Physical Position + { 224, 0 }, { 224, 16 }, { 224, 32 }, { 224, 48 }, { 224, 64 },{ 209, 64 }, { 209, 48 }, { 206, 24 }, { 209, 0 }, { 194, 0 }, + { 179, 0 }, { 188, 16 }, { 191, 32 }, { 189, 48 }, { 194, 64 },{ 171, 64 }, { 169, 48 }, { 176, 32 }, { 173, 16 }, { 165, 0 }, + { 150, 0 }, { 156, 16 }, { 161, 32 }, { 154, 48 }, { 152, 64 },{ 135, 64 }, { 139, 48 }, { 146, 32 }, { 143, 16 }, { 135, 0 }, + { 120, 0 }, { 128, 16 }, { 131, 32 }, { 124, 48 }, { 118, 64 },{ 101, 64 }, { 109, 48 }, { 116, 32 }, { 113, 16 }, { 105, 0 }, + { 90, 0 }, { 98, 16 }, { 101, 32 }, { 94, 48 }, { 86, 64 },{ 69, 64 }, { 79, 48 }, { 86, 32 }, { 83, 16 }, { 75, 0 }, + { 60, 0 }, { 68, 16 }, { 71, 32 }, { 64, 48 }, { 53, 64 },{ 36, 64 }, { 49, 48 }, { 56, 32 }, { 53, 16 }, { 45, 0 }, + { 30, 0 }, { 38, 16 }, { 41, 32 }, { 34, 48 }, { 26, 32 },{ 23, 16 }, { 15, 48 }, { 0, 0 }, { 11, 16 }, { 13, 32 }, + { 17, 48 }, { 2, 64 }, { 19, 64 } + }, { + // LED Index to Flag + 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, 4, 4, + 4, 4, 4 +} }; +#endif + diff --git a/keyboards/gl516/j73gl/j73gl.h b/keyboards/gl516/j73gl/j73gl.h new file mode 100644 index 0000000000..ad4821461a --- /dev/null +++ b/keyboards/gl516/j73gl/j73gl.h @@ -0,0 +1,40 @@ +/* +Copyright 2021 Salicylic_Acid + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, R16, R07, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R17, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, R27, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R35, R36, R37, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R45, R46, R47 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17 }, \ + { R20, R21, R22, R23, R24, R25, R26, R27 }, \ + { R30, R31, R32, R33, KC_NO, R35, R36, R37 }, \ + { R40, R41, R42, R43, KC_NO, R45, R46, R47 } \ + } diff --git a/keyboards/gl516/j73gl/keymaps/default/keymap.c b/keyboards/gl516/j73gl/keymaps/default/keymap.c new file mode 100644 index 0000000000..846df7d2b7 --- /dev/null +++ b/keyboards/gl516/j73gl/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2021 Salicylic_Acid + +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 <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H +#include "keymap_jp.h" +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------+--------------------------------------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_HOME, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_END, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +LT(_FN,JP_ZKHK), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, 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, RSFT_T(JP_BSLS), KC_UP, KC_PGDN, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, KC_SPC, KC_SPC, KC_SPC, JP_HENK, JP_KANA, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ), + [_FN] = LAYOUT( + //,-----------------------------------------------------+--------------------------------------------------------------------------------. + RESET, 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_PSCR, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ) +}; + diff --git a/keyboards/gl516/j73gl/keymaps/via/keymap.c b/keyboards/gl516/j73gl/keymaps/via/keymap.c new file mode 100644 index 0000000000..3e8fba928d --- /dev/null +++ b/keyboards/gl516/j73gl/keymaps/via/keymap.c @@ -0,0 +1,74 @@ +/* +Copyright 2021 Salicylic_Acid + +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 <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H +#include "keymap_jp.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, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_HOME, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_END, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +LT(1,JP_ZKHK), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, 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, RSFT_T(JP_BSLS), KC_UP, KC_PGDN, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, KC_SPC, KC_SPC, KC_SPC, JP_HENK, JP_KANA, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ), + [1] = LAYOUT( + //,-----------------------------------------------------+--------------------------------------------------------------------------------. + RESET, 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_PSCR, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ), + [2] = LAYOUT( + //,-----------------------------------------------------+--------------------------------------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ), + [3] = LAYOUT( + //,-----------------------------------------------------+--------------------------------------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ) +}; diff --git a/keyboards/gl516/j73gl/keymaps/via/rules.mk b/keyboards/gl516/j73gl/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/gl516/j73gl/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/config.h b/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/config.h new file mode 100644 index 0000000000..d2e1d20893 --- /dev/null +++ b/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/config.h @@ -0,0 +1,43 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + +#define DRIVER_LED_TOTAL 73 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 +#endif diff --git a/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/keymap.c b/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/keymap.c new file mode 100644 index 0000000000..3e8fba928d --- /dev/null +++ b/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/keymap.c @@ -0,0 +1,74 @@ +/* +Copyright 2021 Salicylic_Acid + +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 <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H +#include "keymap_jp.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, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_HOME, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_END, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +LT(1,JP_ZKHK), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, 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, RSFT_T(JP_BSLS), KC_UP, KC_PGDN, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, KC_SPC, KC_SPC, KC_SPC, JP_HENK, JP_KANA, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ), + [1] = LAYOUT( + //,-----------------------------------------------------+--------------------------------------------------------------------------------. + RESET, 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_PSCR, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ), + [2] = LAYOUT( + //,-----------------------------------------------------+--------------------------------------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ), + [3] = LAYOUT( + //,-----------------------------------------------------+--------------------------------------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------+--------------------------------------------------------------------------------' + ) +}; diff --git a/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk b/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk new file mode 100644 index 0000000000..294015d80b --- /dev/null +++ b/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk @@ -0,0 +1,7 @@ +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +VIA_ENABLE = yes +LTO_ENABLE = yes +SPACE_CADET_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/gl516/j73gl/matrix.c b/keyboards/gl516/j73gl/matrix.c new file mode 100644 index 0000000000..1a97fdfd61 --- /dev/null +++ b/keyboards/gl516/j73gl/matrix.c @@ -0,0 +1,158 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 <http://www.gnu.org/licenses/>. +*/ +#include "matrix.h" +#include "quantum.h" + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +static void select_row(uint8_t row) +{ + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) +{ + setPinInputHigh(row_pins[row]); +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_col(uint8_t col) +{ + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) +{ + setPinInputHigh(col_pins[col]); +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + matrix_io_delay(); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + matrix_io_delay(); + + // For each row... + for(uint8_t row_index = 0; row_index < MATRIX_ROWS/2; row_index++) + { + uint8_t tmp = row_index + MATRIX_ROWS/2; + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[tmp]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) + { + // Pin LO, set col bit + current_matrix[tmp] |= (MATRIX_ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[tmp] &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[tmp]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +void matrix_init_custom(void) { + // initialize key pins + init_pins(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) +{ + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + //else + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } + + return changed; +} diff --git a/keyboards/gl516/j73gl/readme.md b/keyboards/gl516/j73gl/readme.md new file mode 100644 index 0000000000..b6f1ebdc24 --- /dev/null +++ b/keyboards/gl516/j73gl/readme.md @@ -0,0 +1,27 @@ +# j73gl + +![j73gl](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20210911/20210911015520.png) + +This is 73 keys Japanese style keyboard. +Use the GL516 case. + +* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +* Hardware Supported: j73gl PCB, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/GL516_Exemple), [yushakobo Shop](https://shop.yushakobo.jp/products/3342) + +Make example for this keyboard (after setting up your build environment): + + make gl516/j73gl:default + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +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). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/a52gl-j73gl-build-guide) + diff --git a/keyboards/gl516/j73gl/rules.mk b/keyboards/gl516/j73gl/rules.mk new file mode 100644 index 0000000000..a7521a0e40 --- /dev/null +++ b/keyboards/gl516/j73gl/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +CUSTOM_MATRIX = lite + +SRC += matrix.c
\ No newline at end of file |