diff --git a/docs/feature_combo.md b/docs/feature_combo.md index 2e802446b6b..61f8b2ee197 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -333,27 +333,26 @@ will give the _NAV layer as a reference to it's self. All other layers will have the default for their combo reference layer. If the default is not set, all other layers will reference themselves. - ```c - #define COMBO_REF_DEFAULT _MY_COMBO_LAYER - ... +```c +#define COMBO_REF_DEFAULT _MY_COMBO_LAYER - uint8_t combo_ref_from_layer(uint8_t layer){ - switch (get_highest_layer(layer_state)){ - case _DVORAK: return _QWERTY; - case _NAV: return _NAV; - default: return _MY_COMBO_LAYER; - } - return layer; // important if default is not in case. +uint8_t combo_ref_from_layer(uint8_t layer){ + switch (get_highest_layer(layer_state)){ + case _DVORAK: return _QWERTY; + case _NAV: return _NAV; + default: return _MY_COMBO_LAYER; } - ``` + return layer; // important if default is not in case. +} +``` The equivalent definition using the combo macros is this: - ```c - COMBO_REF_LAYER(_DVORAK, _QWERTY) - COMBO_REF_LAYER(_NAV, _NAV) - DEFAULT_REF_LAYER(_MY_COMBO_LAYER). - ``` +```c +COMBO_REF_LAYER(_DVORAK, _QWERTY) +COMBO_REF_LAYER(_NAV, _NAV) +DEFAULT_REF_LAYER(_MY_COMBO_LAYER). +``` ## User callbacks diff --git a/keyboards/compensator/info.json b/keyboards/compensator/info.json new file mode 100644 index 00000000000..ceaa1763338 --- /dev/null +++ b/keyboards/compensator/info.json @@ -0,0 +1,163 @@ +{ + "keyboard_name": "Compensator", + "manufacturer": "Highleap", + "url": "https://lrfoster03.github.io/", + "maintainer": "Lrfoster03", + "usb": { + "vid": "0x564B", + "pid": "0x0001", + "device_version": "1.0.0" + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "matrix_pins": { + "rows": ["B2", "F5", "F7", "F1", "B3", "F4", "F6", "F0"], + "cols": ["B0", "D4", "B7", "C7", "C6", "B6", "B5", "B4", "D7", "D6", "B1", "D5", "D3", "D2", "D1", "D0"] + }, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "nkro": false + }, + "bootmagic": { + "matrix": [0, 5] + }, + "dynamic_keymap": { + "layer_count": 3 + }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [4, 0], "x": 2.25, "y": 0}, + {"matrix": [4, 1], "x": 3.25, "y": 0}, + {"matrix": [0, 2], "x": 4.25, "y": 0}, + {"matrix": [0, 3], "x": 5.25, "y": 0}, + {"matrix": [4, 2], "x": 6.5, "y": 0}, + {"matrix": [4, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + {"matrix": [0, 5], "x": 9.75, "y": 0, "w": 1.5}, + {"matrix": [4, 4], "x": 11.25, "y": 0}, + {"matrix": [4, 5], "x": 12.25, "y": 0}, + {"matrix": [0, 6], "x": 13.25, "y": 0}, + {"matrix": [0, 7], "x": 14.25, "y": 0}, + {"matrix": [4, 6], "x": 15.25, "y": 0}, + {"matrix": [4, 7], "x": 16.25, "y": 0}, + {"matrix": [0, 8], "x": 17.25, "y": 0}, + {"matrix": [0, 9], "x": 18.25, "y": 0}, + {"matrix": [4, 8], "x": 19.25, "y": 0}, + {"matrix": [4, 9], "x": 20.25, "y": 0}, + {"matrix": [0, 10], "x": 21.25, "y": 0}, + {"matrix": [0, 11], "x": 22.25, "y": 0}, + {"matrix": [4, 10], "x": 23.25, "y": 0, "w": 1.5}, + {"matrix": [4, 11], "x": 25, "y": 0}, + {"matrix": [0, 12], "x": 26, "y": 0}, + {"matrix": [0, 13], "x": 27, "y": 0}, + {"matrix": [4, 12], "x": 28.25, "y": 0}, + {"matrix": [4, 13], "x": 29.25, "y": 0}, + {"matrix": [0, 14], "x": 30.25, "y": 0}, + {"matrix": [0, 15], "x": 31.25, "y": 0}, + {"matrix": [4, 14], "x": 32.5, "y": 0}, + {"matrix": [4, 15], "x": 33.5, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [5, 0], "x": 2.25, "y": 1}, + {"matrix": [5, 1], "x": 3.25, "y": 1}, + {"matrix": [1, 2], "x": 4.25, "y": 1}, + {"matrix": [1, 3], "x": 5.25, "y": 1}, + {"matrix": [5, 2], "x": 6.5, "y": 1}, + {"matrix": [5, 3], "x": 7.5, "y": 1}, + {"matrix": [1, 4], "x": 8.5, "y": 1}, + {"matrix": [1, 5], "x": 9.75, "y": 1, "w": 1.25}, + {"matrix": [5, 4], "x": 11.5, "y": 1}, + {"matrix": [5, 5], "x": 12.5, "y": 1}, + {"matrix": [1, 6], "x": 13.5, "y": 1}, + {"matrix": [1, 7], "x": 14.5, "y": 1}, + {"matrix": [5, 6], "x": 15.5, "y": 1}, + {"matrix": [5, 7], "x": 16.5, "y": 1}, + {"matrix": [1, 8], "x": 17.5, "y": 1}, + {"matrix": [1, 9], "x": 18.5, "y": 1}, + {"matrix": [5, 8], "x": 19.5, "y": 1}, + {"matrix": [5, 9], "x": 20.5, "y": 1}, + {"matrix": [1, 10], "x": 21.5, "y": 1}, + {"matrix": [1, 11], "x": 22.5, "y": 1, "w": 2.25}, + {"matrix": [5, 11], "x": 25, "y": 1}, + {"matrix": [1, 12], "x": 26, "y": 1}, + {"matrix": [1, 13], "x": 27, "y": 1}, + {"matrix": [5, 12], "x": 28.25, "y": 1}, + {"matrix": [5, 13], "x": 29.25, "y": 1}, + {"matrix": [1, 14], "x": 30.25, "y": 1}, + {"matrix": [1, 15], "x": 31.25, "y": 1}, + {"matrix": [5, 14], "x": 32.5, "y": 1}, + {"matrix": [5, 15], "x": 33.5, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [6, 0], "x": 2.25, "y": 2}, + {"matrix": [6, 1], "x": 3.25, "y": 2}, + {"matrix": [2, 2], "x": 4.25, "y": 2}, + {"matrix": [2, 3], "x": 5.25, "y": 2}, + {"matrix": [6, 2], "x": 6.5, "y": 2}, + {"matrix": [6, 3], "x": 7.5, "y": 2}, + {"matrix": [2, 4], "x": 8.5, "y": 2}, + {"matrix": [2, 5], "x": 9.75, "y": 2, "w": 1.25}, + {"matrix": [6, 4], "x": 11, "y": 2}, + {"matrix": [6, 5], "x": 12, "y": 2}, + {"matrix": [2, 6], "x": 13, "y": 2}, + {"matrix": [2, 7], "x": 14, "y": 2}, + {"matrix": [6, 6], "x": 15, "y": 2}, + {"matrix": [6, 7], "x": 16, "y": 2}, + {"matrix": [2, 8], "x": 17, "y": 2}, + {"matrix": [2, 9], "x": 18, "y": 2}, + {"matrix": [6, 8], "x": 19, "y": 2}, + {"matrix": [6, 9], "x": 20, "y": 2}, + {"matrix": [2, 10], "x": 21, "y": 2}, + {"matrix": [2, 11], "x": 22, "y": 2, "w": 1.75}, + {"matrix": [6, 10], "x": 23.75, "y": 2}, + {"matrix": [6, 11], "x": 25, "y": 2}, + {"matrix": [2, 12], "x": 26, "y": 2}, + {"matrix": [2, 13], "x": 27, "y": 2}, + {"matrix": [6, 12], "x": 28.25, "y": 2}, + {"matrix": [6, 13], "x": 29.25, "y": 2}, + {"matrix": [2, 14], "x": 30.25, "y": 2}, + {"matrix": [2, 15], "x": 31.25, "y": 2}, + {"matrix": [6, 14], "x": 32.5, "y": 2}, + {"matrix": [6, 15], "x": 33.5, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [7, 0], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [3, 2], "x": 4.25, "y": 3}, + {"matrix": [3, 3], "x": 5.25, "y": 3}, + {"matrix": [7, 2], "x": 6.5, "y": 3}, + {"matrix": [7, 3], "x": 7.5, "y": 3}, + {"matrix": [3, 4], "x": 8.5, "y": 3}, + {"matrix": [3, 5], "x": 9.75, "y": 3, "w": 1.5}, + {"matrix": [3, 6], "x": 12.25, "y": 3, "w": 1.5}, + {"matrix": [3, 7], "x": 13.75, "y": 3, "w": 2.75}, + {"matrix": [3, 8], "x": 16.5, "y": 3, "w": 1.5}, + {"matrix": [3, 9], "x": 18, "y": 3, "w": 2.75}, + {"matrix": [3, 10], "x": 20.75, "y": 3, "w": 1.5}, + {"matrix": [7, 10], "x": 23.25, "y": 3, "w": 1.5}, + {"matrix": [7, 11], "x": 25, "y": 3}, + {"matrix": [3, 12], "x": 26, "y": 3}, + {"matrix": [3, 13], "x": 27, "y": 3}, + {"matrix": [7, 12], "x": 28.25, "y": 3}, + {"matrix": [7, 13], "x": 29.25, "y": 3}, + {"matrix": [3, 14], "x": 30.25, "y": 3}, + {"matrix": [3, 15], "x": 31.25, "y": 3}, + {"matrix": [7, 14], "x": 32.5, "y": 3}, + {"matrix": [7, 15], "x": 33.5, "y": 3} + ] + } + } +} diff --git a/keyboards/compensator/keymaps/default/keymap.c b/keyboards/compensator/keymaps/default/keymap.c new file mode 100644 index 00000000000..5e39c20e72f --- /dev/null +++ b/keyboards/compensator/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2024 Lrfoster03 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + KC_P00 = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base -> XT:Num:Nav:Alphas:Nav:Num:Xt*/ + KC_F1, KC_F2, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_INS, KC_HOME, KC_PGUP, 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_INS, KC_HOME, KC_PGUP, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_F1, KC_F2, + KC_F3, KC_F4, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_DEL, KC_END, KC_PGDN, 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_DEL, KC_END, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_F3, KC_F4, + KC_F5, KC_F6, KC_PENT, KC_P1, KC_P2, KC_P3, KC_NO, KC_UP, KC_NO, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_NO, KC_UP, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_F5, KC_F6, + KC_F7, KC_F8, KC_PMNS, KC_PDOT, KC_P0, KC_P00, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LALT, KC_LCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P00, KC_P0, KC_PDOT, KC_PMNS, KC_F7, KC_F8 + ), + + [1] = LAYOUT( /* MO(1) */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUM, KC_TRNS, KC_TRNS, KC_TRNS, 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_NUM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case KC_P00: + tap_code(KC_P0); + tap_code(KC_P0); + return false; + } + } + return true; +} diff --git a/keyboards/compensator/keymaps/via/keymap.c b/keyboards/compensator/keymaps/via/keymap.c new file mode 100644 index 00000000000..d9124a96aff --- /dev/null +++ b/keyboards/compensator/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2024 Lrfoster03 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + KC_P00 = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base -> XT:Num:Nav:Alphas:Nav:Num:Xt*/ + KC_F1, KC_F2, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_INS, KC_HOME, KC_PGUP, 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_INS, KC_HOME, KC_PGUP, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_F1, KC_F2, + KC_F3, KC_F4, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_DEL, KC_END, KC_PGDN, 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_DEL, KC_END, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_F3, KC_F4, + KC_F5, KC_F6, KC_PENT, KC_P1, KC_P2, KC_P3, KC_NO, KC_UP, KC_NO, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_NO, KC_UP, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_F5, KC_F6, + KC_F7, KC_F8, KC_PMNS, KC_PDOT, KC_P0, KC_P00, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LALT, KC_LCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P00, KC_P0, KC_PDOT, KC_PMNS, KC_F7, KC_F8 + ), + + [1] = LAYOUT( /* MO(1) */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUM, KC_TRNS, KC_TRNS, KC_TRNS, 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_NUM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case KC_P00: + tap_code(KC_P0); + tap_code(KC_P0); + return false; + } + } + return true; +} diff --git a/keyboards/compensator/keymaps/via/rules.mk b/keyboards/compensator/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/compensator/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/compensator/matrix_diagram.md b/keyboards/compensator/matrix_diagram.md new file mode 100644 index 00000000000..39eeec7b509 --- /dev/null +++ b/keyboards/compensator/matrix_diagram.md @@ -0,0 +1,25 @@ +# Matrix Diagram for Compensator + +``` +┌───────┐┌───────────────┐┌───────────┐┌───────────────────────────────────────────────────────────┐┌───────────┐┌───────────────┐┌───────┐ +│00 │01 ││02 │03 │04 │05 ││06 │07 │08 ││09 │0A │0B │0C │0D │0E │0F │0G │0H │0I │0J │0K │0L │0M ││0N │0O │0P ││0Q │0R │0S │0T ││0U │0V │ +├───┼───┤├───┼───┼───┼───┤├───┼───┼───│├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤├───┼───┼───│├───┼───┼───┼───┤├───┼───┤ +│10 │11 ││12 │13 │14 │15 ││16 │17 │18 ││19 │1A │1B │1C │1D │1E │1F │1G │1H │1I │1J │1K │1L ││1M │1N │1O ││1P │1Q │1R │1S ││1T │1U │ +├───┼───┤├───┼───┼───┼───┤└───┼───┼───┘├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤└───┼───┼───┘├───┼───┼───┼───┤├───┼───┤ +│20 │21 ││22 │23 │24 │25 │ │26 │ │27 │28 │29 │2A │2B │2C │2D │2E │2F │2G │2H │2I │2J │2K │ │1L │ │2M │2N │2O │2P ││2Q │2R │ +├───┼───┤├───┼───┼───┼───┤┌───┼───┼───┐├────┴┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤┌───┼───┼───┐├───┼───┼───┼───┤├───┼───┤ +│31 │32 ││33 │34 │35 │36 ││37 │38 │39 ││3A │ │3B │3C │3D │ │3E ││3F │3G │3H ││3I │3J │3K │3L ││30 │31 │ +└───┴───┘└───┴───┴───┴───┘└───┴───┴───┘└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘└───┴───┴───┘└───┴───┴───┴───┘└───┴───┘ + ┌───────┐ ┌────────┐ ┌──────────┐ ┌───────┐ + 2u Numpad Zero │36 │ │27 │ 2.25u LShift 2.75u RShift │2J │ │3I │ 2u Numpad Zero + └───────┘ └────────┘ └──────────┘ └───────┘ + ┌───┐ ┌───────────────────────────────────────┐ ┌───┐ + │ │ 2u │3C │ 10u Space │ │ 2u + │02 │ Numpad └───────────────────────────────────────┘ │0T │ Numpad + │ │ Plus │ │ Plus + ├───┤ ┌─────────┐┌─────┐┌─────────┐ 2.75 + 1.5 + ├───┤ + │ │ 2u |3C ||3C ||3C | 2.75 Split │ │ 2u + │33 │ Numpad └─────────┘└─────┘└─────────┘ Spacebar │3L │ Numpad + │ │ Enter │ │ Enter + └───┘ └───┘ +``` diff --git a/keyboards/compensator/readme.md b/keyboards/compensator/readme.md new file mode 100644 index 00000000000..13502ecad2d --- /dev/null +++ b/keyboards/compensator/readme.md @@ -0,0 +1,24 @@ +# The Compensator + +[Compensator](https://i.imgur.com/fAB2SSTh.png) + +A 40% monstrosity with 10U spacebar support and a required 2 keycap sets to fill. It supports VIA. [Geekhack Post](https://geekhack.org/index.php?topic=122493.0) + +* Keyboard Maintainer: [Lrfoster03](https://lrfoster03.github.io/) and on [GitHub](https://github.com/Lrfoster03) +* Hardware Supported: A 40% with 2 numpads, 2 nav clusters, and 2 XT columns with an ATMEGU32U4 +* Hardware Availability: Contact @victusss on discord. [vk.works Discord](https://discord.gg/7weV2kyqFB) + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make compensator: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). + +### Flash +- Ensure PCB is plugged in and recognized by the computer +- Hold Physical reset button on back of the PCB to enter bootloader mode +- Flash using QMK Toolbox or CLI (`make compensator::flash`) diff --git a/keyboards/compensator/rules.mk b/keyboards/compensator/rules.mk new file mode 100644 index 00000000000..6e7633bfe01 --- /dev/null +++ b/keyboards/compensator/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/inett_studio/sq80/hotswap_layout_i/info.json b/keyboards/inett_studio/sq80/hotswap_layout_i/info.json new file mode 100644 index 00000000000..3d18b0fc942 --- /dev/null +++ b/keyboards/inett_studio/sq80/hotswap_layout_i/info.json @@ -0,0 +1,131 @@ +{ + "keyboard_name": "SQUARE 80 % Hotswap Layout I", + "manufacturer": "iNETT Studio", + "url": "https://geekhack.org/index.php?topic=100769.0", + "maintainer": "Wraul", + "usb": { + "vid": "0x694E", + "pid": "0x6060", + "device_version": "0.0.1" + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "matrix_pins": { + "cols": [ "C7", "C6", "B6", "B3", "B4", "D7", "D6", "E6", "F0", "F1", "F4", "F5", "F7", "D5", "D3" ], + "rows": ["B0", "B1", "B2", "F6", "B5", "D4"] + }, + "diode_direction": "COL2ROW", + "indicators": { + "caps_lock": "D0", + "scroll_lock": "D1", + "num_lock": "D2", + "on_state": 0 + }, + "features": { + "bootmagic": true, + "command": true, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "community_layouts": ["tkl_ansi"], + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 2, "y": 0 }, + { "matrix": [0, 2], "x": 3, "y": 0 }, + { "matrix": [0, 3], "x": 4, "y": 0 }, + { "matrix": [0, 4], "x": 5, "y": 0 }, + { "matrix": [0, 5], "x": 6.5, "y": 0 }, + { "matrix": [0, 6], "x": 7.5, "y": 0 }, + { "matrix": [0, 7], "x": 8.5, "y": 0 }, + { "matrix": [0, 8], "x": 9.5, "y": 0 }, + { "matrix": [0, 9], "x": 11, "y": 0 }, + { "matrix": [0, 10], "x": 12, "y": 0 }, + { "matrix": [0, 11], "x": 13, "y": 0 }, + { "matrix": [0, 12], "x": 14, "y": 0 }, + { "matrix": [0, 13], "x": 15.25, "y": 0 }, + { "matrix": [0, 14], "x": 16.25, "y": 0 }, + { "matrix": [3, 14], "x": 17.25, "y": 0 }, + + { "matrix": [5, 0], "x": 0, "y": 1.5 }, + { "matrix": [1, 0], "x": 1, "y": 1.5 }, + { "matrix": [1, 1], "x": 2, "y": 1.5 }, + { "matrix": [1, 2], "x": 3, "y": 1.5 }, + { "matrix": [1, 3], "x": 4, "y": 1.5 }, + { "matrix": [1, 4], "x": 5, "y": 1.5 }, + { "matrix": [1, 5], "x": 6, "y": 1.5 }, + { "matrix": [1, 6], "x": 7, "y": 1.5 }, + { "matrix": [1, 7], "x": 8, "y": 1.5 }, + { "matrix": [1, 8], "x": 9, "y": 1.5 }, + { "matrix": [1, 9], "x": 10, "y": 1.5 }, + { "matrix": [1, 10], "x": 11, "y": 1.5 }, + { "matrix": [1, 11], "x": 12, "y": 1.5 }, + { "matrix": [1, 12], "w": 2, "x": 13, "y": 1.5 }, + { "matrix": [1, 13], "x": 15.25, "y": 1.5 }, + { "matrix": [1, 14], "x": 16.25, "y": 1.5 }, + { "matrix": [3, 13], "x": 17.25, "y": 1.5 }, + + { "matrix": [5, 1], "w": 1.5, "x": 0, "y": 2.5 }, + { "matrix": [2, 0], "x": 1.5, "y": 2.5 }, + { "matrix": [2, 1], "x": 2.5, "y": 2.5 }, + { "matrix": [2, 2], "x": 3.5, "y": 2.5 }, + { "matrix": [2, 3], "x": 4.5, "y": 2.5 }, + { "matrix": [2, 4], "x": 5.5, "y": 2.5 }, + { "matrix": [2, 5], "x": 6.5, "y": 2.5 }, + { "matrix": [2, 6], "x": 7.5, "y": 2.5 }, + { "matrix": [2, 7], "x": 8.5, "y": 2.5 }, + { "matrix": [2, 8], "x": 9.5, "y": 2.5 }, + { "matrix": [2, 9], "x": 10.5, "y": 2.5 }, + { "matrix": [2, 10], "x": 11.5, "y": 2.5 }, + { "matrix": [2, 11], "x": 12.5, "y": 2.5 }, + { "matrix": [2, 12], "w": 1.5, "x": 13.5, "y": 2.5 }, + { "matrix": [2, 13], "x": 15.25, "y": 2.5 }, + { "matrix": [2, 14], "x": 16.25, "y": 2.5 }, + { "matrix": [4, 14], "x": 17.25, "y": 2.5 }, + + { "matrix": [5, 2], "w": 1.75, "x": 0, "y": 3.5 }, + { "matrix": [3, 0], "x": 1.75, "y": 3.5 }, + { "matrix": [3, 1], "x": 2.75, "y": 3.5 }, + { "matrix": [3, 2], "x": 3.75, "y": 3.5 }, + { "matrix": [3, 3], "x": 4.75, "y": 3.5 }, + { "matrix": [3, 4], "x": 5.75, "y": 3.5 }, + { "matrix": [3, 5], "x": 6.75, "y": 3.5 }, + { "matrix": [3, 6], "x": 7.75, "y": 3.5 }, + { "matrix": [3, 7], "x": 8.75, "y": 3.5 }, + { "matrix": [3, 8], "x": 9.75, "y": 3.5 }, + { "matrix": [3, 9], "x": 10.75, "y": 3.5 }, + { "matrix": [3, 10], "x": 11.75, "y": 3.5 }, + { "matrix": [3, 11], "w": 2.25, "x": 12.75, "y": 3.5 }, + + { "matrix": [5, 3], "w": 2.25, "x": 0, "y": 4.5 }, + { "matrix": [4, 0], "x": 2.25, "y": 4.5 }, + { "matrix": [4, 1], "x": 3.25, "y": 4.5 }, + { "matrix": [4, 2], "x": 4.25, "y": 4.5 }, + { "matrix": [4, 3], "x": 5.25, "y": 4.5 }, + { "matrix": [4, 4], "x": 6.25, "y": 4.5 }, + { "matrix": [4, 5], "x": 7.25, "y": 4.5 }, + { "matrix": [4, 6], "x": 8.25, "y": 4.5 }, + { "matrix": [4, 7], "x": 9.25, "y": 4.5 }, + { "matrix": [4, 8], "x": 10.25, "y": 4.5 }, + { "matrix": [4, 9], "x": 11.25, "y": 4.5 }, + { "matrix": [4, 10], "w": 2.75, "x": 12.25, "y": 4.5 }, + { "matrix": [4, 13], "x": 16.25, "y": 4.5 }, + + { "matrix": [5, 4], "w": 1.25, "x": 0, "y": 5.5 }, + { "matrix": [5, 5], "w": 1.25, "x": 1.25, "y": 5.5 }, + { "matrix": [5, 6], "w": 1.25, "x": 2.5, "y": 5.5 }, + { "matrix": [5, 7], "w": 6.25, "x": 3.75, "y": 5.5 }, + { "matrix": [5, 8], "w": 1.25, "x": 10, "y": 5.5 }, + { "matrix": [5, 9], "w": 1.25, "x": 11.25, "y": 5.5 }, + { "matrix": [5, 10], "w": 1.25, "x": 12.5, "y": 5.5 }, + { "matrix": [5, 11], "w": 1.25, "x": 13.75, "y": 5.5 }, + { "matrix": [5, 12], "x": 15.25, "y": 5.5 }, + { "matrix": [5, 13], "x": 16.25, "y": 5.5 }, + { "matrix": [5, 14], "x": 17.25, "y": 5.5 } + ] + } + } +} diff --git a/keyboards/inett_studio/sq80/hotswap_layout_i/keymaps/default/keymap.json b/keyboards/inett_studio/sq80/hotswap_layout_i/keymaps/default/keymap.json new file mode 100644 index 00000000000..3b3555d62c4 --- /dev/null +++ b/keyboards/inett_studio/sq80/hotswap_layout_i/keymaps/default/keymap.json @@ -0,0 +1,18 @@ +{ + "keyboard": "inett_studio/sq80/hotswap_layout_i", + "keymap": "default", + "layout": "LAYOUT_tkl_ansi", + "layers": [ + [ + "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SCRL", "KC_PAUS", + "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_INS" , "KC_HOME", "KC_PGUP", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL" , "KC_END", "KC_PGDN", + "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "KC_RGUI", "KC_APP", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT" + ] + ], + "author": "Wraul", + "notes": "", + "version": 1 +} diff --git a/keyboards/inett_studio/sq80/hotswap_layout_i/keymaps/via/keymap.json b/keyboards/inett_studio/sq80/hotswap_layout_i/keymaps/via/keymap.json new file mode 100644 index 00000000000..d3d432ab1b6 --- /dev/null +++ b/keyboards/inett_studio/sq80/hotswap_layout_i/keymaps/via/keymap.json @@ -0,0 +1,24 @@ +{ + "keyboard": "inett_studio/sq80/hotswap_layout_i", + "keymap": "via", + "layout": "LAYOUT_tkl_ansi", + "config": { + "features": { + "via": true, + "lto": true + } + }, + "layers": [ + [ + "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SCRL", "KC_PAUS", + "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_INS" , "KC_HOME", "KC_PGUP", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL" , "KC_END", "KC_PGDN", + "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "KC_RGUI", "KC_APP", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT" + ] + ], + "author": "Wraul", + "notes": "", + "version": 1 +} diff --git a/keyboards/inett_studio/sq80/hotswap_layout_i/rules.mk b/keyboards/inett_studio/sq80/hotswap_layout_i/rules.mk new file mode 100644 index 00000000000..6e7633bfe01 --- /dev/null +++ b/keyboards/inett_studio/sq80/hotswap_layout_i/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/inett_studio/sq80/readme.md b/keyboards/inett_studio/sq80/readme.md new file mode 100644 index 00000000000..5e10ace9043 --- /dev/null +++ b/keyboards/inett_studio/sq80/readme.md @@ -0,0 +1,34 @@ +# FOX × iNETT Studio SQUARE 80% + +![sq80](https://i.imgur.com/LM1aSMEh.jpg) + +_A TKL keyboard from the iNETT Studio's SQUARE series._ + +- Keyboard Maintainer: [Wraul](https://github.com/Wraul) +- Hardware Supported: The QMK compatible hot swappable PCB offered during the GB +- Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=100769.0) + +Make example for this keyboard (after setting up your build environment): + + make inett_studio/sq80:default + +Flashing example for this keyboard: + + make inett_studio/sq80:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +The PCB is delivered with a forked version of QMK. +At this moment it is not apparent if the stock firmware comes with a keybinding for entering the bootloader. + +Enter the bootloader with the stock firmware: + +- **Physical reset button**: Briefly press the button on the back of the PCB + +After flashing it is possible to enter the bootloader in 3 ways: + +- **Bootmagic reset**: Hold down the escape key and plug in the keyboard +- **Physical reset button**: Briefly press the button on the back of the PCB +- **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/inett_studio/sq80/rules.mk b/keyboards/inett_studio/sq80/rules.mk new file mode 100644 index 00000000000..d4f8260d939 --- /dev/null +++ b/keyboards/inett_studio/sq80/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = inett_studio/sq80/hotswap_layout_i diff --git a/keyboards/moky/moky88/config.h b/keyboards/moky/moky88/config.h new file mode 100644 index 00000000000..a673a38069c --- /dev/null +++ b/keyboards/moky/moky88/config.h @@ -0,0 +1,19 @@ +// Copyright 2023 VertorWang (@itarze) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* SPI */ +#define SPI_DRIVER SPIDQ +#define SPI_SCK_PIN B3 +#define SPI_MOSI_PIN B5 +#define SPI_MISO_PIN B4 + +/* Flash */ +#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 + +/* RGB Driver */ +#define AW20216S_CS_PIN_1 D2 +#define AW20216S_CS_PIN_2 B8 +#define AW20216S_EN_PIN_1 B9 +#define AW20216S_EN_PIN_2 B9 diff --git a/keyboards/moky/moky88/halconf.h b/keyboards/moky/moky88/halconf.h new file mode 100644 index 00000000000..0a59a1fcb8e --- /dev/null +++ b/keyboards/moky/moky88/halconf.h @@ -0,0 +1,10 @@ +// Copyright 2023 VertorWang (@itarze) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next diff --git a/keyboards/moky/moky88/info.json b/keyboards/moky/moky88/info.json new file mode 100644 index 00000000000..79d5373ea86 --- /dev/null +++ b/keyboards/moky/moky88/info.json @@ -0,0 +1,272 @@ +{ + "manufacturer": "moky", + "keyboard_name": "moky88", + "url": "", + "processor": "WB32FQ95", + "bootloader": "wb32-dfu", + "usb": { + "device_version": "1.0.0", + "vid": "0xBB4F", + "pid": "0x0001", + "suspend_wakeup_delay": 1000 + }, + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "encoder": true + }, + "matrix_pins": { + "cols": ["C0", "C1", "C2", "C3", "A6", "B10", "B11", "B12", "B13", "B14", "B15", "C6", "C7", "C8", "C9", "A8", "C4"], + "rows": ["A0", "A1", "A2", "A3", "A4", "C13"] + }, + "eeprom": { + "wear_leveling": { + "backing_size": 4096, + "driver": "spi_flash" + } + }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B7"} + ] + }, + "rgb_matrix": { + "driver": "aw20216", + "max_brightness": 108, + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "rainbow_moving_chevron": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_flow": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "layout": [ + {"flags": 4, "matrix": [0, 0], "x": 0 , "y": 0}, + {"flags": 4, "matrix": [0, 1], "x": 14 , "y": 0}, + {"flags": 4, "matrix": [0, 2], "x": 28 , "y": 0}, + {"flags": 4, "matrix": [0, 3], "x": 42 , "y": 0}, + {"flags": 4, "matrix": [0, 4], "x": 56 , "y": 0}, + {"flags": 4, "matrix": [0, 5], "x": 70 , "y": 0}, + {"flags": 4, "matrix": [0, 6], "x": 84 , "y": 0}, + {"flags": 4, "matrix": [0, 7], "x": 98 , "y": 0}, + {"flags": 4, "matrix": [0, 8], "x": 112, "y": 0}, + {"flags": 4, "matrix": [0, 9], "x": 126, "y": 0}, + {"flags": 4, "matrix": [0,10], "x": 140, "y": 0}, + {"flags": 4, "matrix": [0,11], "x": 154, "y": 0}, + {"flags": 4, "matrix": [0,12], "x": 168, "y": 0}, + {"flags": 4, "matrix": [0,13], "x": 182, "y": 0}, + {"flags": 4, "matrix": [0,14], "x": 196, "y": 0}, + {"flags": 4, "matrix": [0,15], "x": 210, "y": 0}, + {"flags": 4, "matrix": [0,16], "x": 224, "y": 0}, + {"flags": 4, "matrix": [1, 0], "x": 0 , "y": 13}, + {"flags": 4, "matrix": [1, 1], "x": 14 , "y": 13}, + {"flags": 4, "matrix": [1, 2], "x": 28 , "y": 13}, + {"flags": 4, "matrix": [1, 3], "x": 42 , "y": 13}, + {"flags": 4, "matrix": [1, 4], "x": 56 , "y": 13}, + {"flags": 4, "matrix": [1, 5], "x": 70 , "y": 13}, + {"flags": 4, "matrix": [1, 6], "x": 84 , "y": 13}, + {"flags": 4, "matrix": [1, 7], "x": 98 , "y": 13}, + {"flags": 4, "matrix": [1, 8], "x": 112, "y": 13}, + {"flags": 4, "matrix": [1, 9], "x": 126, "y": 13}, + {"flags": 4, "matrix": [1,10], "x": 140, "y": 13}, + {"flags": 4, "matrix": [1,11], "x": 154, "y": 13}, + {"flags": 4, "matrix": [1,12], "x": 168, "y": 13}, + {"flags": 4, "matrix": [1,13], "x": 182, "y": 13}, + {"flags": 4, "matrix": [1,14], "x": 196, "y": 13}, + {"flags": 4, "matrix": [1,15], "x": 210, "y": 13}, + {"flags": 4, "matrix": [1,16], "x": 224, "y": 13}, + {"flags": 4, "matrix": [2, 0], "x": 0 , "y": 26}, + {"flags": 4, "matrix": [2, 1], "x": 14 , "y": 26}, + {"flags": 4, "matrix": [2, 2], "x": 28 , "y": 26}, + {"flags": 4, "matrix": [2, 3], "x": 42 , "y": 26}, + {"flags": 4, "matrix": [2, 4], "x": 56 , "y": 26}, + {"flags": 4, "matrix": [2, 5], "x": 70 , "y": 26}, + {"flags": 4, "matrix": [2, 6], "x": 84 , "y": 26}, + {"flags": 4, "matrix": [2, 7], "x": 98 , "y": 26}, + {"flags": 4, "matrix": [2, 8], "x": 112, "y": 26}, + {"flags": 4, "matrix": [2, 9], "x": 126, "y": 26}, + {"flags": 4, "matrix": [2,10], "x": 140, "y": 26}, + {"flags": 4, "matrix": [2,11], "x": 154, "y": 26}, + {"flags": 4, "matrix": [2,12], "x": 168, "y": 26}, + {"flags": 4, "matrix": [2,13], "x": 182, "y": 26}, + {"flags": 4, "matrix": [2,14], "x": 196, "y": 26}, + {"flags": 4, "matrix": [2,15], "x": 210, "y": 26}, + {"flags": 4, "matrix": [2,16], "x": 224, "y": 26}, + {"flags": 4, "matrix": [3, 0], "x": 0 , "y": 39}, + {"flags": 4, "matrix": [3, 1], "x": 14 , "y": 39}, + {"flags": 4, "matrix": [3, 2], "x": 28 , "y": 39}, + {"flags": 4, "matrix": [3, 3], "x": 42 , "y": 39}, + {"flags": 4, "matrix": [3, 4], "x": 56 , "y": 39}, + {"flags": 4, "matrix": [3, 5], "x": 70 , "y": 39}, + {"flags": 4, "matrix": [3, 6], "x": 84 , "y": 39}, + {"flags": 4, "matrix": [3, 7], "x": 98 , "y": 39}, + {"flags": 4, "matrix": [3, 8], "x": 112, "y": 39}, + {"flags": 4, "matrix": [3, 9], "x": 126, "y": 39}, + {"flags": 4, "matrix": [3,10], "x": 140, "y": 39}, + {"flags": 4, "matrix": [3,11], "x": 154, "y": 39}, + {"flags": 4, "matrix": [3,13], "x": 182, "y": 39}, + {"flags": 4, "matrix": [4, 0], "x": 0 , "y": 52}, + {"flags": 4, "matrix": [4, 2], "x": 28 , "y": 52}, + {"flags": 4, "matrix": [4, 3], "x": 42 , "y": 52}, + {"flags": 4, "matrix": [4, 4], "x": 56 , "y": 52}, + {"flags": 4, "matrix": [4, 5], "x": 70 , "y": 52}, + {"flags": 4, "matrix": [4, 6], "x": 84 , "y": 52}, + {"flags": 4, "matrix": [4, 7], "x": 98 , "y": 52}, + {"flags": 4, "matrix": [4, 8], "x": 112, "y": 52}, + {"flags": 4, "matrix": [4, 9], "x": 126, "y": 52}, + {"flags": 4, "matrix": [4,10], "x": 140, "y": 52}, + {"flags": 4, "matrix": [4,11], "x": 154, "y": 52}, + {"flags": 4, "matrix": [4,13], "x": 182, "y": 52}, + {"flags": 4, "matrix": [4,15], "x": 210, "y": 52}, + {"flags": 4, "matrix": [5, 0], "x": 0 , "y": 64}, + {"flags": 4, "matrix": [5, 1], "x": 14 , "y": 64}, + {"flags": 4, "matrix": [5, 2], "x": 28 , "y": 64}, + {"flags": 4, "matrix": [5, 6], "x": 84 , "y": 64}, + {"flags": 4, "matrix": [5,10], "x": 140, "y": 64}, + {"flags": 4, "matrix": [5,11], "x": 154, "y": 64}, + {"flags": 4, "matrix": [5,12], "x": 168, "y": 64}, + {"flags": 4, "matrix": [5,13], "x": 182, "y": 64}, + {"flags": 4, "matrix": [5,14], "x": 196, "y": 64}, + {"flags": 4, "matrix": [5,15], "x": 210, "y": 64}, + {"flags": 4, "matrix": [5,16], "x": 224, "y": 64} + ], + "sleep": true + }, + "community_layouts": ["tkl_f13_ansi"], + "layouts": { + "LAYOUT_tkl_f13_ansi": { + "layout": [ + {"matrix": [0,0], "x": 0, "y": 0 }, + {"matrix": [0,1], "x": 1.5, "y": 0 }, + {"matrix": [0,2], "x": 2.5, "y": 0 }, + {"matrix": [0,3], "x": 3.5, "y": 0 }, + {"matrix": [0,4], "x": 4.5, "y": 0 }, + {"matrix": [0,5], "x": 5.75, "y": 0 }, + {"matrix": [0,6], "x": 6.75, "y": 0 }, + {"matrix": [0,7], "x": 7.75, "y": 0 }, + {"matrix": [0,8], "x": 8.75, "y": 0 }, + {"matrix": [0,9], "x": 10, "y": 0 }, + {"matrix": [0,10], "x": 11, "y": 0 }, + {"matrix": [0,11], "x": 12, "y": 0 }, + {"matrix": [0,12], "x": 13, "y": 0 }, + {"matrix": [0,13], "x": 14.25, "y": 0 }, + {"matrix": [0,14], "x": 15.75, "y": 0 }, + {"matrix": [0,15], "x": 16.75, "y": 0 }, + {"matrix": [0,16], "x": 17.75, "y": 0 }, + {"matrix": [1,0], "x": 0, "y": 1.25 }, + {"matrix": [1,1], "x": 1, "y": 1.25 }, + {"matrix": [1,2], "x": 2, "y": 1.25 }, + {"matrix": [1,3], "x": 3, "y": 1.25 }, + {"matrix": [1,4], "x": 4, "y": 1.25 }, + {"matrix": [1,5], "x": 5, "y": 1.25 }, + {"matrix": [1,6], "x": 6, "y": 1.25 }, + {"matrix": [1,7], "x": 7, "y": 1.25 }, + {"matrix": [1,8], "x": 8, "y": 1.25 }, + {"matrix": [1,9], "x": 9, "y": 1.25 }, + {"matrix": [1,10], "x": 10, "y": 1.25 }, + {"matrix": [1,11], "x": 11, "y": 1.25 }, + {"matrix": [1,12], "x": 12, "y": 1.25 }, + {"matrix": [1,13], "x": 13, "y": 1.25, "w": 2.25 }, + {"matrix": [1,14], "x": 15.75, "y": 1.25 }, + {"matrix": [1,15], "x": 16.75, "y": 1.25 }, + {"matrix": [1,16], "x": 17.75, "y": 1.25 }, + {"matrix": [2,0], "x": 0, "y": 2.25, "w": 1.5 }, + {"matrix": [2,1], "x": 1.5, "y": 2.25 }, + {"matrix": [2,2], "x": 2.5, "y": 2.25 }, + {"matrix": [2,3], "x": 3.5, "y": 2.25 }, + {"matrix": [2,4], "x": 4.5, "y": 2.25 }, + {"matrix": [2,5], "x": 5.5, "y": 2.25 }, + {"matrix": [2,6], "x": 6.5, "y": 2.25 }, + {"matrix": [2,7], "x": 7.5, "y": 2.25 }, + {"matrix": [2,8], "x": 8.5, "y": 2.25 }, + {"matrix": [2,9], "x": 9.5, "y": 2.25 }, + {"matrix": [2,10], "x": 10.5, "y": 2.25 }, + {"matrix": [2,11], "x": 11.5, "y": 2.25 }, + {"matrix": [2,12], "x": 12.5, "y": 2.25 }, + {"matrix": [2,13], "x": 13.5, "y": 2.25, "w": 1.75 }, + {"matrix": [2,14], "x": 15.75, "y": 2.25 }, + {"matrix": [2,15], "x": 16.75, "y": 2.25 }, + {"matrix": [2,16], "x": 17.75, "y": 2.25 }, + {"matrix": [3,0], "x": 0, "y": 3.25, "w": 1.75 }, + {"matrix": [3,1], "x": 1.75, "y": 3.25 }, + {"matrix": [3,2], "x": 2.75, "y": 3.25 }, + {"matrix": [3,3], "x": 3.75, "y": 3.25 }, + {"matrix": [3,4], "x": 4.75, "y": 3.25 }, + {"matrix": [3,5], "x": 5.75, "y": 3.25 }, + {"matrix": [3,6], "x": 6.75, "y": 3.25 }, + {"matrix": [3,7], "x": 7.75, "y": 3.25 }, + {"matrix": [3,8], "x": 8.75, "y": 3.25 }, + {"matrix": [3,9], "x": 9.75, "y": 3.25 }, + {"matrix": [3,10], "x": 10.75, "y": 3.25 }, + {"matrix": [3,11], "x": 11.75, "y": 3.25 }, + {"matrix": [3,13], "x": 12.75, "y": 3.25, "w": 2.5 }, + {"matrix": [4,0], "x": 0, "y": 4.25, "w": 2.25 }, + {"matrix": [4,2], "x": 2.25, "y": 4.25 }, + {"matrix": [4,3], "x": 3.25, "y": 4.25 }, + {"matrix": [4,4], "x": 4.25, "y": 4.25 }, + {"matrix": [4,5], "x": 5.25, "y": 4.25 }, + {"matrix": [4,6], "x": 6.25, "y": 4.25 }, + {"matrix": [4,7], "x": 7.25, "y": 4.25 }, + {"matrix": [4,8], "x": 8.25, "y": 4.25 }, + {"matrix": [4,9], "x": 9.25, "y": 4.25 }, + {"matrix": [4,10], "x": 10.25, "y": 4.25 }, + {"matrix": [4,11], "x": 11.25, "y": 4.25 }, + {"matrix": [4,13], "x": 12.25, "y": 4.25, "w": 3 }, + {"matrix": [4,15], "x": 16.75, "y": 4.25 }, + {"matrix": [5,0], "x": 0, "y": 5.25, "w": 1.25 }, + {"matrix": [5,1], "x": 1.25, "y": 5.25, "w": 1.25 }, + {"matrix": [5,2], "x": 2.5, "y": 5.25, "w": 1.25 }, + {"matrix": [5,6], "x": 3.75, "y": 5.25, "w": 6.5 }, + {"matrix": [5,10], "x": 10.25, "y": 5.25, "w": 1.25 }, + {"matrix": [5,11], "x": 11.5, "y": 5.25, "w": 1.25 }, + {"matrix": [5,12], "x": 12.75, "y": 5.25, "w": 1.25 }, + {"matrix": [5,13], "x": 14, "y": 5.25, "w": 1.25 }, + {"matrix": [5,14], "x": 15.75, "y": 5.25 }, + {"matrix": [5,15], "x": 16.75, "y": 5.25 }, + {"matrix": [5,16], "x": 17.75, "y": 5.25 } + ] + } + } +} diff --git a/keyboards/moky/moky88/keymaps/default/keymap.c b/keyboards/moky/moky88/keymaps/default/keymap.c new file mode 100644 index 00000000000..5b86c306cfd --- /dev/null +++ b/keyboards/moky/moky88/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +// Copyright 2023 VertorWang (@itarze) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_f13_ansi( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_PSCR, KC_SCRL, KC_PAUSE, + 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_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_tkl_f13_ansi( /* Base */ + _______, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, RGB_TOG, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, RGB_MOD, _______, _______, _______, + _______, TO(0), TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, GU_TOGG, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI), + + [2] = LAYOUT_tkl_f13_ansi( /* Base */ + KC_ESC, KC_BRMD, KC_BRMU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, KC_SCRL, KC_PAUSE, + 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_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(3), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [3] = LAYOUT_tkl_f13_ansi( /* FN */ + _______, 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_MUTE, KC_PSCR, KC_SCRL, KC_PAUSE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, RGB_TOG, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, RGB_MOD, _______, _______, _______, + _______, TO(0), TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI), +}; + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + + [0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD)}, + [1] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD)}, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, +}; + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + + if (get_highest_layer(default_layer_state | layer_state) == 1) { + rgb_matrix_set_color(52, RGB_WHITE); + } else if (get_highest_layer(default_layer_state | layer_state) == 3) { + rgb_matrix_set_color(53, RGB_WHITE); + } + + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(51, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS); + } + if (host_keyboard_led_state().scroll_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(15, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS); + } + if (keymap_config.no_gui) { + if (get_highest_layer(default_layer_state) == 0) { + RGB_MATRIX_INDICATOR_SET_COLOR(80, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS); + } else if (get_highest_layer(default_layer_state) == 2) { + RGB_MATRIX_INDICATOR_SET_COLOR(81, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS); + } + } + + return true; +} diff --git a/keyboards/moky/moky88/keymaps/default/rules.mk b/keyboards/moky/moky88/keymaps/default/rules.mk new file mode 100644 index 00000000000..ee325681483 --- /dev/null +++ b/keyboards/moky/moky88/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/moky/moky88/keymaps/via/keymap.c b/keyboards/moky/moky88/keymaps/via/keymap.c new file mode 100644 index 00000000000..c67ded7b65b --- /dev/null +++ b/keyboards/moky/moky88/keymaps/via/keymap.c @@ -0,0 +1,73 @@ +// Copyright 2023 VertorWang (@itarze) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_f13_ansi( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_PSCR, KC_SCRL, KC_PAUSE, + 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_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_tkl_f13_ansi( /* Base */ + QK_BOOT, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, RGB_TOG, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, RGB_MOD, _______, _______, _______, + _______, TO(0), TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, GU_TOGG, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI), + + [2] = LAYOUT_tkl_f13_ansi( /* Base */ + KC_ESC, KC_BRMD, KC_BRMU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, KC_SCRL, KC_PAUSE, + 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_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(3), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [3] = LAYOUT_tkl_f13_ansi( /* FN */ + QK_BOOT, 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_MUTE, KC_PSCR, KC_SCRL, KC_PAUSE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, RGB_TOG, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, RGB_MOD, _______, _______, _______, + _______, TO(0), TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI), +}; + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + + [0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD)}, + [1] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD)}, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, +}; + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + + if (get_highest_layer(default_layer_state | layer_state) == 1) { + rgb_matrix_set_color(52, RGB_WHITE); + } else if (get_highest_layer(default_layer_state | layer_state) == 3) { + rgb_matrix_set_color(53, RGB_WHITE); + } + + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(51, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS); + } + if (host_keyboard_led_state().scroll_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(15, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS); + } + if (keymap_config.no_gui) { + if (get_highest_layer(default_layer_state) == 0) { + RGB_MATRIX_INDICATOR_SET_COLOR(80, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS); + } else if (get_highest_layer(default_layer_state) == 2) { + RGB_MATRIX_INDICATOR_SET_COLOR(81, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS, RGB_MATRIX_MAXIMUM_BRIGHTNESS); + } + } + + return true; +} diff --git a/keyboards/moky/moky88/keymaps/via/rules.mk b/keyboards/moky/moky88/keymaps/via/rules.mk new file mode 100644 index 00000000000..715838ecc5d --- /dev/null +++ b/keyboards/moky/moky88/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/moky/moky88/mcuconf.h b/keyboards/moky/moky88/mcuconf.h new file mode 100644 index 00000000000..848f55377e5 --- /dev/null +++ b/keyboards/moky/moky88/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright (C) 2023 Westberry Technology Corp., Ltd + * + * 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 WB32_SPI_USE_QSPI +#define WB32_SPI_USE_QSPI TRUE diff --git a/keyboards/moky/moky88/moky88.c b/keyboards/moky/moky88/moky88.c new file mode 100644 index 00000000000..3cbd6e14681 --- /dev/null +++ b/keyboards/moky/moky88/moky88.c @@ -0,0 +1,119 @@ +/* Copyright (C) 2023 Westberry Technology Corp., Ltd + * + * 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 aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, CS18_SW2, CS17_SW2, CS16_SW2 }, // 0 Esc + {0, CS18_SW3, CS17_SW3, CS16_SW3 }, // 1 F1 + {0, CS18_SW4, CS17_SW4, CS16_SW4 }, // 2 F2 + {0, CS18_SW5, CS17_SW5, CS16_SW5 }, // 3 F3 + {0, CS18_SW6, CS17_SW6, CS16_SW6 }, // 4 F4 + {0, CS18_SW7, CS17_SW7, CS16_SW7 }, // 5 F5 + {0, CS18_SW8, CS17_SW8, CS16_SW8 }, // 6 F6 + {0, CS18_SW9, CS17_SW9, CS16_SW9 }, // 7 F7 + {0, CS18_SW10, CS17_SW10, CS16_SW10 }, // 8 F8 + {0, CS18_SW11, CS17_SW11, CS16_SW11 }, // 9 F9 + {0, CS18_SW12, CS17_SW12, CS16_SW12 }, // 10 F10 + {1, CS18_SW1, CS17_SW1, CS16_SW1 }, // 11 F11 + {1, CS18_SW2, CS17_SW2, CS16_SW2 }, // 12 F12 + {1, CS18_SW3, CS17_SW3, CS16_SW3 }, // 13 MUTE + {1, CS18_SW4, CS17_SW4, CS16_SW4 }, // 14 PSCR + {1, CS18_SW5, CS17_SW5, CS16_SW5 }, // 15 SCRL + {1, CS18_SW6, CS17_SW6, CS16_SW6 }, // 16 PAUSE + + {0, CS15_SW2, CS14_SW2, CS13_SW2 }, // 17 `~ + {0, CS15_SW3, CS14_SW3, CS13_SW3 }, // 18 1 + {0, CS15_SW4, CS14_SW4, CS13_SW4 }, // 19 2 + {0, CS15_SW5, CS14_SW5, CS13_SW5 }, // 20 3 + {0, CS15_SW6, CS14_SW6, CS13_SW6 }, // 21 4 + {0, CS15_SW7, CS14_SW7, CS13_SW7 }, // 22 5 + {0, CS15_SW8, CS14_SW8, CS13_SW8 }, // 23 6 + {0, CS15_SW9, CS14_SW9, CS13_SW9 }, // 24 7 + {0, CS15_SW10, CS14_SW10, CS13_SW10 }, // 25 8 + {0, CS15_SW11, CS14_SW11, CS13_SW11 }, // 26 9 + {0, CS15_SW12, CS14_SW12, CS13_SW12 }, // 27 0 + {1, CS15_SW1, CS14_SW1, CS13_SW1 }, // 28 -_ + {1, CS15_SW2, CS14_SW2, CS13_SW2 }, // 29 =+ + {1, CS15_SW3, CS14_SW3, CS13_SW3 }, // 30 BSPC + {1, CS15_SW4, CS14_SW4, CS13_SW4 }, // 31 INS + {1, CS15_SW5, CS14_SW5, CS13_SW5 }, // 32 HOME + {1, CS15_SW6, CS14_SW6, CS13_SW6 }, // 33 PGUP + + {0, CS12_SW2, CS11_SW2, CS10_SW2 }, // 34 Tab + {0, CS12_SW3, CS11_SW3, CS10_SW3 }, // 35 Q + {0, CS12_SW4, CS11_SW4, CS10_SW4 }, // 36 W + {0, CS12_SW5, CS11_SW5, CS10_SW5 }, // 37 E + {0, CS12_SW6, CS11_SW6, CS10_SW6 }, // 38 R + {0, CS12_SW7, CS11_SW7, CS10_SW7 }, // 39 T + {0, CS12_SW8, CS11_SW8, CS10_SW8 }, // 40 Y + {0, CS12_SW9, CS11_SW9, CS10_SW9 }, // 41 U + {0, CS12_SW10, CS11_SW10, CS10_SW10 }, // 42 I + {0, CS12_SW11, CS11_SW11, CS10_SW11 }, // 43 O + {0, CS12_SW12, CS11_SW12, CS10_SW12 }, // 44 P + {1, CS12_SW1, CS11_SW1, CS10_SW1 }, // 45 [{ + {1, CS12_SW2, CS11_SW2, CS10_SW2 }, // 48 ]} + {1, CS12_SW3, CS11_SW3, CS10_SW3 }, // 47 \| + {1, CS12_SW4, CS11_SW4, CS10_SW4 }, // 48 Del + {1, CS12_SW5, CS11_SW5, CS10_SW5 }, // 49 End + {1, CS12_SW6, CS11_SW6, CS10_SW6 }, // 50 PGDN + + {0, CS1_SW2, CS2_SW2, CS3_SW2 }, // 51 Caps + {0, CS1_SW3, CS2_SW3, CS3_SW3 }, // 52 A + {0, CS1_SW4, CS2_SW4, CS3_SW4 }, // 33 S + {0, CS1_SW5, CS2_SW5, CS3_SW5 }, // 54 D + {0, CS1_SW6, CS2_SW6, CS3_SW6 }, // 55 F + {0, CS1_SW7, CS2_SW7, CS3_SW7 }, // 56 G + {0, CS1_SW8, CS2_SW8, CS3_SW8 }, // 57 H + {0, CS1_SW9, CS2_SW9, CS3_SW9 }, // 58 J + {0, CS1_SW10, CS2_SW10, CS3_SW10 }, // 59 K + {0, CS1_SW11, CS2_SW11, CS3_SW11 }, // 60 L + {0, CS1_SW12, CS2_SW12, CS3_SW12 }, // 61 ;: + {1, CS1_SW1, CS2_SW1, CS3_SW1 }, // 62 ' + {1, CS1_SW3, CS2_SW3, CS3_SW3 }, // 63 Enter + + {0, CS4_SW2, CS5_SW2, CS6_SW2 }, // 64 Shift + {0, CS4_SW4, CS5_SW4, CS6_SW4 }, // 65 Z + {0, CS4_SW5, CS5_SW5, CS6_SW5 }, // 66 X + {0, CS4_SW6, CS5_SW6, CS6_SW6 }, // 67 C + {0, CS4_SW7, CS5_SW7, CS6_SW7 }, // 68 V + {0, CS4_SW8, CS5_SW8, CS6_SW8 }, // 69 B + {0, CS4_SW9, CS5_SW9, CS6_SW9 }, // 70 N + {0, CS4_SW10, CS5_SW10, CS6_SW10 }, // 71 M + {0, CS4_SW11, CS5_SW11, CS6_SW11 }, // 72 ,< + {0, CS4_SW12, CS5_SW12, CS6_SW12 }, // 73 .> + {1, CS4_SW1, CS5_SW1, CS6_SW1 }, // 74 ? + {1, CS4_SW3, CS5_SW3, CS6_SW3 }, // 75 Shift + {1, CS4_SW5, CS5_SW5, CS6_SW5 }, // 76 Up + + {0, CS7_SW2, CS8_SW2, CS9_SW2 }, // 77 Ctrl_L + {0, CS7_SW3, CS8_SW3, CS9_SW3 }, // 78 Win_L + {0, CS7_SW4, CS8_SW4, CS9_SW4 }, // 79 ALT_L + {0, CS7_SW8, CS8_SW8, CS9_SW8 }, // 80 SPACE + {0, CS7_SW12, CS8_SW12, CS9_SW12 }, // 81 ALT_L + {1, CS7_SW1, CS8_SW1, CS9_SW1 }, // 82 Win_L + {1, CS7_SW2, CS8_SW2, CS9_SW2 }, // 83 Fn + {1, CS7_SW3, CS8_SW3, CS9_SW3 }, // 84 Ctrl_L + {1, CS7_SW4, CS8_SW4, CS9_SW4 }, // 85 Left + {1, CS7_SW5, CS8_SW5, CS9_SW5 }, // 86 Down + {1, CS7_SW6, CS8_SW6, CS9_SW6 }, // 87 Right +}; diff --git a/keyboards/moky/moky88/readme.md b/keyboards/moky/moky88/readme.md new file mode 100644 index 00000000000..62dc876eb2c --- /dev/null +++ b/keyboards/moky/moky88/readme.md @@ -0,0 +1,26 @@ +# moky88 +![moky/moky88](https://i.imgur.com/lssV4bq.png) + +An in-switch RGB LED keyboard with RGB underglow. + +* Keyboard Maintainer: [Vertor](https://github.com/VertorWang) +* Hardware Supported: moky88 +* Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make moky/moky88:default + +Flashing example for this keyboard: + + make moky/moky88:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/moky/moky88/rules.mk b/keyboards/moky/moky88/rules.mk new file mode 100644 index 00000000000..7ff128fa692 --- /dev/null +++ b/keyboards/moky/moky88/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank \ No newline at end of file