From 445b578b7456ccd58bac8d5f1f958e7be3e5d205 Mon Sep 17 00:00:00 2001 From: kopibeng Date: Thu, 8 Jul 2021 00:28:51 +0800 Subject: [PATCH] Added support for Christine, XT65E and Adelais --- keyboards/kopibeng/adelais/.noci | 0 keyboards/kopibeng/adelais/adelais.c | 38 +++ keyboards/kopibeng/adelais/adelais.h | 49 ++++ keyboards/kopibeng/adelais/config.h | 42 +++ keyboards/kopibeng/adelais/info.json | 150 ++++++++++ .../adelais/keymaps/brandonschlack/config.h | 30 ++ .../adelais/keymaps/brandonschlack/keymap.c | 270 ++++++++++++++++++ .../adelais/keymaps/brandonschlack/readme.md | 1 + .../kopibeng/adelais/keymaps/default/keymap.c | 59 ++++ .../adelais/keymaps/default/readme.md | 1 + .../kopibeng/adelais/keymaps/via/keymap.c | 71 +++++ .../kopibeng/adelais/keymaps/via/readme.md | 1 + .../kopibeng/adelais/keymaps/via/rules.mk | 1 + keyboards/kopibeng/adelais/readme.md | 18 ++ keyboards/kopibeng/adelais/rules.mk | 24 ++ keyboards/kopibeng/adelais/standard_led/.noci | 0 .../kopibeng/adelais/standard_led/config.h | 34 +++ .../kopibeng/adelais/standard_led/halconf.h | 27 ++ .../kopibeng/adelais/standard_led/mcuconf.h | 36 +++ .../kopibeng/adelais/standard_led/readme.md | 16 ++ .../kopibeng/adelais/standard_led/rev2/.noci | 0 .../adelais/standard_led/rev2/config.h | 3 + .../adelais/standard_led/rev2/rules.mk | 0 .../adelais/standard_led/rev3/config.h | 9 + .../adelais/standard_led/rev3/rules.mk | 1 + .../adelais/standard_led/rev4/config.h | 25 ++ .../adelais/standard_led/rev4/readme.md | 16 ++ .../adelais/standard_led/rev4/rules.mk | 1 + .../kopibeng/adelais/standard_led/rules.mk | 3 + keyboards/kopibeng/christine/christine.c | 37 +++ keyboards/kopibeng/christine/christine.h | 37 +++ keyboards/kopibeng/christine/config.h | 113 ++++++++ keyboards/kopibeng/christine/info.json | 83 ++++++ .../christine/keymaps/default/keymap.c | 57 ++++ .../kopibeng/christine/keymaps/via/keymap.c | 57 ++++ .../kopibeng/christine/keymaps/via/rules.mk | 1 + keyboards/kopibeng/christine/readme.md | 17 ++ keyboards/kopibeng/christine/rules.mk | 22 ++ keyboards/kopibeng/xt65e/config.h | 66 +++++ keyboards/kopibeng/xt65e/info.json | 12 + .../kopibeng/xt65e/keymaps/default/keymap.c | 57 ++++ keyboards/kopibeng/xt65e/keymaps/via/keymap.c | 57 ++++ keyboards/kopibeng/xt65e/keymaps/via/rules.mk | 3 + .../kopibeng/xt65e/keymaps/via/vial.json | 177 ++++++++++++ keyboards/kopibeng/xt65e/readme.md | 17 ++ keyboards/kopibeng/xt65e/rules.mk | 22 ++ keyboards/kopibeng/xt65e/xt65e.c | 64 +++++ keyboards/kopibeng/xt65e/xt65e.h | 51 ++++ 48 files changed, 1876 insertions(+) create mode 100644 keyboards/kopibeng/adelais/.noci create mode 100644 keyboards/kopibeng/adelais/adelais.c create mode 100644 keyboards/kopibeng/adelais/adelais.h create mode 100644 keyboards/kopibeng/adelais/config.h create mode 100644 keyboards/kopibeng/adelais/info.json create mode 100644 keyboards/kopibeng/adelais/keymaps/brandonschlack/config.h create mode 100644 keyboards/kopibeng/adelais/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/kopibeng/adelais/keymaps/brandonschlack/readme.md create mode 100644 keyboards/kopibeng/adelais/keymaps/default/keymap.c create mode 100644 keyboards/kopibeng/adelais/keymaps/default/readme.md create mode 100644 keyboards/kopibeng/adelais/keymaps/via/keymap.c create mode 100644 keyboards/kopibeng/adelais/keymaps/via/readme.md create mode 100644 keyboards/kopibeng/adelais/keymaps/via/rules.mk create mode 100644 keyboards/kopibeng/adelais/readme.md create mode 100644 keyboards/kopibeng/adelais/rules.mk create mode 100644 keyboards/kopibeng/adelais/standard_led/.noci create mode 100644 keyboards/kopibeng/adelais/standard_led/config.h create mode 100644 keyboards/kopibeng/adelais/standard_led/halconf.h create mode 100644 keyboards/kopibeng/adelais/standard_led/mcuconf.h create mode 100644 keyboards/kopibeng/adelais/standard_led/readme.md create mode 100644 keyboards/kopibeng/adelais/standard_led/rev2/.noci create mode 100644 keyboards/kopibeng/adelais/standard_led/rev2/config.h create mode 100644 keyboards/kopibeng/adelais/standard_led/rev2/rules.mk create mode 100644 keyboards/kopibeng/adelais/standard_led/rev3/config.h create mode 100644 keyboards/kopibeng/adelais/standard_led/rev3/rules.mk create mode 100644 keyboards/kopibeng/adelais/standard_led/rev4/config.h create mode 100644 keyboards/kopibeng/adelais/standard_led/rev4/readme.md create mode 100644 keyboards/kopibeng/adelais/standard_led/rev4/rules.mk create mode 100644 keyboards/kopibeng/adelais/standard_led/rules.mk create mode 100644 keyboards/kopibeng/christine/christine.c create mode 100644 keyboards/kopibeng/christine/christine.h create mode 100644 keyboards/kopibeng/christine/config.h create mode 100644 keyboards/kopibeng/christine/info.json create mode 100644 keyboards/kopibeng/christine/keymaps/default/keymap.c create mode 100644 keyboards/kopibeng/christine/keymaps/via/keymap.c create mode 100644 keyboards/kopibeng/christine/keymaps/via/rules.mk create mode 100644 keyboards/kopibeng/christine/readme.md create mode 100644 keyboards/kopibeng/christine/rules.mk create mode 100644 keyboards/kopibeng/xt65e/config.h create mode 100644 keyboards/kopibeng/xt65e/info.json create mode 100644 keyboards/kopibeng/xt65e/keymaps/default/keymap.c create mode 100644 keyboards/kopibeng/xt65e/keymaps/via/keymap.c create mode 100644 keyboards/kopibeng/xt65e/keymaps/via/rules.mk create mode 100644 keyboards/kopibeng/xt65e/keymaps/via/vial.json create mode 100644 keyboards/kopibeng/xt65e/readme.md create mode 100644 keyboards/kopibeng/xt65e/rules.mk create mode 100644 keyboards/kopibeng/xt65e/xt65e.c create mode 100644 keyboards/kopibeng/xt65e/xt65e.h diff --git a/keyboards/kopibeng/adelais/.noci b/keyboards/kopibeng/adelais/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/kopibeng/adelais/adelais.c b/keyboards/kopibeng/adelais/adelais.c new file mode 100644 index 00000000000..dec49ed0c21 --- /dev/null +++ b/keyboards/kopibeng/adelais/adelais.c @@ -0,0 +1,38 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 "adelais.h" + +void keyboard_pre_init_kb (void) { + setPinOutput(B2); + setPinOutput(C15); + setPinOutput(B9); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B2, led_state.caps_lock); + } + return res; +} + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + /*writePin(B2, layer_state_cmp(state, 1));*/ + writePin(C15, layer_state_cmp(state, 1)); + writePin(B9, layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/keyboards/kopibeng/adelais/adelais.h b/keyboards/kopibeng/adelais/adelais.h new file mode 100644 index 00000000000..13a098f816a --- /dev/null +++ b/keyboards/kopibeng/adelais/adelais.h @@ -0,0 +1,49 @@ +/* Copyright 2020 Team Mechlovin + * + * 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" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K4D, K3C, K3D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K4D, K3C, K3D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/kopibeng/adelais/config.h b/keyboards/kopibeng/adelais/config.h new file mode 100644 index 00000000000..27c6f4a0247 --- /dev/null +++ b/keyboards/kopibeng/adelais/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2020 Team Mechlovin + +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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D4C // "ML" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Team.Mechlovin + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* +#define LED_NUM_LOCK_PIN C15 +#define LED_CAPS_LOCK_PIN B2 +#define LED_SCROLL_LOCK_PIN B9 +*/ + +#define INDICATOR_PIN_0 B2 +#define INDICATOR_PIN_1 C15 +#define INDICATOR_PIN_2 B9 \ No newline at end of file diff --git a/keyboards/kopibeng/adelais/info.json b/keyboards/kopibeng/adelais/info.json new file mode 100644 index 00000000000..d65935a4f70 --- /dev/null +++ b/keyboards/kopibeng/adelais/info.json @@ -0,0 +1,150 @@ +{ + "keyboard_name": "Adelais", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 18.5, + "height": 5, + "layouts": { + "LAYOUT_alice_split_bs": { + "key_count": 66, + "layout": [ + {"label":"K1E", "x":0, "y":0}, + {"label":"K00", "x":1.5, "y":0}, + {"label":"K01", "x":2.5, "y":0}, + {"label":"K02", "x":3.5, "y":0}, + {"label":"K03", "x":4.5, "y":0}, + {"label":"K04", "x":5.5, "y":0}, + {"label":"K05", "x":6.5, "y":0}, + {"label":"K06", "x":7.5, "y":0}, + {"label":"K07", "x":10.5, "y":0}, + {"label":"K08", "x":11.5, "y":0}, + {"label":"K09", "x":12.5, "y":0}, + {"label":"K0A", "x":13.5, "y":0}, + {"label":"K0B", "x":14.5, "y":0}, + {"label":"K0C", "x":15.5, "y":0}, + {"label":"K0D", "x":16.5, "y":0}, + {"label":"K0E", "x":17.5, "y":0}, + {"label":"K2E", "x":0, "y":1}, + {"label":"K10", "x":1.5, "y":1, "w":1.5}, + {"label":"K11", "x":3, "y":1}, + {"label":"K12", "x":4, "y":1}, + {"label":"K13", "x":5, "y":1}, + {"label":"K14", "x":6, "y":1}, + {"label":"K15", "x":7, "y":1}, + {"label":"K16", "x":10, "y":1}, + {"label":"K17", "x":11, "y":1}, + {"label":"K18", "x":12, "y":1}, + {"label":"K19", "x":13, "y":1}, + {"label":"K1A", "x":14, "y":1}, + {"label":"K1B", "x":15, "y":1}, + {"label":"K1C", "x":16, "y":1}, + {"label":"K1D", "x":17, "y":1, "w":1.5}, + {"label":"K3E", "x":0, "y":2}, + {"label":"K20", "x":1.5, "y":2, "w":1.75}, + {"label":"K21", "x":3.25, "y":2}, + {"label":"K22", "x":4.25, "y":2}, + {"label":"K23", "x":5.25, "y":2}, + {"label":"K24", "x":6.25, "y":2}, + {"label":"K25", "x":7.25, "y":2}, + {"label":"K26", "x":10.25, "y":2}, + {"label":"K27", "x":11.25, "y":2}, + {"label":"K28", "x":12.25, "y":2}, + {"label":"K29", "x":13.25, "y":2}, + {"label":"K2A", "x":14.25, "y":2}, + {"label":"K2B", "x":15.25, "y":2}, + {"label":"K2D", "x":16.25, "y":2, "w":2.25}, + {"label":"K30", "x":1.5, "y":3, "w":2.25}, + {"label":"K32", "x":3.75, "y":3}, + {"label":"K33", "x":4.75, "y":3}, + {"label":"K34", "x":5.75, "y":3}, + {"label":"K35", "x":6.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":9.75, "y":3}, + {"label":"K38", "x":10.75, "y":3}, + {"label":"K39", "x":11.75, "y":3}, + {"label":"K3A", "x":12.75, "y":3}, + {"label":"K3B", "x":13.75, "y":3}, + {"label":"K4D", "x":14.75, "y":3}, + {"label":"K3C", "x":15.75, "y":3, "w":1.75}, + {"label":"K3D", "x":17.5, "y":3}, + {"label":"K40", "x":1.5, "y":4, "w":1.5}, + {"label":"K42", "x":4.5, "y":4, "w":1.25}, + {"label":"K44", "x":5.75, "y":4, "w":2.25}, + {"label":"K46", "x":8, "y":4, "w":1.25}, + {"label":"K48", "x":9.75, "y":4, "w":2.75}, + {"label":"K4A", "x":12.5, "y":4, "w":1.25}, + {"label":"K4E", "x":17, "y":4, "w":1.5} + ] + }, + "LAYOUT_alice": { + "layout": [ + {"label":"K1E", "x":0, "y":0}, + {"label":"K00", "x":1.5, "y":0}, + {"label":"K01", "x":2.5, "y":0}, + {"label":"K02", "x":3.5, "y":0}, + {"label":"K03", "x":4.5, "y":0}, + {"label":"K04", "x":5.5, "y":0}, + {"label":"K05", "x":6.5, "y":0}, + {"label":"K06", "x":7.5, "y":0}, + {"label":"K07", "x":10.5, "y":0}, + {"label":"K08", "x":11.5, "y":0}, + {"label":"K09", "x":12.5, "y":0}, + {"label":"K0A", "x":13.5, "y":0}, + {"label":"K0B", "x":14.5, "y":0}, + {"label":"K0C", "x":15.5, "y":0}, + {"label":"K0D", "x":16.5, "y":0, "w":2}, + {"label":"K2E", "x":0, "y":1}, + {"label":"K10", "x":1.5, "y":1, "w":1.5}, + {"label":"K11", "x":3, "y":1}, + {"label":"K12", "x":4, "y":1}, + {"label":"K13", "x":5, "y":1}, + {"label":"K14", "x":6, "y":1}, + {"label":"K15", "x":7, "y":1}, + {"label":"K16", "x":10, "y":1}, + {"label":"K17", "x":11, "y":1}, + {"label":"K18", "x":12, "y":1}, + {"label":"K19", "x":13, "y":1}, + {"label":"K1A", "x":14, "y":1}, + {"label":"K1B", "x":15, "y":1}, + {"label":"K1C", "x":16, "y":1}, + {"label":"K1D", "x":17, "y":1, "w":1.5}, + {"label":"K3E", "x":0, "y":2}, + {"label":"K20", "x":1.5, "y":2, "w":1.75}, + {"label":"K21", "x":3.25, "y":2}, + {"label":"K22", "x":4.25, "y":2}, + {"label":"K23", "x":5.25, "y":2}, + {"label":"K24", "x":6.25, "y":2}, + {"label":"K25", "x":7.25, "y":2}, + {"label":"K26", "x":10.25, "y":2}, + {"label":"K27", "x":11.25, "y":2}, + {"label":"K28", "x":12.25, "y":2}, + {"label":"K29", "x":13.25, "y":2}, + {"label":"K2A", "x":14.25, "y":2}, + {"label":"K2B", "x":15.25, "y":2}, + {"label":"K2D", "x":16.25, "y":2, "w":2.25}, + {"label":"K30", "x":1.5, "y":3, "w":2.25}, + {"label":"K32", "x":3.75, "y":3}, + {"label":"K33", "x":4.75, "y":3}, + {"label":"K34", "x":5.75, "y":3}, + {"label":"K35", "x":6.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":9.75, "y":3}, + {"label":"K38", "x":10.75, "y":3}, + {"label":"K39", "x":11.75, "y":3}, + {"label":"K3A", "x":12.75, "y":3}, + {"label":"K3B", "x":13.75, "y":3}, + {"label":"K4D", "x":14.75, "y":3}, + {"label":"K3C", "x":15.75, "y":3, "w":1.75}, + {"label":"K3D", "x":17.5, "y":3}, + {"label":"K40", "x":1.5, "y":4, "w":1.5}, + {"label":"K42", "x":4.5, "y":4, "w":1.25}, + {"label":"K44", "x":5.75, "y":4, "w":2.25}, + {"label":"K46", "x":8, "y":4, "w":1.25}, + {"label":"K48", "x":9.75, "y":4, "w":2.75}, + {"label":"K4A", "x":12.5, "y":4, "w":1.25}, + {"label":"K4E", "x":17, "y":4, "w":1.5} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/kopibeng/adelais/keymaps/brandonschlack/config.h b/keyboards/kopibeng/adelais/keymaps/brandonschlack/config.h new file mode 100644 index 00000000000..f277bcfa3e6 --- /dev/null +++ b/keyboards/kopibeng/adelais/keymaps/brandonschlack/config.h @@ -0,0 +1,30 @@ +/* Copyright 2020 Brandon Schlack + * + * 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 USE_LEDS_FOR_LAYERS +#define STOPLIGHT_LED + +// LEDs +#define TOP_LED B2 +#define MIDDLE_LED C15 +#define BOTTOM_LED B9 +// #define LED_PIN_FLIP +#ifdef LED_PIN_FLIP + #define LED_ON(flag) !flag +#else + #define LED_ON(flag) flag +#endif diff --git a/keyboards/kopibeng/adelais/keymaps/brandonschlack/keymap.c b/keyboards/kopibeng/adelais/keymaps/brandonschlack/keymap.c new file mode 100644 index 00000000000..d3ab5ed110a --- /dev/null +++ b/keyboards/kopibeng/adelais/keymaps/brandonschlack/keymap.c @@ -0,0 +1,270 @@ +/* Copyright 2020 Brandon Schlack + * + * 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 +#include "brandonschlack.h" + +/** + * Layer Names + * + * Layers mostly used for macro keys + */ +#define _REEDER _M1 +#define _MAIL _M2 +#define _REEDER_FN _M1_FN1 +#define _MAIL_FN _M2_FN1 + +/** + * Keycodes & Macros + */ +#define TG_BASE TO(_BASE) +#define TG_REDR TO(_REEDER) +#define TG_MAIL TO(_MAIL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Ply│ │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│         │& 7│* 8│( 9│) 0│_ -│+ =│| \│~ `│ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │VlU│ │Tab  │ Q │ W │ E │ R │ T │         │ Y │ U │ I │ O │ P │{ [│} ]│ Bspc│ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │VlD│ │HyCaps│ A │ S │ D │ F │ G │         │ H │ J │ K │ L │: ;│" '│   Enter│ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │LShift  │ Z │ X │ C │ V │ B │     │ B │ N │ M │< ,│> .│? /│  Shft│Fn │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │Opt  │     │Cmd  │Spc/Lwr│Ctrl│   │   Spc/Rai│  Cmd│           │  Opt│ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_BASE] = LAYOUT_all( \ + KC_MPLY, 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_BSLS, KC_GRV, \ + KC_VOLU, 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_BSPC, \ + KC_VOLD, HY_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_B, KC_N, KC_M, KC_COMM, KC_DOT, LOWER, KC_RSFT, KC_SLSH, \ + KC_LOPT, KC_LCMD, SPC_LWR, KC_LCTL, SPC_RAI, KC_RCMD, KC_ROPT \ +), +/* Reeder + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │ H │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ K │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ J │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_REEDER] = LAYOUT_all( \ + KC_H, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_K, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_J, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Mail + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Del│ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │It+│ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │It-│ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_MAIL] = LAYOUT_all( \ + G(KC_BSPC), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Lower + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Mut│ │Mke│ F1│ F2│ F3│ F4│ F5│ F6│         │ F7│ F8│ F9│F10│F11│F12│LHP│SLP│ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │Nxt│ │RMod │RH+│RS+│RV+│Sp+│   │         │   │   │   │   │PgU│Hom│End│  Del│ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Prv│ │RTgl  │RH-│RS-│RV-│Sp-│   │         │   │   │Prv│Nxt│PgD│ ↑ │   Play │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │LYR│Thm│   │   │   │     │   │   │   │   │ ← │ ↓ │→ Shft│   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_LOWER] = LAYOUT_all( \ + KC_MUTE, QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_SLPD, \ + KC_MNXT, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_END, KC_DELT, \ + KC_MPRV, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, KC_MPRV, KC_MNXT, KC_PGDN, KC_UP, KC_MPLY, \ + _______, RGB_LYR, RGB_THM, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, RGT_SFT, KC_DOWN, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Reeder Function + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │ L │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ P │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ N │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_REEDER_FN] = LAYOUT_all( \ + KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_P, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_N, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Mail + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Del│ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │It+│ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │It-│ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_MAIL_FN] = LAYOUT_all( \ + KC_BSPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + A(G(KC_LBRC)), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + A(G(KC_RBRC)), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Raise + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │   │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │   │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_RAISE] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Adjust + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Bse│ │Mke│   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │Rdr│ │RMod │RH+│RS+│RV+│Sp+│   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Mai│ │RTgl  │RH-│RS-│RV-│Sp-│   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │LYR│Thm│   │EEP│Rst│     │Rst│   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_ADJUST] = LAYOUT_all( \ + TG_BASE, QM_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_REDR, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_MAIL, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_LYR, RGB_THM, _______, EEP_RST, RESET, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +) +/* Layout + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │   │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │   │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +/* +[_BLANK] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +) +*/ +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _REEDER, _LOWER, _REEDER_FN); + state = update_tri_layer_state(state, _MAIL, _LOWER, _MAIL_FN); + return state; +} + +#ifdef USE_LEDS_FOR_LAYERS +bool led_update_keymap(led_t led_state) { + writePin(TOP_LED, LED_ON(IS_LAYER_ON(_REEDER) || IS_LAYER_ON(_MAIL))); // Use for Macro Layer + writePin(MIDDLE_LED, LED_ON(IS_LAYER_ON(_FN1))); // Use for Layer 2 + writePin(BOTTOM_LED, LED_ON(led_state.caps_lock)); // Use for Caps Lock + return false; // Override default set by KB +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_LEFT); + } else { + tap_code(KC_RGHT); + } + } + else if (index == 2) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + + #endif diff --git a/keyboards/kopibeng/adelais/keymaps/brandonschlack/readme.md b/keyboards/kopibeng/adelais/keymaps/brandonschlack/readme.md new file mode 100644 index 00000000000..54d78d873b5 --- /dev/null +++ b/keyboards/kopibeng/adelais/keymaps/brandonschlack/readme.md @@ -0,0 +1 @@ +# The default keymap for adelais diff --git a/keyboards/kopibeng/adelais/keymaps/default/keymap.c b/keyboards/kopibeng/adelais/keymaps/default/keymap.c new file mode 100644 index 00000000000..19c298d4a4c --- /dev/null +++ b/keyboards/kopibeng/adelais/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Team Mechlovin + * + * 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_all( + KC_SPC, 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_DEL, + KC_SPC, 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_SLSH, + KC_SPC, 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_BSLS, MO(1), KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL ), + [0] = LAYOUT_all( + 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_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_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_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_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_TRNS ), + +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_LEFT); + } else { + tap_code(KC_RGHT); + } + } + else if (index == 2) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + + #endif \ No newline at end of file diff --git a/keyboards/kopibeng/adelais/keymaps/default/readme.md b/keyboards/kopibeng/adelais/keymaps/default/readme.md new file mode 100644 index 00000000000..54d78d873b5 --- /dev/null +++ b/keyboards/kopibeng/adelais/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for adelais diff --git a/keyboards/kopibeng/adelais/keymaps/via/keymap.c b/keyboards/kopibeng/adelais/keymaps/via/keymap.c new file mode 100644 index 00000000000..288d4895cc9 --- /dev/null +++ b/keyboards/kopibeng/adelais/keymaps/via/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 Team Mechlovin + * + * 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_all( + RESET, 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_DEL, + KC_SPC, 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_SLSH, + KC_SPC, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_SPC, MO(2), KC_SPC, MO(3), KC_RCTL ), + [1] = LAYOUT_all( + 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_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_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_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_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_TRNS ), + [2] = LAYOUT_all( + 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_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_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_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_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_TRNS ), + [3] = LAYOUT_all( + 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_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_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_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_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_TRNS ), + +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_LEFT); + } else { + tap_code(KC_RGHT); + } + } + else if (index == 2) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + + #endif \ No newline at end of file diff --git a/keyboards/kopibeng/adelais/keymaps/via/readme.md b/keyboards/kopibeng/adelais/keymaps/via/readme.md new file mode 100644 index 00000000000..a85ba709d78 --- /dev/null +++ b/keyboards/kopibeng/adelais/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA keymap for adelais diff --git a/keyboards/kopibeng/adelais/keymaps/via/rules.mk b/keyboards/kopibeng/adelais/keymaps/via/rules.mk new file mode 100644 index 00000000000..036bd6d1c3e --- /dev/null +++ b/keyboards/kopibeng/adelais/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kopibeng/adelais/readme.md b/keyboards/kopibeng/adelais/readme.md new file mode 100644 index 00000000000..f8b3b47ffb8 --- /dev/null +++ b/keyboards/kopibeng/adelais/readme.md @@ -0,0 +1,18 @@ +# Adelais / Adelais En Ciel + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.3 support 3 rotary encoder, USB TypeC both side and reset button. +`rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered. + +* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Adelais, Adelais En Ciel +* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/fr7smq/gb_team_mechlovin_adelais_tgr_alice_clones/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led:default + make mechlovin/adelais/rgb_led: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). diff --git a/keyboards/kopibeng/adelais/rules.mk b/keyboards/kopibeng/adelais/rules.mk new file mode 100644 index 00000000000..ac7621d371d --- /dev/null +++ b/keyboards/kopibeng/adelais/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = STM32F303 +BOARD = QMK_PROTON_C + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = alice alice_split_bs + +DEFAULT_FOLDER = kopibeng/adelais/standard_led/rev4 diff --git a/keyboards/kopibeng/adelais/standard_led/.noci b/keyboards/kopibeng/adelais/standard_led/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/kopibeng/adelais/standard_led/config.h b/keyboards/kopibeng/adelais/standard_led/config.h new file mode 100644 index 00000000000..4580e56d5a2 --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2020 Team Mechlovin' + +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 PRODUCT Adelais + +#define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} +#define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B0 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +#define RGB_DI_PIN A7 +#define RGBLED_NUM 23 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/kopibeng/adelais/standard_led/halconf.h b/keyboards/kopibeng/adelais/standard_led/halconf.h new file mode 100644 index 00000000000..01d02f71c3c --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/halconf.h @@ -0,0 +1,27 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#pragma once + +#define HAL_USE_I2C TRUE + +#define PAL_USE_CALLBACKS FALSE + +#define PAL_USE_WAIT FALSE + +#include_next + diff --git a/keyboards/kopibeng/adelais/standard_led/mcuconf.h b/keyboards/kopibeng/adelais/standard_led/mcuconf.h new file mode 100644 index 00000000000..b7ecee02048 --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/mcuconf.h @@ -0,0 +1,36 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#pragma once + +#include_next + +#undef STM32_GPT_USE_TIM15 +#define STM32_GPT_USE_TIM15 FALSE + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 FALSE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 FALSE + diff --git a/keyboards/kopibeng/adelais/standard_led/readme.md b/keyboards/kopibeng/adelais/standard_led/readme.md new file mode 100644 index 00000000000..a7c76beb496 --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/readme.md @@ -0,0 +1,16 @@ +# Adelais + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.3 & rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. + +* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Adelais +* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led: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). diff --git a/keyboards/kopibeng/adelais/standard_led/rev2/.noci b/keyboards/kopibeng/adelais/standard_led/rev2/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/kopibeng/adelais/standard_led/rev2/config.h b/keyboards/kopibeng/adelais/standard_led/rev2/config.h new file mode 100644 index 00000000000..7c2c63ea21c --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/rev2/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define PRODUCT_ID 0xAD01 \ No newline at end of file diff --git a/keyboards/kopibeng/adelais/standard_led/rev2/rules.mk b/keyboards/kopibeng/adelais/standard_led/rev2/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/kopibeng/adelais/standard_led/rev3/config.h b/keyboards/kopibeng/adelais/standard_led/rev3/config.h new file mode 100644 index 00000000000..4d56fedf05d --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/rev3/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define PRODUCT_ID 0xAD02 + +#define ENCODERS_PAD_A { A6, A4, B7 } +#define ENCODERS_PAD_B { A5, A3, B6 } +#define ENCODER_RESOLUTION 4 + +#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/kopibeng/adelais/standard_led/rev3/rules.mk b/keyboards/kopibeng/adelais/standard_led/rev3/rules.mk new file mode 100644 index 00000000000..5af1ba85367 --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/rev3/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/kopibeng/adelais/standard_led/rev4/config.h b/keyboards/kopibeng/adelais/standard_led/rev4/config.h new file mode 100644 index 00000000000..ca793f1fec3 --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/rev4/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2021 Mechlovin' Studio + +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 PRODUCT_ID 0xAD03 + +#define ENCODERS_PAD_A { A6, A4, B7 } +#define ENCODERS_PAD_B { A5, A3, B6 } +#define ENCODER_RESOLUTION 4 + +#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/kopibeng/adelais/standard_led/rev4/readme.md b/keyboards/kopibeng/adelais/standard_led/rev4/readme.md new file mode 100644 index 00000000000..333efbacdb4 --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/rev4/readme.md @@ -0,0 +1,16 @@ +# Adelais rev.4 + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. + +* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Adelais +* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led: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). diff --git a/keyboards/kopibeng/adelais/standard_led/rev4/rules.mk b/keyboards/kopibeng/adelais/standard_led/rev4/rules.mk new file mode 100644 index 00000000000..5af1ba85367 --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/rev4/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/kopibeng/adelais/standard_led/rules.mk b/keyboards/kopibeng/adelais/standard_led/rules.mk new file mode 100644 index 00000000000..32449528420 --- /dev/null +++ b/keyboards/kopibeng/adelais/standard_led/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = spi +DEFAULT_FOLDER = kopibeng/adelais/standard_led/rev4 \ No newline at end of file diff --git a/keyboards/kopibeng/christine/christine.c b/keyboards/kopibeng/christine/christine.c new file mode 100644 index 00000000000..1eb848edfed --- /dev/null +++ b/keyboards/kopibeng/christine/christine.c @@ -0,0 +1,37 @@ +/* Copyright 2021 Samuel Lu + * + * 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 "christine.h" + + +void keyboard_pre_init_kb(void) { + setPinOutput(INDICATOR_PIN_1); + setPinOutput(INDICATOR_PIN_2); + setPinOutput(INDICATOR_PIN_3); +} + +bool led_update_user(led_t led_state) { + writePin(INDICATOR_PIN_1, led_state.caps_lock); + return false; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(INDICATOR_PIN_1, layer_state_cmp(state, 1)); + writePin(INDICATOR_PIN_2, layer_state_cmp(state, 2)); + writePin(INDICATOR_PIN_3, layer_state_cmp(state, 3)); + return state; +} + diff --git a/keyboards/kopibeng/christine/christine.h b/keyboards/kopibeng/christine/christine.h new file mode 100644 index 00000000000..6d46692be24 --- /dev/null +++ b/keyboards/kopibeng/christine/christine.h @@ -0,0 +1,37 @@ +/* Copyright 2021 Samuel Lu + * + * 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" + +#define ____ KC_NO + + + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K401, K403, K405, K406, K408, K410, K414 \ +) { \ + {K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014}, \ + {K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114}, \ + {K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____}, \ + {K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314}, \ + {____, K401, ____, K403, ____, K405, K406, ____, K408, ____, K410, ____, ____, ____, K414} \ +} diff --git a/keyboards/kopibeng/christine/config.h b/keyboards/kopibeng/christine/config.h new file mode 100644 index 00000000000..7dd22e034a4 --- /dev/null +++ b/keyboards/kopibeng/christine/config.h @@ -0,0 +1,113 @@ +/* Copyright 2021 Samuel Lu + * + * 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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // KP +#define PRODUCT_ID 0x4354 // CT +#define DEVICE_VER 0x0001 +#define MANUFACTURER kopibeng +#define PRODUCT Christine + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, B1, D4, D6, D7 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, C7, C6, B6, B7, B3, B2, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define LED_CAPS_LOCK_PIN E6 +#define INDICATOR_PIN_1 E6 +#define INDICATOR_PIN_2 F6 +#define INDICATOR_PIN_3 F7 + +#define BACKLIGHT_PIN B5 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 8 + +#define RGB_DI_PIN B4 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 16 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #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 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kopibeng/christine/info.json b/keyboards/kopibeng/christine/info.json new file mode 100644 index 00000000000..a28d442016d --- /dev/null +++ b/keyboards/kopibeng/christine/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "kopibeng christine", + "url": "", + "maintainer": "kopibeng", + "width": 20.75, + "height": 27.5269, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"0,13", "x":15.1, "y":0.11}, + {"label":"0,14", "x":16.1, "y":0.11}, + {"label":"1,0", "x":0.43, "y":1.25}, + {"label":"0,2", "x":3.64, "y":1.25}, + {"label":"0,11", "x":13.120000000000001, "y":1.25}, + {"label":"0,0", "x":1.64, "y":1.36}, + {"label":"0,1", "x":2.64, "y":1.36}, + {"label":"0,12", "x":14.100000000000001, "y":1.36}, + {"label":"0,13", "x":15.100000000000001, "y":1.36, "w":2}, + {"label":"2,0", "x":0.21, "y":2.25}, + {"label":"1,1", "x":1.42, "y":2.36, "w":1.5}, + {"label":"1,2", "x":2.92, "y":2.36}, + {"label":"1,11", "x":12.84, "y":2.36}, + {"label":"1,12", "x":13.81, "y":2.36}, + {"label":"1,13", "x":14.81, "y":2.36}, + {"label":"1,14", "x":15.82, "y":2.36, "w":1.5}, + {"label":"3,0", "x":0, "y":3.25}, + {"label":"2,1", "x":1.21, "y":3.36, "w":1.75}, + {"label":"2,2", "x":2.96, "y":3.36}, + {"label":"2,11", "x":13.290000000000001, "y":3.36}, + {"label":"2,12", "x":14.290000000000001, "y":3.36}, + {"label":"2,13", "x":15.290000000000001, "y":3.36, "w":2.25}, + {"label":"3,1", "x":0.99, "y":4.36, "w":2.25}, + {"label":"3,2", "x":3.24, "y":4.36}, + {"label":"3,11", "x":13.01, "y":4.36}, + {"label":"3,12", "x":14.01, "y":4.36}, + {"label":"3,13", "x":15.01, "y":4.36, "w":1.75}, + {"label":"3,14", "x":16.759999999999998, "y":4.36}, + {"label":"3,13", "x":18.0, "y":4.36, "w":2.75}, + {"label":"4,1", "x":0.99, "y":5.36, "w":1.5}, + {"label":"4,14", "x":16.07, "y":5.36, "w":1.5}, + {"label":"4,6", "x":4.069, "y":11.6104}, + {"label":"4,6", "x":3.819, "y":12.8604, "w":1.25}, + {"label":"0,3", "x":0.149, "y":15.0108}, + {"label":"0,4", "x":1.149, "y":15.0108}, + {"label":"0,5", "x":2.149, "y":15.0108}, + {"label":"0,6", "x":3.149, "y":15.0108}, + {"label":"1,3", "x":-0.381, "y":16.0108}, + {"label":"1,4", "x":0.619, "y":16.0108}, + {"label":"1,5", "x":1.619, "y":16.0108}, + {"label":"1,6", "x":2.619, "y":16.0108}, + {"label":"2,3", "x":-0.121, "y":17.0108}, + {"label":"2,4", "x":0.879, "y":17.0108}, + {"label":"2,5", "x":1.879, "y":17.0108}, + {"label":"2,6", "x":2.879, "y":17.0108}, + {"label":"3,3", "x":0.379, "y":18.0108}, + {"label":"3,4", "x":1.379, "y":18.0108}, + {"label":"3,5", "x":2.379, "y":18.0108}, + {"label":"3,6", "x":3.379, "y":18.0108}, + {"label":"4,5", "x":1.679, "y":19.0108, "w":2.25}, + {"label":"4,3", "x":0.099, "y":19.0908, "w":1.5}, + {"label":"4,5", "x":1.679, "y":20.2608, "w":2}, + {"label":"0,7", "x":-4.3535, "y":22.4469}, + {"label":"0,8", "x":-3.3535000000000004, "y":22.4469}, + {"label":"0,9", "x":-2.3535000000000004, "y":22.4469}, + {"label":"0,10", "x":-1.3535000000000004, "y":22.4469}, + {"label":"1,7", "x":-4.8535, "y":23.4469}, + {"label":"1,8", "x":-3.8535000000000004, "y":23.4469}, + {"label":"1,9", "x":-2.8535000000000004, "y":23.4469}, + {"label":"1,10", "x":-1.8535000000000004, "y":23.4469}, + {"label":"2,7", "x":-4.6035, "y":24.4469}, + {"label":"2,8", "x":-3.6035000000000004, "y":24.4469}, + {"label":"2,9", "x":-2.6035000000000004, "y":24.4469}, + {"label":"2,10", "x":-1.6035000000000004, "y":24.4469}, + {"label":"3,7", "x":-5.1035, "y":25.4469}, + {"label":"3,8", "x":-4.1035, "y":25.4469}, + {"label":"3,9", "x":-3.1035000000000004, "y":25.4469}, + {"label":"3,10", "x":-2.1035000000000004, "y":25.4469}, + {"label":"4,8", "x":-5.1035, "y":26.4469, "w":2.75}, + {"label":"4,10", "x":-2.3235, "y":26.5269, "w":1.5} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/kopibeng/christine/keymaps/default/keymap.c b/keyboards/kopibeng/christine/keymaps/default/keymap.c new file mode 100644 index 00000000000..a96283f87b6 --- /dev/null +++ b/keyboards/kopibeng/christine/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2021 Samuel Lu + * + * 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] = { + + // Default layer + [0] = LAYOUT_all( + 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, + KC_ESC, 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_HOME, 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_END, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, MO(2), KC_RCTL + ), + + // Fn1 Layer + [1] = LAYOUT_all( + 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, RESET, + 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_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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, 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_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 Layer + [2] = LAYOUT_all( + 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_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_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_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_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_TRNS + ), + + // Fn3 Layer + [3] = LAYOUT_all( + 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_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_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_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_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_TRNS + ), +}; + diff --git a/keyboards/kopibeng/christine/keymaps/via/keymap.c b/keyboards/kopibeng/christine/keymaps/via/keymap.c new file mode 100644 index 00000000000..a96283f87b6 --- /dev/null +++ b/keyboards/kopibeng/christine/keymaps/via/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2021 Samuel Lu + * + * 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] = { + + // Default layer + [0] = LAYOUT_all( + 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, + KC_ESC, 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_HOME, 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_END, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, MO(2), KC_RCTL + ), + + // Fn1 Layer + [1] = LAYOUT_all( + 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, RESET, + 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_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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, 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_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 Layer + [2] = LAYOUT_all( + 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_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_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_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_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_TRNS + ), + + // Fn3 Layer + [3] = LAYOUT_all( + 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_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_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_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_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_TRNS + ), +}; + diff --git a/keyboards/kopibeng/christine/keymaps/via/rules.mk b/keyboards/kopibeng/christine/keymaps/via/rules.mk new file mode 100644 index 00000000000..036bd6d1c3e --- /dev/null +++ b/keyboards/kopibeng/christine/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kopibeng/christine/readme.md b/keyboards/kopibeng/christine/readme.md new file mode 100644 index 00000000000..36317673a2e --- /dev/null +++ b/keyboards/kopibeng/christine/readme.md @@ -0,0 +1,17 @@ +# Christine + +![Christine](https://i.imgur.com/59r9jGA.png) + +A 60% split ergonomic PCB with support for VIA, LED backlight and RGB underglow. + +* Keyboard Maintainer: kopibeng +* Hardware Supported: A spslit ergonomic keyboard with ATMEGA32U4 +* Hardware Availability: N/A + +Make example for this keyboard (after setting up your build environment): + + make kopibeng/christine:default + +Press the switch (SW1) on bottom side of PCB to enter bootloader. + +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). diff --git a/keyboards/kopibeng/christine/rules.mk b/keyboards/kopibeng/christine/rules.mk new file mode 100644 index 00000000000..1d60cf3c288 --- /dev/null +++ b/keyboards/kopibeng/christine/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kopibeng/xt65e/config.h b/keyboards/kopibeng/xt65e/config.h new file mode 100644 index 00000000000..f973dfacb5e --- /dev/null +++ b/keyboards/kopibeng/xt65e/config.h @@ -0,0 +1,66 @@ +/* Copyright 2021 Samuel Lu + * + * 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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // 'KP' kopibeng +#define PRODUCT_ID 0x065E +#define DEVICE_VER 0x0001 +#define MANUFACTURER kopibeng +#define PRODUCT XT65E // 65 'Extended' + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B7, D0, D1, D2, B3 } +#define MATRIX_COL_PINS { D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +#define LED_CAPS_LOCK_PIN E6 +#define INDICATOR_0 B0 +#define INDICATOR_1 B1 +#define INDICATOR_2 B2 + +#define VIAL_KEYBOARD_UID {0x8C, 0xA7, 0xE4, 0xED, 0xD9, 0x3A, 0x66, 0x9B} + +/* VIAL Unlock combo: ESC + ENTER */ +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 1, 13 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 diff --git a/keyboards/kopibeng/xt65e/info.json b/keyboards/kopibeng/xt65e/info.json new file mode 100644 index 00000000000..f8807baa19b --- /dev/null +++ b/keyboards/kopibeng/xt65e/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "XT65E", + "url": "", + "maintainer": "kopibeng", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,1", "x":1.25, "y":0}, {"label":"0,2", "x":2.25, "y":0}, {"label":"0,3", "x":3.25, "y":0}, {"label":"0,4", "x":4.25, "y":0}, {"label":"0,5", "x":5.25, "y":0}, {"label":"0,6", "x":6.25, "y":0}, {"label":"0,7", "x":7.25, "y":0}, {"label":"0,8", "x":8.25, "y":0}, {"label":"0,9", "x":9.25, "y":0}, {"label":"0,10", "x":10.25, "y":0}, {"label":"0,11", "x":11.25, "y":0}, {"label":"0,12", "x":12.25, "y":0}, {"label":"0,13", "x":13.25, "y":0}, {"label":"0,14", "x":14.25, "y":0, "w":2}, {"label":"0,15", "x":16.25, "y":0}, {"label":"1,14", "x":17.5, "y":0}, {"label":"0,14", "x":18.5, "y":0}, {"label":"0,0", "x":0, "y":1}, {"label":"1,1", "x":1.25, "y":1, "w":1.5}, {"label":"1,2", "x":2.75, "y":1}, {"label":"1,3", "x":3.75, "y":1}, {"label":"1,4", "x":4.75, "y":1}, {"label":"1,5", "x":5.75, "y":1}, {"label":"1,6", "x":6.75, "y":1}, {"label":"1,7", "x":7.75, "y":1}, {"label":"1,8", "x":8.75, "y":1}, {"label":"1,9", "x":9.75, "y":1}, {"label":"1,10", "x":10.75, "y":1}, {"label":"1,11", "x":11.75, "y":1}, {"label":"1,12", "x":12.75, "y":1}, {"label":"1,13", "x":13.75, "y":1}, {"label":"2,14", "x":14.75, "y":1, "w":1.5}, {"label":"1,15", "x":16.25, "y":1}, {"label":"1,0", "x":0, "y":2}, {"label":"2,1", "x":1.25, "y":2, "w":1.75}, {"label":"2,2", "x":3, "y":2}, {"label":"2,3", "x":4, "y":2}, {"label":"2,4", "x":5, "y":2}, {"label":"2,5", "x":6, "y":2}, {"label":"2,6", "x":7, "y":2}, {"label":"2,7", "x":8, "y":2}, {"label":"2,8", "x":9, "y":2}, {"label":"2,9", "x":10, "y":2}, {"label":"2,10", "x":11, "y":2}, {"label":"2,11", "x":12, "y":2}, {"label":"2,12", "x":13, "y":2}, {"label":"2,13", "x":14, "y":2, "w":2.25}, {"label":"2,15", "x":16.25, "y":2}, {"label":"2,0", "x":0, "y":3}, {"label":"3,1", "x":1.25, "y":3, "w":2.25}, {"label":"3,2", "x":3.5, "y":3}, {"label":"3,3", "x":4.5, "y":3}, {"label":"3,4", "x":5.5, "y":3}, {"label":"3,5", "x":6.5, "y":3}, {"label":"3,6", "x":7.5, "y":3}, {"label":"3,7", "x":8.5, "y":3}, {"label":"3,8", "x":9.5, "y":3}, {"label":"3,9", "x":10.5, "y":3}, {"label":"3,10", "x":11.5, "y":3}, {"label":"3,11", "x":12.5, "y":3}, {"label":"3,12", "x":13.5, "y":3, "w":1.75}, {"label":"3,14", "x":15.25, "y":3}, {"label":"3,15", "x":16.25, "y":3}, {"label":"3,0", "x":0, "y":4}, {"label":"4,0", "x":1.25, "y":4, "w":1.5}, {"label":"4,1", "x":2.75, "y":4}, {"label":"4,2", "x":3.75, "y":4, "w":1.5}, {"label":"4,6", "x":5.25, "y":4, "w":7}, {"label":"4,11", "x":12.25, "y":4, "w":1.5}, {"label":"4,13", "x":14.25, "y":4}, {"label":"4,14", "x":15.25, "y":4}, {"label":"4,15", "x":16.25, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/kopibeng/xt65e/keymaps/default/keymap.c b/keyboards/kopibeng/xt65e/keymaps/default/keymap.c new file mode 100644 index 00000000000..af1b062bcc4 --- /dev/null +++ b/keyboards/kopibeng/xt65e/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2021 Samuel Lu + * + * 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] = { + + // Default layer + [0] = LAYOUT_all( + KC_GESC, 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_BSPC, KC_PGUP, + KC_MPLY, 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_PGDN, + TG(1), 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_HOME, + TG(2), 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_END, + TG(3), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + // Fn1 Layer + [1] = LAYOUT_all( + 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_TRNS, RESET, + 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_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_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_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_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 Layer + [2] = LAYOUT_all( + 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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn3 Layer + [3] = LAYOUT_all( + 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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + diff --git a/keyboards/kopibeng/xt65e/keymaps/via/keymap.c b/keyboards/kopibeng/xt65e/keymaps/via/keymap.c new file mode 100644 index 00000000000..af1b062bcc4 --- /dev/null +++ b/keyboards/kopibeng/xt65e/keymaps/via/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2021 Samuel Lu + * + * 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] = { + + // Default layer + [0] = LAYOUT_all( + KC_GESC, 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_BSPC, KC_PGUP, + KC_MPLY, 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_PGDN, + TG(1), 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_HOME, + TG(2), 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_END, + TG(3), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + // Fn1 Layer + [1] = LAYOUT_all( + 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_TRNS, RESET, + 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_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_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_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_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 Layer + [2] = LAYOUT_all( + 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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn3 Layer + [3] = LAYOUT_all( + 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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + diff --git a/keyboards/kopibeng/xt65e/keymaps/via/rules.mk b/keyboards/kopibeng/xt65e/keymaps/via/rules.mk new file mode 100644 index 00000000000..4852be61c54 --- /dev/null +++ b/keyboards/kopibeng/xt65e/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kopibeng/xt65e/keymaps/via/vial.json b/keyboards/kopibeng/xt65e/keymaps/via/vial.json new file mode 100644 index 00000000000..b8e4fdf1134 --- /dev/null +++ b/keyboards/kopibeng/xt65e/keymaps/via/vial.json @@ -0,0 +1,177 @@ +{ + "name": "XT65E", + "vendorId": "0x4B50", + "productId": "0x065E", + "lighting": "none", + "matrix": {"rows": 5, "cols": 16}, + "layouts": { + "labels": [ + "Split Backspace" + ], + "keymap": [ + [ + { + "x": 1.25, + "c": "#777777" + }, + "0,1", + { + "c": "#cccccc" + }, + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11", + "0,12", + "0,13", + { + "c": "#aaaaaa", + "w": 2 + }, + "0,14\n\n\n0,0", + "0,15", + { + "x": 0.25, + "c": "#cccccc" + }, + "1,14\n\n\n0,1", + "0,14\n\n\n0,1" + ], + [ + { + "c": "#aaaaaa" + }, + "0,0", + { + "x": 0.25, + "w": 1.5 + }, + "1,1", + { + "c": "#cccccc" + }, + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + "1,13", + { + "w": 1.5 + }, + "2,14", + { + "c": "#aaaaaa" + }, + "1,15" + ], + [ + "1,0", + { + "x": 0.25, + "w": 1.75 + }, + "2,1", + { + "c": "#cccccc" + }, + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + "2,12", + { + "c": "#777777", + "w": 2.25 + }, + "2,13", + { + "c": "#aaaaaa" + }, + "2,15" + ], + [ + "2,0", + { + "x": 0.25, + "w": 2.25 + }, + "3,1", + { + "c": "#cccccc" + }, + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "3,12", + { + "c": "#777777" + }, + "3,14", + { + "c": "#aaaaaa" + }, + "3,15" + ], + [ + "3,0", + { + "x": 0.25, + "w": 1.5 + }, + "4,0", + "4,1", + { + "w": 1.5 + }, + "4,2", + { + "c": "#cccccc", + "w": 7 + }, + "4,7", + { + "c": "#aaaaaa", + "w": 1.5 + }, + "4,11", + { + "x": 0.5, + "c": "#777777" + }, + "4,13", + "4,14", + "4,15" + ] +] + } +} \ No newline at end of file diff --git a/keyboards/kopibeng/xt65e/readme.md b/keyboards/kopibeng/xt65e/readme.md new file mode 100644 index 00000000000..a2752ac9a25 --- /dev/null +++ b/keyboards/kopibeng/xt65e/readme.md @@ -0,0 +1,17 @@ +# XT65E + +![XT65E](https://i.imgur.com/rMcwkDr.png) + +A 65+% PCB with left side macro column, support for VIA and layer indicator LEDs. + +* Keyboard Maintainer: kopibeng +* Hardware Supported: A 65+% keyboard with ATMEGA32U4 +* Hardware Availability: N/A + +Make example for this keyboard (after setting up your build environment): + + make kopibeng/xt65e:default + +Press the switch (SW1) on top side of PCB to enter bootloader. + +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). diff --git a/keyboards/kopibeng/xt65e/rules.mk b/keyboards/kopibeng/xt65e/rules.mk new file mode 100644 index 00000000000..edc32c17002 --- /dev/null +++ b/keyboards/kopibeng/xt65e/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kopibeng/xt65e/xt65e.c b/keyboards/kopibeng/xt65e/xt65e.c new file mode 100644 index 00000000000..306ed941f56 --- /dev/null +++ b/keyboards/kopibeng/xt65e/xt65e.c @@ -0,0 +1,64 @@ +/* Copyright 2021 Samuel Lu + * + * 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 "xt65e.h" + +void keyboard_pre_init_kb (void) { + setPinOutput(B0); + setPinOutput(B1); + setPinOutput(B2); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 1: + writePinHigh(B0); + writePinLow(B1); + writePinLow(B2); + break; + case 2: + writePinLow(B0); + writePinHigh(B1); + writePinLow(B2); + break; + case 3: + writePinLow(B0); + writePinLow(B1); + writePinHigh(B2); + break; + default: + writePinHigh(B0); + writePinHigh(B1); + writePinHigh(B2); + break; + } + return state; +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(E6, led_state.caps_lock); + } + return res; +} + +// __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + // writePin(B0, layer_state_cmp(state, 1)); + // writePin(B1, layer_state_cmp(state, 2)); + // writePin(B2, layer_state_cmp(state, 3)); + // return state; +// } \ No newline at end of file diff --git a/keyboards/kopibeng/xt65e/xt65e.h b/keyboards/kopibeng/xt65e/xt65e.h new file mode 100644 index 00000000000..7b9f2fee855 --- /dev/null +++ b/keyboards/kopibeng/xt65e/xt65e.h @@ -0,0 +1,51 @@ +/* Copyright 2021 Samuel Lu + * + * 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" + +#define ____ KC_NO + + + +#define LAYOUT_all( \ + K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K114, K014, K015, \ + K000, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, K115, \ + K100, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K200, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ + K300, K400, K401, K402, K407, K411, K413, K414, K415 \ +) { \ + {K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \ + {K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \ + {K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215}, \ + {K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315}, \ + {K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, ____, K413, K414, K415} \ +} + +#define LAYOUT_full_bs( \ + K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K000, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, K115, \ + K100, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K200, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ + K300, K400, K401, K402, ____, K407, K411, K413, K414, K415 \ +) { \ + {K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \ + {K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, ____, K115}, \ + {K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215}, \ + {K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315}, \ + {K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, ____, K413, K414, K415} \ +}