From 24e29a80337b2e2a4815db948ca3102d40c79d76 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 19 Apr 2022 21:26:00 -0500 Subject: [PATCH 01/12] Add Montex V2 (#10) --- keyboards/idobao/montex/v2/config.h | 107 ++++++++++++++++++ keyboards/idobao/montex/v2/info.json | 43 +++++++ .../idobao/montex/v2/keymaps/default/keymap.c | 67 +++++++++++ .../idobao/montex/v2/keymaps/via/keymap.c | 52 +++++++++ .../idobao/montex/v2/keymaps/via/rules.mk | 2 + keyboards/idobao/montex/v2/readme.md | 21 ++++ keyboards/idobao/montex/v2/rules.mk | 18 +++ keyboards/idobao/montex/v2/v2.c | 17 +++ keyboards/idobao/montex/v2/v2.h | 35 ++++++ 9 files changed, 362 insertions(+) create mode 100644 keyboards/idobao/montex/v2/config.h create mode 100644 keyboards/idobao/montex/v2/info.json create mode 100644 keyboards/idobao/montex/v2/keymaps/default/keymap.c create mode 100644 keyboards/idobao/montex/v2/keymaps/via/keymap.c create mode 100644 keyboards/idobao/montex/v2/keymaps/via/rules.mk create mode 100644 keyboards/idobao/montex/v2/readme.md create mode 100644 keyboards/idobao/montex/v2/rules.mk create mode 100644 keyboards/idobao/montex/v2/v2.c create mode 100644 keyboards/idobao/montex/v2/v2.h diff --git a/keyboards/idobao/montex/v2/config.h b/keyboards/idobao/montex/v2/config.h new file mode 100644 index 000000000000..4b1f54f0b291 --- /dev/null +++ b/keyboards/idobao/montex/v2/config.h @@ -0,0 +1,107 @@ +/* Copyright 2021 NachoxMacho +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6964 +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Idobao +#define PRODUCT Montex + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 5 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, D6, D7, B4, B5, C6 } +#define MATRIX_COL_PINS { D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_SLEEP +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +// Uncomment out to use the underbody LEDs, hidden by the aluminum case. Useful for the acrylic bottom +// #define MONTEX_USE_UNDERBODY + +// LED MAP +// +// 4 3 2 1 0 +// LED05, LED04, LED03, LED02, LED01 +// +---------------------------------------- +// | +// | 5 6 7 8 9 +// | LED10, LED09, LED08, LED07, LED06 +// +---------------------------------------+ +// 10 | +// LED11 | +// 14 13 12 11 | +// LED15, LED14, LED13, LED12 | +// +---------------------------------------+ +// | +// | 15 16 17 18 +// | LED19, LED18, LED17, LED16 +// +---------------------------------------+ +// 19 | +// LED24 | +// +---------------------------------------+ +// | 23 22 21 20 +// | LED23, LED22, LED21, LED20 +// | +// | 24 25 26 +// | LED27, LED26, LED25 +// +---------------------------------------+ +// | +// UNDERBODY LIGHTING | +// | +// 29 30 | +// LED29, LED28 | +// +-------------- | +// | | +// | 28 27 | +// | LED30, LED31 | +// |---------------------------------------+ + +#ifdef MONTEX_USE_UNDERBODY +#define RGBLED_NUM 31 +#define RGBLIGHT_LED_MAP {4,3,2,1,0,9,8,7,6,5,14,13,12,11,10,18,17,16,15,23,22,21,20,19,26,25,24,29,30,28,27} +#else +#define RGBLED_NUM 27 +#define RGBLIGHT_LED_MAP {4,3,2,1,0,9,8,7,6,5,14,13,12,11,10,18,17,16,15,23,22,21,20,19,26,25,24} +#endif + + +#endif diff --git a/keyboards/idobao/montex/v2/info.json b/keyboards/idobao/montex/v2/info.json new file mode 100644 index 000000000000..9bd278e5b092 --- /dev/null +++ b/keyboards/idobao/montex/v2/info.json @@ -0,0 +1,43 @@ +{ + "keyboard_name": "montex numpad", + "url": "https://www.idobao.net/products/ldobao-montex-pad-hot-swappable-mechanical-keyboard-kit", + "maintainer": "IBNobody", + "layouts": { + "LAYOUT_numpad_6x5": { + "layout": [ + { "label": "0,0", "x": 0, "y": 0}, + { "label": "0,1", "x": 1, "y": 0}, + { "label": "0,2", "x": 2, "y": 0}, + { "label": "0,3", "x": 3, "y": 0}, + { "label": "0,4", "x": 4, "y": 0}, + + { "label": "1,0", "x": 0, "y": 1.25}, + { "label": "1,1", "x": 1, "y": 1.25}, + { "label": "1,2", "x": 2, "y": 1.25}, + { "label": "1,3", "x": 3, "y": 1.25}, + { "label": "1,4", "x": 4, "y": 1.25}, + + { "label": "2,0", "x": 0, "y": 2.25}, + { "label": "2,1", "x": 1, "y": 2.25}, + { "label": "2,2", "x": 2, "y": 2.25}, + { "label": "2,3", "x": 3, "y": 2.25}, + + { "label": "3,0", "x": 0, "y": 3.25}, + { "label": "3,1", "x": 1, "y": 3.25}, + { "label": "3,2", "x": 2, "y": 3.25}, + { "label": "3,3", "x": 3, "y": 3.25}, + { "label": "3,4", "x": 4, "y": 2.25, "h": 2}, + + { "label": "4,0", "x": 0, "y": 4.25}, + { "label": "4,1", "x": 1, "y": 4.25}, + { "label": "4,2", "x": 2, "y": 4.25}, + { "label": "4,3", "x": 3, "y": 4.25}, + + { "label": "5,0", "x": 0, "y": 5.25}, + { "label": "5,1", "x": 1, "y": 5.25, "w": 2}, + { "label": "5,2", "x": 3, "y": 5.25}, + { "label": "5,3", "x": 4, "y": 4.25, "h": 2} + ] + } + } +} diff --git a/keyboards/idobao/montex/v2/keymaps/default/keymap.c b/keyboards/idobao/montex/v2/keymaps/default/keymap.c new file mode 100644 index 000000000000..a15c576cbbdb --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/default/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2021 NachoxMacho +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┌───┬───┬───┬───┐ + * │ ` │Esc│Tab│MO1│Bsp│ + * ├───┼───┼───┼───┼───┤ + * │ , │Num│ / │ * │ - │ + * ├───┼───┼───┼───┼───┤ + * │Gui│ 7 │ 8 │ 9 │ │ + * ├───┼───┼───┼───┤ + │ + * │Alt│ 4 │ 5 │ 6 │ │ + * ├───┼───┼───┼───┼───┤ + * │Shi│ 1 │ 2 │ 3 │ │ + * ├───┼───┴───┼───┤Ent│ + * │Ctr│ 0 │ . │ │ + * └───┴───────┴───┴───┘ + */ + [0] = LAYOUT_numpad_6x5( + KC_GRAVE, KC_ESC, KC_TAB, MO(1), KC_BSPC, + KC_COMMA, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_LGUI, KC_P7, KC_P8, KC_P9, + KC_LALT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSHIFT, KC_P1, KC_P2, KC_P3, + KC_LCTRL, KC_P0, KC_PDOT, KC_PENT + ), + + /* + * ┌───┌───┐───┬───┬───┐ + * │Rst│ ` │Tab│MO1│Bsp│ + * ├───┼───┘───┼───┼───┤ + * │ , │Num│ / │ * │ - │ + * ├───┼───┼───┼───┼───┤ + * │Gui│Hom│ ↑ │PgU│ │ + * ├───┼───┼───┼───┤ + │ + * │Alt│ ← │ │ → │ │ + * ├───┼───┼───┼───┤───┤ + * │Shi│End│ ↓ │PgD│ │ + * ├───┼───┴───┼───┤Ent│ + * │Ctr│Insert │Del│ │ + * └───┴───────┴───┘───┘ + */ + [1] = LAYOUT_numpad_6x5( + RESET, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, KC_HOME, KC_UP, KC_PGUP, + _______, KC_LEFT, XXXXXXX, KC_RGHT, _______, + _______, KC_END, KC_DOWN, KC_PGDN, + _______, KC_INS, KC_DEL, _______ + ) +}; diff --git a/keyboards/idobao/montex/v2/keymaps/via/keymap.c b/keyboards/idobao/montex/v2/keymaps/via/keymap.c new file mode 100644 index 000000000000..eb7875dc32b2 --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2021 Tybera +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_6x5( + KC_GRAVE, KC_ESC, KC_TAB, MO(1), KC_BSPC, + KC_COMMA, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_LGUI, KC_P7, KC_P8, KC_P9, + KC_LALT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSHIFT, KC_P1, KC_P2, KC_P3, + KC_LCTRL, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_numpad_6x5( + RESET, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, KC_HOME, KC_UP, KC_PGUP, + _______, KC_LEFT, XXXXXXX, KC_RGHT, _______, + _______, KC_END, KC_DOWN, KC_PGDN, + _______, KC_INS, KC_DEL, _______ + ), + [2] = LAYOUT_numpad_6x5( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [3] = LAYOUT_numpad_6x5( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) +}; diff --git a/keyboards/idobao/montex/v2/keymaps/via/rules.mk b/keyboards/idobao/montex/v2/keymaps/via/rules.mk new file mode 100644 index 000000000000..ca9fed0e6b53 --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +LTO_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/idobao/montex/v2/readme.md b/keyboards/idobao/montex/v2/readme.md new file mode 100644 index 000000000000..f68fa6d91e55 --- /dev/null +++ b/keyboards/idobao/montex/v2/readme.md @@ -0,0 +1,21 @@ +# IDOBAO MONTEX + +A hotswap numpad from IDOBAO. + +## Support: + +* Keyboard Maintainer: [IBNobody](https://github.com/IBNobody) +* Hardware Supported: IDOBAO MONTEX +* Hardware Availability: [IDOBAO](https://www.idobao.net/products/ldobao-montex-pad-hot-swappable-mechanical-keyboard-kit) + + +To jump to the bootloader, the default in the repository and stock on the board is to hold the 4th key on the top row and tap the first key in the top row. +On some stock keyboard firmware, the top and second from the top row pins have been reversed so you may need to press those keys on the second row. +If none of that works, there is a reset button on the PCB underside which you can access by removing the back plate. +Then press the button labeled SW2 located between the 2 upper LEDs. + +Make example for this keyboard (after setting up your build environment): + + make idobao/montex/v2: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/idobao/montex/v2/rules.mk b/keyboards/idobao/montex/v2/rules.mk new file mode 100644 index 000000000000..65540808e49f --- /dev/null +++ b/keyboards/idobao/montex/v2/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/idobao/montex/v2/v2.c b/keyboards/idobao/montex/v2/v2.c new file mode 100644 index 000000000000..7b4d8b62a375 --- /dev/null +++ b/keyboards/idobao/montex/v2/v2.c @@ -0,0 +1,17 @@ +/* Copyright 2021 NachoxMacho +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "v2.h" diff --git a/keyboards/idobao/montex/v2/v2.h b/keyboards/idobao/montex/v2/v2.h new file mode 100644 index 000000000000..d57097fa88b2 --- /dev/null +++ b/keyboards/idobao/montex/v2/v2.h @@ -0,0 +1,35 @@ +/* Copyright 2021 NachoxMacho +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_numpad_6x5( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, K34, \ + K40, K41, K42, K43, \ + K50, K51, K52, K53 \ +) { \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, K34 }, \ + { K30, K31, K32, K33, KC_NO }, \ + { K40, K41, K42, K43, KC_NO }, \ + { K50, K51, K52, K53, KC_NO } \ +} From abbfaa425d6076f01eb1ae14a02fb18d1120fcef Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 20 Apr 2022 08:15:23 -0500 Subject: [PATCH 02/12] Update readme.md --- keyboards/idobao/montex/v2/readme.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/keyboards/idobao/montex/v2/readme.md b/keyboards/idobao/montex/v2/readme.md index f68fa6d91e55..1a1cd0c7ecb4 100644 --- a/keyboards/idobao/montex/v2/readme.md +++ b/keyboards/idobao/montex/v2/readme.md @@ -1,6 +1,6 @@ # IDOBAO MONTEX -A hotswap numpad from IDOBAO. +A hotswap RGB numpad from IDOBAO. V2 added per-key RGB LEDs in addition to the 4 underglow RGB LEDs. ## Support: @@ -8,11 +8,7 @@ A hotswap numpad from IDOBAO. * Hardware Supported: IDOBAO MONTEX * Hardware Availability: [IDOBAO](https://www.idobao.net/products/ldobao-montex-pad-hot-swappable-mechanical-keyboard-kit) - -To jump to the bootloader, the default in the repository and stock on the board is to hold the 4th key on the top row and tap the first key in the top row. -On some stock keyboard firmware, the top and second from the top row pins have been reversed so you may need to press those keys on the second row. -If none of that works, there is a reset button on the PCB underside which you can access by removing the back plate. -Then press the button labeled SW2 located between the 2 upper LEDs. +To jump to the bootloader, the default in the repository and stock on the board is to hold the 4th key on the top row and tap the first key in the top row. Alternate methods are to hold the upper-left key down when plugging in the keyboard or pressing the reset button. (The reset button is accessable from the underside of the keyboard through an access hole.) Make example for this keyboard (after setting up your build environment): From 4ec1a1fc9f04e3066fcdcc5426d2daaf8a3b23fb Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 20 Apr 2022 08:16:32 -0500 Subject: [PATCH 03/12] Update rules.mk --- keyboards/idobao/montex/v2/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/idobao/montex/v2/rules.mk b/keyboards/idobao/montex/v2/rules.mk index 65540808e49f..85eec9079f3f 100644 --- a/keyboards/idobao/montex/v2/rules.mk +++ b/keyboards/idobao/montex/v2/rules.mk @@ -13,6 +13,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output From 34be91edee46f6e82407409a414c68084b9abe44 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 20 Apr 2022 08:38:16 -0500 Subject: [PATCH 04/12] Update config.h --- keyboards/idobao/montex/v2/config.h | 70 +++++++++++++---------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/keyboards/idobao/montex/v2/config.h b/keyboards/idobao/montex/v2/config.h index 4b1f54f0b291..84e0692f6fa9 100644 --- a/keyboards/idobao/montex/v2/config.h +++ b/keyboards/idobao/montex/v2/config.h @@ -54,46 +54,40 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -// Uncomment out to use the underbody LEDs, hidden by the aluminum case. Useful for the acrylic bottom +// Uncomment out to use the underbody LEDs, hidden by the aluminum case. Useful for the acrylic bottom. // #define MONTEX_USE_UNDERBODY -// LED MAP -// -// 4 3 2 1 0 -// LED05, LED04, LED03, LED02, LED01 -// +---------------------------------------- -// | -// | 5 6 7 8 9 -// | LED10, LED09, LED08, LED07, LED06 -// +---------------------------------------+ -// 10 | -// LED11 | -// 14 13 12 11 | -// LED15, LED14, LED13, LED12 | -// +---------------------------------------+ -// | -// | 15 16 17 18 -// | LED19, LED18, LED17, LED16 -// +---------------------------------------+ -// 19 | -// LED24 | -// +---------------------------------------+ -// | 23 22 21 20 -// | LED23, LED22, LED21, LED20 -// | -// | 24 25 26 -// | LED27, LED26, LED25 -// +---------------------------------------+ -// | -// UNDERBODY LIGHTING | -// | -// 29 30 | -// LED29, LED28 | -// +-------------- | -// | | -// | 28 27 | -// | LED30, LED31 | -// |---------------------------------------+ +/* CHAINED LED ORDER, INCLUDING UNDERBODY LIGHTING + * (AS SEEN FROM ABOVE, NOT WITH THE PAD FLIPPED OVER) + * ┌────┬────┬────┬────┬────┐ ┌──────────┬──────────┐ + * │ 04 │ 03 │ 02 │ 01 │ 00 │ │ │ │ + * ├────┼────┼────┼────┼────┤ │ │ │ + * │ 05 │ 06 │ 07 │ 08 │ 09 │ │ 29 │ 30 │ + * ├────┼────┼────┼────┼────┤ │ │ │ + * │ 14 │ 13 │ 12 │ 11 │ │ │ │ │ + * ├────┼────┼────┼────┤ 10 │ ├──────────┼──────────┤ + * │ 15 │ 16 │ 17 │ 18 │ │ │ │ │ + * ├────┼────┼────┼────┼────┤ │ │ │ + * │ 23 │ 22 │ 21 │ 20 │ │ │ 28 │ 27 │ + * ├────┼────┴────┼────┤ 19 │ │ │ │ + * │ 24 │ 25 │ 26 │ │ │ │ │ + * └────┴─────────┴────┴────┘ └──────────┴──────────┘ + * + * REMAPPED LED ORDER IN RGBLIGHT_LED_MAP + * ┌────┬────┬────┬────┬────┐ ┌──────────┬──────────┐ + * │ 00 │ 01 │ 02 │ 03 │ 04 │ │ │ │ + * ├────┼────┼────┼────┼────┤ │ │ │ + * │ 09 │ 08 │ 07 │ 06 │ 05 │ │ 29 │ 30 │ + * ├────┼────┼────┼────┼────┤ │ │ │ + * │ 10 │ 11 │ 12 │ 13 │ │ │ │ │ + * ├────┼────┼────┼────┤ 14 │ ├──────────┼──────────┤ + * │ 18 │ 17 │ 16 │ 15 │ │ │ │ │ + * ├────┼────┼────┼────┼────┤ │ │ │ + * │ 19 │ 20 │ 21 │ 22 │ │ │ 28 │ 27 │ + * ├────┼────┴────┼────┤ 23 │ │ │ │ + * │ 26 │ 25 │ 24 │ │ │ │ │ + * └────┴─────────┴────┴────┘ └──────────┴──────────┘ + */ #ifdef MONTEX_USE_UNDERBODY #define RGBLED_NUM 31 From ed40dfc09d4712b26d3ce0f89536c4e056b2f3ef Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 21 Apr 2022 23:27:39 -0500 Subject: [PATCH 05/12] Update keyboards/idobao/montex/v2/config.h Co-authored-by: Drashna Jaelre --- keyboards/idobao/montex/v2/config.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/keyboards/idobao/montex/v2/config.h b/keyboards/idobao/montex/v2/config.h index 84e0692f6fa9..d7fdfaa6cf9e 100644 --- a/keyboards/idobao/montex/v2/config.h +++ b/keyboards/idobao/montex/v2/config.h @@ -49,7 +49,16 @@ #define RGB_DI_PIN B1 #ifdef RGB_DI_PIN #define RGBLIGHT_SLEEP -#define RGBLIGHT_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 +#define RGBLIGHT_EFFECT_TWINKLE #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 From 30bf68a13b468d37997dc875959794c80431283b Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 22 Apr 2022 08:32:55 -0500 Subject: [PATCH 06/12] Update keyboards/idobao/montex/v2/rules.mk Add Layouts Co-authored-by: Drashna Jaelre --- keyboards/idobao/montex/v2/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/idobao/montex/v2/rules.mk b/keyboards/idobao/montex/v2/rules.mk index 85eec9079f3f..45464194dabd 100644 --- a/keyboards/idobao/montex/v2/rules.mk +++ b/keyboards/idobao/montex/v2/rules.mk @@ -16,3 +16,5 @@ NKRO_ENABLE = yes # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output + +LAYOUTS = numpad_6x5 From 53f43f36b19b93c40c127290cd9cb51c61d38caa Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 29 Apr 2022 10:24:50 -0500 Subject: [PATCH 07/12] Merged code fron work done with @vinorodrigues --- keyboards/idobao/montex/v2/config.h | 179 +++++++++--------- keyboards/idobao/montex/v2/info.json | 70 ++++--- .../idobao/montex/v2/keymaps/default/keymap.c | 78 ++++---- .../montex/v2/keymaps/default/readme.md | 3 + .../idobao/montex/v2/keymaps/via/config.h | 23 +++ .../idobao/montex/v2/keymaps/via/keymap.c | 141 ++++++++++---- .../idobao/montex/v2/keymaps/via/readme.md | 3 + .../idobao/montex/v2/keymaps/via/rules.mk | 2 +- .../idobao/montex/v2/keymaps/via_nug/config.h | 29 +++ .../idobao/montex/v2/keymaps/via_nug/keymap.c | 132 +++++++++++++ .../montex/v2/keymaps/via_nug/readme.md | 5 + .../idobao/montex/v2/keymaps/via_nug/rules.mk | 2 + keyboards/idobao/montex/v2/readme.md | 28 ++- keyboards/idobao/montex/v2/rules.mk | 9 +- keyboards/idobao/montex/v2/v2.c | 77 ++++++-- keyboards/idobao/montex/v2/v2.h | 60 +++--- 16 files changed, 595 insertions(+), 246 deletions(-) create mode 100644 keyboards/idobao/montex/v2/keymaps/default/readme.md create mode 100644 keyboards/idobao/montex/v2/keymaps/via/config.h create mode 100644 keyboards/idobao/montex/v2/keymaps/via/readme.md create mode 100644 keyboards/idobao/montex/v2/keymaps/via_nug/config.h create mode 100644 keyboards/idobao/montex/v2/keymaps/via_nug/keymap.c create mode 100644 keyboards/idobao/montex/v2/keymaps/via_nug/readme.md create mode 100644 keyboards/idobao/montex/v2/keymaps/via_nug/rules.mk diff --git a/keyboards/idobao/montex/v2/config.h b/keyboards/idobao/montex/v2/config.h index d7fdfaa6cf9e..c1351be16448 100644 --- a/keyboards/idobao/montex/v2/config.h +++ b/keyboards/idobao/montex/v2/config.h @@ -1,110 +1,115 @@ -/* Copyright 2021 NachoxMacho -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* Copyright 2022 IBNobody & vinorodrigues + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x6964 -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0002 -#define MANUFACTURER Idobao -#define PRODUCT Montex +/* NB: VENDOR_ID & PRODUCT_ID et.al. moved to `info.json` */ +// #define VENDOR_ID 0x6964 // "id" +// #define PRODUCT_ID 0x0227 // 0x0027 | 0x02 = v2 designator (for VIA) +// #define DEVICE_VER 0x0002 +// #define MANUFACTURER IDOBAO +// #define PRODUCT Montex ID27 -/* key matrix size */ +/* Key Matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 5 -/* key matrix pins */ +/* Keyboard Matrix Assignments */ + #define MATRIX_ROW_PINS { D4, D6, D7, B4, B5, C6 } #define MATRIX_COL_PINS { D5, D3, D2, D1, D0 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ +// #define UNUSED_PINS {} #define DIODE_DIRECTION ROW2COL -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +/* Other settings */ -/* 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 +/* Debounce reduces chatter (unintended double-presses) - set 0 if + debouncing is not needed */ +#define DEBOUNCE 5 +/* LED Matrix & Animations */ #define RGB_DI_PIN B1 -#ifdef RGB_DI_PIN -#define RGBLIGHT_SLEEP -#define RGBLIGHT_EFFECT_BREATHING -#define RGBLIGHT_EFFECT_RAINBOW_MOOD -#define RGBLIGHT_EFFECT_RAINBOW_SWIRL -#define RGBLIGHT_EFFECT_SNAKE -#define RGBLIGHT_EFFECT_KNIGHT -#define RGBLIGHT_EFFECT_CHRISTMAS -#define RGBLIGHT_EFFECT_STATIC_GRADIENT -#define RGBLIGHT_EFFECT_RGB_TEST -#define RGBLIGHT_EFFECT_ALTERNATING -#define RGBLIGHT_EFFECT_TWINKLE -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -// Uncomment out to use the underbody LEDs, hidden by the aluminum case. Useful for the acrylic bottom. -// #define MONTEX_USE_UNDERBODY +#if defined(RGB_DI_PIN) && defined(RGB_MATRIX_ENABLE) + #ifndef ID27_DISABLE_UNDERGLOW + #define DRIVER_LED_TOTAL 31 // The number of LEDs connected + #else + #define DRIVER_LED_TOTAL 27 // disable underglow LEDs + #endif -/* CHAINED LED ORDER, INCLUDING UNDERBODY LIGHTING - * (AS SEEN FROM ABOVE, NOT WITH THE PAD FLIPPED OVER) - * ┌────┬────┬────┬────┬────┐ ┌──────────┬──────────┐ - * │ 04 │ 03 │ 02 │ 01 │ 00 │ │ │ │ - * ├────┼────┼────┼────┼────┤ │ │ │ - * │ 05 │ 06 │ 07 │ 08 │ 09 │ │ 29 │ 30 │ - * ├────┼────┼────┼────┼────┤ │ │ │ - * │ 14 │ 13 │ 12 │ 11 │ │ │ │ │ - * ├────┼────┼────┼────┤ 10 │ ├──────────┼──────────┤ - * │ 15 │ 16 │ 17 │ 18 │ │ │ │ │ - * ├────┼────┼────┼────┼────┤ │ │ │ - * │ 23 │ 22 │ 21 │ 20 │ │ │ 28 │ 27 │ - * ├────┼────┴────┼────┤ 19 │ │ │ │ - * │ 24 │ 25 │ 26 │ │ │ │ │ - * └────┴─────────┴────┴────┘ └──────────┴──────────┘ - * - * REMAPPED LED ORDER IN RGBLIGHT_LED_MAP - * ┌────┬────┬────┬────┬────┐ ┌──────────┬──────────┐ - * │ 00 │ 01 │ 02 │ 03 │ 04 │ │ │ │ - * ├────┼────┼────┼────┼────┤ │ │ │ - * │ 09 │ 08 │ 07 │ 06 │ 05 │ │ 29 │ 30 │ - * ├────┼────┼────┼────┼────┤ │ │ │ - * │ 10 │ 11 │ 12 │ 13 │ │ │ │ │ - * ├────┼────┼────┼────┤ 14 │ ├──────────┼──────────┤ - * │ 18 │ 17 │ 16 │ 15 │ │ │ │ │ - * ├────┼────┼────┼────┼────┤ │ │ │ - * │ 19 │ 20 │ 21 │ 22 │ │ │ 28 │ 27 │ - * ├────┼────┴────┼────┤ 23 │ │ │ │ - * │ 26 │ 25 │ 24 │ │ │ │ │ - * └────┴─────────┴────┴────┘ └──────────┴──────────┘ - */ + // #define RGBLIGHT_ANIMATIONS // don't use, please explicitly define + // #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // don't use, too few key to make it look good + #define RGB_MATRIX_KEYPRESSES -#ifdef MONTEX_USE_UNDERBODY -#define RGBLED_NUM 31 -#define RGBLIGHT_LED_MAP {4,3,2,1,0,9,8,7,6,5,14,13,12,11,10,18,17,16,15,23,22,21,20,19,26,25,24,29,30,28,27} -#else -#define RGBLED_NUM 27 -#define RGBLIGHT_LED_MAP {4,3,2,1,0,9,8,7,6,5,14,13,12,11,10,18,17,16,15,23,22,21,20,19,26,25,24} -#endif + #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value + + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects + /* *** Items disabled are visually unappealing in a 5x6 key matrix *** */ + #define ENABLE_RGB_MATRIX_SOLID_COLOR + #define ENABLE_RGB_MATRIX_ALPHAS_MODS + #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT + #define ENABLE_RGB_MATRIX_BREATHING + // #define ENABLE_RGB_MATRIX_BAND_SAT + // #define ENABLE_RGB_MATRIX_BAND_VAL + // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + // #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT + // #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define ENABLE_RGB_MATRIX_CYCLE_ALL + #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + // #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN + // #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL + // #define ENABLE_RGB_MATRIX_DUAL_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON + // #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define ENABLE_RGB_MATRIX_RAINDROPS + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define ENABLE_RGB_MATRIX_HUE_BREATHING + #define ENABLE_RGB_MATRIX_HUE_PENDULUM + #define ENABLE_RGB_MATRIX_HUE_WAVE + #define ENABLE_RGB_MATRIX_PIXEL_RAIN + #define ENABLE_RGB_MATRIX_PIXEL_FLOW + #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + /* enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined */ + // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP + // #define ENABLE_RGB_MATRIX_DIGITAL_RAIN + /* enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined */ + // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + // define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + // #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define ENABLE_RGB_MATRIX_SPLASH + // #define ENABLE_RGB_MATRIX_MULTISPLASH + #define ENABLE_RGB_MATRIX_SOLID_SPLASH + // #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/idobao/montex/v2/info.json b/keyboards/idobao/montex/v2/info.json index 9bd278e5b092..b9baaf88925b 100644 --- a/keyboards/idobao/montex/v2/info.json +++ b/keyboards/idobao/montex/v2/info.json @@ -1,42 +1,50 @@ { - "keyboard_name": "montex numpad", - "url": "https://www.idobao.net/products/ldobao-montex-pad-hot-swappable-mechanical-keyboard-kit", - "maintainer": "IBNobody", + "keyboard_name": "Montex ID27", + "url": "https://idobao.net", + "maintainer": "IDOBAOKB", + "manufacturer": "IDOBAO", + "bootloader": "atmel-dfu", + "processor": "atmega32u4", + "usb": { + "vid": "0x6964", + "pid": "0x0227", + "device_version": "2.0.0" + } "layouts": { - "LAYOUT_numpad_6x5": { + "LAYOUT": { "layout": [ - { "label": "0,0", "x": 0, "y": 0}, - { "label": "0,1", "x": 1, "y": 0}, - { "label": "0,2", "x": 2, "y": 0}, - { "label": "0,3", "x": 3, "y": 0}, - { "label": "0,4", "x": 4, "y": 0}, + { "matrix": [0, 0], "label": "K00 (D4,D5)", "x": 0, "y": 0 }, + { "matrix": [0, 1], "label": "K01 (D4,D3)", "x": 1, "y": 0 }, + { "matrix": [0, 2], "label": "K02 (D4,D2)", "x": 2, "y": 0 }, + { "matrix": [0, 3], "label": "K03 (D4,D1)", "x": 3, "y": 0 }, + { "matrix": [0, 4], "label": "K04 (D4,D0)", "x": 4, "y": 0 }, - { "label": "1,0", "x": 0, "y": 1.25}, - { "label": "1,1", "x": 1, "y": 1.25}, - { "label": "1,2", "x": 2, "y": 1.25}, - { "label": "1,3", "x": 3, "y": 1.25}, - { "label": "1,4", "x": 4, "y": 1.25}, + { "matrix": [1, 0], "label": "K10 (D6,D5)", "x": 0, "y": 1 }, + { "matrix": [1, 1], "label": "K11 (D6,D3)", "x": 1, "y": 1 }, + { "matrix": [1, 2], "label": "K12 (D6,D2)", "x": 2, "y": 1 }, + { "matrix": [1, 3], "label": "K13 (D6,D1)", "x": 3, "y": 1 }, + { "matrix": [1, 4], "label": "K14 (D6,D0)", "x": 4, "y": 1 }, - { "label": "2,0", "x": 0, "y": 2.25}, - { "label": "2,1", "x": 1, "y": 2.25}, - { "label": "2,2", "x": 2, "y": 2.25}, - { "label": "2,3", "x": 3, "y": 2.25}, + { "matrix": [2, 0], "label": "K20 (D7,D5)", "x": 0, "y": 2 }, + { "matrix": [2, 1], "label": "K21 (D7,D3)", "x": 1, "y": 2 }, + { "matrix": [2, 2], "label": "K22 (D7,D2)", "x": 2, "y": 2 }, + { "matrix": [2, 3], "label": "K23 (D7,D1)", "x": 3, "y": 2 }, + { "matrix": [2, 4], "label": "K24 (D7,D0)", "x": 4, "y": 2, "h": 2 }, - { "label": "3,0", "x": 0, "y": 3.25}, - { "label": "3,1", "x": 1, "y": 3.25}, - { "label": "3,2", "x": 2, "y": 3.25}, - { "label": "3,3", "x": 3, "y": 3.25}, - { "label": "3,4", "x": 4, "y": 2.25, "h": 2}, + { "matrix": [3, 0], "label": "K30 (B4,D5)", "x": 0, "y": 3 }, + { "matrix": [3, 1], "label": "K31 (B4,D3)", "x": 1, "y": 3 }, + { "matrix": [3, 2], "label": "K32 (B4,D2)", "x": 2, "y": 3 }, + { "matrix": [3, 3], "label": "K33 (B4,D1)", "x": 3, "y": 3 }, - { "label": "4,0", "x": 0, "y": 4.25}, - { "label": "4,1", "x": 1, "y": 4.25}, - { "label": "4,2", "x": 2, "y": 4.25}, - { "label": "4,3", "x": 3, "y": 4.25}, + { "matrix": [4, 0], "label": "K40 (B5,D5)", "x": 0, "y": 4 }, + { "matrix": [4, 1], "label": "K41 (B5,D3)", "x": 1, "y": 4 }, + { "matrix": [4, 2], "label": "K42 (B5,D2)", "x": 2, "y": 4 }, + { "matrix": [4, 3], "label": "K43 (B5,D1)", "x": 3, "y": 4 }, + { "matrix": [5, 3], "label": "K53 (C6,D1)", "x": 4, "y": 4, "h": 2 }, - { "label": "5,0", "x": 0, "y": 5.25}, - { "label": "5,1", "x": 1, "y": 5.25, "w": 2}, - { "label": "5,2", "x": 3, "y": 5.25}, - { "label": "5,3", "x": 4, "y": 4.25, "h": 2} + { "matrix": [5, 0], "label": "K50 (C6,D5)", "x": 0, "y": 5 }, + { "matrix": [5, 1], "label": "K51 (C6,D3)", "x": 1, "y": 5, "w": 2 }, + { "matrix": [5, 2], "label": "K52 (C6,D2)", "x": 3, "y": 5 } ] } } diff --git a/keyboards/idobao/montex/v2/keymaps/default/keymap.c b/keyboards/idobao/montex/v2/keymaps/default/keymap.c index a15c576cbbdb..e7841f608d1f 100644 --- a/keyboards/idobao/montex/v2/keymaps/default/keymap.c +++ b/keyboards/idobao/montex/v2/keymaps/default/keymap.c @@ -1,27 +1,27 @@ -/* Copyright 2021 NachoxMacho -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* Copyright 2022 IBNobody & vinorodrigues + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * ┌───┌───┬───┬───┬───┐ - * │ ` │Esc│Tab│MO1│Bsp│ + * │Esc│Tab│ F1│Cal│Bsp│ * ├───┼───┼───┼───┼───┤ - * │ , │Num│ / │ * │ - │ + * │Ctr│Num│ / │ * │ - │ * ├───┼───┼───┼───┼───┤ * │Gui│ 7 │ 8 │ 9 │ │ * ├───┼───┼───┼───┤ + │ @@ -29,39 +29,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├───┼───┼───┼───┼───┤ * │Shi│ 1 │ 2 │ 3 │ │ * ├───┼───┴───┼───┤Ent│ - * │Ctr│ 0 │ . │ │ + * │MO1│ 0 │ . │ │ * └───┴───────┴───┴───┘ */ - [0] = LAYOUT_numpad_6x5( - KC_GRAVE, KC_ESC, KC_TAB, MO(1), KC_BSPC, - KC_COMMA, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_LGUI, KC_P7, KC_P8, KC_P9, - KC_LALT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSHIFT, KC_P1, KC_P2, KC_P3, - KC_LCTRL, KC_P0, KC_PDOT, KC_PENT + [0] = LAYOUT( + KC_GESC, KC_TAB, KC_F1, KC_CALC, KC_BSPC, + KC_LCTRL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_LGUI, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LALT, KC_P4, KC_P5, KC_P6, + KC_LSHIFT, KC_P1, KC_P2, KC_P3, KC_PENT, + MO(1), KC_P0, KC_PDOT ), /* * ┌───┌───┐───┬───┬───┐ - * │Rst│ ` │Tab│MO1│Bsp│ + * │Rst│TOG│MOD│PSc│SLk│ * ├───┼───┘───┼───┼───┤ - * │ , │Num│ / │ * │ - │ + * │Hu+│ │Sp-│Sp+│Br-│ * ├───┼───┼───┼───┼───┤ - * │Gui│Hom│ ↑ │PgU│ │ - * ├───┼───┼───┼───┤ + │ - * │Alt│ ← │ │ → │ │ + * │Hu-│Hom│ ↑ │PgU│ │ + * ├───┼───┼───┼───┤Br+│ + * │St+│ ← │ │ → │ │ * ├───┼───┼───┼───┤───┤ - * │Shi│End│ ↓ │PgD│ │ + * │St-│End│ ↓ │PgD│ │ * ├───┼───┴───┼───┤Ent│ - * │Ctr│Insert │Del│ │ + * │mo1│Insert │Del│ │ * └───┴───────┴───┘───┘ */ - [1] = LAYOUT_numpad_6x5( - RESET, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, KC_HOME, KC_UP, KC_PGUP, - _______, KC_LEFT, XXXXXXX, KC_RGHT, _______, - _______, KC_END, KC_DOWN, KC_PGDN, - _______, KC_INS, KC_DEL, _______ + [1] = LAYOUT( + RESET, RGB_TOG, RGB_MOD, KC_PSCR, KC_SLCK, + RGB_HUI, XXXXXXX, RGB_SPD, RGB_SPI, RGB_VAD, + RGB_HUD, KC_HOME, KC_UP, KC_PGUP, RGB_VAI, + RGB_SAI, KC_LEFT, XXXXXXX, KC_RGHT, + RGB_SAD, KC_END, KC_DOWN, KC_PGDN, KC_ENT, + _______, KC_INS, KC_DEL ) }; diff --git a/keyboards/idobao/montex/v2/keymaps/default/readme.md b/keyboards/idobao/montex/v2/keymaps/default/readme.md new file mode 100644 index 000000000000..8b73c8b0f199 --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for v2 + +![](https://idobao.github.io/kle/idobao-id27-v2.png) diff --git a/keyboards/idobao/montex/v2/keymaps/via/config.h b/keyboards/idobao/montex/v2/keymaps/via/config.h new file mode 100644 index 000000000000..d3eebb3a30fd --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/via/config.h @@ -0,0 +1,23 @@ +/* Copyright 2022 IBNobody & vinorodrigues + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 6 + +#if defined(RGB_MATRIX_ENABLE) + #define VIA_QMK_RGBLIGHT_ENABLE +#endif diff --git a/keyboards/idobao/montex/v2/keymaps/via/keymap.c b/keyboards/idobao/montex/v2/keymaps/via/keymap.c index eb7875dc32b2..ab73b1ca0ace 100644 --- a/keyboards/idobao/montex/v2/keymaps/via/keymap.c +++ b/keyboards/idobao/montex/v2/keymaps/via/keymap.c @@ -1,52 +1,127 @@ -/* Copyright 2021 Tybera -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* Copyright 2022 IBNobody & vinorodrigues + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #include QMK_KEYBOARD_H +enum montex_layers { + _BASE, + _FN, + _EMPTY2, // Just to initialize dynamic layers in VIA + _EMPTY3, + _EMPTY4, + _EMPTY5 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_numpad_6x5( - KC_GRAVE, KC_ESC, KC_TAB, MO(1), KC_BSPC, - KC_COMMA, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_LGUI, KC_P7, KC_P8, KC_P9, - KC_LALT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSHIFT, KC_P1, KC_P2, KC_P3, - KC_LCTRL, KC_P0, KC_PDOT, KC_PENT + /* + * ┌───┌───┬───┬───┬───┐ + * │Esc│Tab│ F1│Cal│Bsp│ + * ├───┼───┼───┼───┼───┤ + * │Ctr│Num│ / │ * │ - │ + * ├───┼───┼───┼───┼───┤ + * │Gui│ 7 │ 8 │ 9 │ │ + * ├───┼───┼───┼───┤ + │ + * │Alt│ 4 │ 5 │ 6 │ │ + * ├───┼───┼───┼───┼───┤ + * │Shi│ 1 │ 2 │ 3 │ │ + * ├───┼───┴───┼───┤Ent│ + * │MO1│ 0 │ . │ │ + * └───┴───────┴───┴───┘ + */ + [_BASE] = LAYOUT( + KC_GESC, KC_TAB, KC_F1, KC_CALC, KC_BSPC, + KC_LCTRL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_LGUI, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LALT, KC_P4, KC_P5, KC_P6, + KC_LSHIFT, KC_P1, KC_P2, KC_P3, KC_PENT, + MO(1), KC_P0, KC_PDOT ), - [1] = LAYOUT_numpad_6x5( - RESET, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, KC_HOME, KC_UP, KC_PGUP, - _______, KC_LEFT, XXXXXXX, KC_RGHT, _______, - _______, KC_END, KC_DOWN, KC_PGDN, - _______, KC_INS, KC_DEL, _______ + + /* + * ┌───┌───┐───┬───┬───┐ + * │Rst│TOG│MOD│PSs│SLk│ + * ├───┼───┘───┼───┼───┤ + * │Hu+│ │Sp-│Sp+│Br-│ + * ├───┼───┼───┼───┼───┤ + * │Hu-│Hom│ ↑ │PgU│ │ + * ├───┼───┼───┼───┤Br+│ + * │St+│ ← │ │ → │ │ + * ├───┼───┼───┼───┤───┤ + * │St-│End│ ↓ │PgD│ │ + * ├───┼───┴───┼───┤Ent│ + * │mo1│Insert │Del│ │ + * └───┴───────┴───┘───┘ + */ + [_FN] = LAYOUT( + RESET, RGB_TOG, RGB_MOD, KC_PSCR, KC_SLCK, + RGB_HUI, XXXXXXX, RGB_SPD, RGB_SPI, RGB_VAD, + RGB_HUD, KC_HOME, KC_UP, KC_PGUP, RGB_VAI, + RGB_SAI, KC_LEFT, XXXXXXX, KC_RGHT, + RGB_SAD, KC_END, KC_DOWN, KC_PGDN, KC_ENT, + _______, KC_INS, KC_DEL ), - [2] = LAYOUT_numpad_6x5( + + /* 4 extra layers incase you want to map the top row to layer buttons + * ┌───┌───┐───┬───┬───┐ + * │ │ │ │ │ │ + * ├───┼───┘───┼───┼───┤ + * │ │ │ │ │ │ + * ├───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ + * ├───┼───┼───┼───┤ │ + * │ │ │ │ │ │ + * ├───┼───┼───┼───┤───┤ + * │ │ │ │ │ │ + * ├───┼───┴───┼───┤ │ + * │ │ │ │ │ + * └───┴───────┴───┘───┘ + */ + [_EMPTY2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + + [_EMPTY3] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______ + _______, _______, _______, _______, _______, + _______, _______, _______ ), - [3] = LAYOUT_numpad_6x5( + + [_EMPTY4] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + + [_EMPTY5] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______ + _______, _______, _______, _______, _______, + _______, _______, _______ ) }; diff --git a/keyboards/idobao/montex/v2/keymaps/via/readme.md b/keyboards/idobao/montex/v2/keymaps/via/readme.md new file mode 100644 index 000000000000..bd5a40c1e386 --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The VIA keymap for v2 + +![](https://idobao.github.io/kle/idobao-id27-v2.png) diff --git a/keyboards/idobao/montex/v2/keymaps/via/rules.mk b/keyboards/idobao/montex/v2/keymaps/via/rules.mk index ca9fed0e6b53..36b7ba9cbc98 100644 --- a/keyboards/idobao/montex/v2/keymaps/via/rules.mk +++ b/keyboards/idobao/montex/v2/keymaps/via/rules.mk @@ -1,2 +1,2 @@ -LTO_ENABLE = yes VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/idobao/montex/v2/keymaps/via_nug/config.h b/keyboards/idobao/montex/v2/keymaps/via_nug/config.h new file mode 100644 index 000000000000..df9201758200 --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/via_nug/config.h @@ -0,0 +1,29 @@ +/* Copyright 2022 IBNobody & vinorodrigues + * + * 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 + +/** + * NB! THIS VARIANT DISABLES THE UNDERGLOW LEDs + * FOR BOARDS WITH A SOLID (NON-ACRYLIC) BOTTOM + */ + +#define DYNAMIC_KEYMAP_LAYER_COUNT 6 + +#if defined(RGB_MATRIX_ENABLE) + #define VIA_QMK_RGBLIGHT_ENABLE + #define ID27_DISABLE_UNDERGLOW +#endif diff --git a/keyboards/idobao/montex/v2/keymaps/via_nug/keymap.c b/keyboards/idobao/montex/v2/keymaps/via_nug/keymap.c new file mode 100644 index 000000000000..64c0e740307f --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/via_nug/keymap.c @@ -0,0 +1,132 @@ +/* Copyright 2022 IBNobody & vinorodrigues + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/** + * NB! THIS VARIANT DISABLES THE UNDERGLOW LEDs + * FOR BOARDS WITH A SOLID (NON-ACRYLIC) BOTTOM + */ + +#include QMK_KEYBOARD_H + +enum montex_layers { + _BASE, + _FN, + _EMPTY2, // Just to initialize dynamic layers in VIA + _EMPTY3, + _EMPTY4, + _EMPTY5 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┌───┬───┬───┬───┐ + * │Esc│Tab│ F1│Cal│Bsp│ + * ├───┼───┼───┼───┼───┤ + * │Ctr│Num│ / │ * │ - │ + * ├───┼───┼───┼───┼───┤ + * │Gui│ 7 │ 8 │ 9 │ │ + * ├───┼───┼───┼───┤ + │ + * │Alt│ 4 │ 5 │ 6 │ │ + * ├───┼───┼───┼───┼───┤ + * │Shi│ 1 │ 2 │ 3 │ │ + * ├───┼───┴───┼───┤Ent│ + * │MO1│ 0 │ . │ │ + * └───┴───────┴───┴───┘ + */ + [_BASE] = LAYOUT( + KC_GESC, KC_TAB, KC_F1, KC_CALC, KC_BSPC, + KC_LCTRL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_LGUI, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LALT, KC_P4, KC_P5, KC_P6, + KC_LSHIFT, KC_P1, KC_P2, KC_P3, KC_PENT, + MO(1), KC_P0, KC_PDOT + ), + + /* + * ┌───┌───┐───┬───┬───┐ + * │Rst│TOG│MOD│PSs│SLk│ + * ├───┼───┘───┼───┼───┤ + * │Hu+│ │Sp-│Sp+│Br-│ + * ├───┼───┼───┼───┼───┤ + * │Hu-│Hom│ ↑ │PgU│ │ + * ├───┼───┼───┼───┤Br+│ + * │St+│ ← │ │ → │ │ + * ├───┼───┼───┼───┤───┤ + * │St-│End│ ↓ │PgD│ │ + * ├───┼───┴───┼───┤Ent│ + * │mo1│Insert │Del│ │ + * └───┴───────┴───┘───┘ + */ + [_FN] = LAYOUT( + RESET, RGB_TOG, RGB_MOD, KC_PSCR, KC_SLCK, + RGB_HUI, XXXXXXX, RGB_SPD, RGB_SPI, RGB_VAD, + RGB_HUD, KC_HOME, KC_UP, KC_PGUP, RGB_VAI, + RGB_SAI, KC_LEFT, XXXXXXX, KC_RGHT, + RGB_SAD, KC_END, KC_DOWN, KC_PGDN, KC_ENT, + _______, KC_INS, KC_DEL + ), + + /* 4 extra layers incase you want to map the top row to layer buttons + * ┌───┌───┐───┬───┬───┐ + * │ │ │ │ │ │ + * ├───┼───┘───┼───┼───┤ + * │ │ │ │ │ │ + * ├───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ + * ├───┼───┼───┼───┤ │ + * │ │ │ │ │ │ + * ├───┼───┼───┼───┤───┤ + * │ │ │ │ │ │ + * ├───┼───┴───┼───┤ │ + * │ │ │ │ │ + * └───┴───────┴───┘───┘ + */ + [_EMPTY2] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______ + ), + + [_EMPTY3] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______ + ), + + [_EMPTY4] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______ + ), + + [_EMPTY5] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; diff --git a/keyboards/idobao/montex/v2/keymaps/via_nug/readme.md b/keyboards/idobao/montex/v2/keymaps/via_nug/readme.md new file mode 100644 index 000000000000..9828a5b6d52e --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/via_nug/readme.md @@ -0,0 +1,5 @@ +# The VIA keymap for v2 *(No UnderGlow variant)* + +**NB!** THIS VARIANT DISABLES THE UNDERGLOW LEDs FOR BOARDS WITH A SOLID (NON-ACRYLIC) BOTTOM + +![](https://idobao.github.io/kle/idobao-id27-v2.png) diff --git a/keyboards/idobao/montex/v2/keymaps/via_nug/rules.mk b/keyboards/idobao/montex/v2/keymaps/via_nug/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/idobao/montex/v2/keymaps/via_nug/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/idobao/montex/v2/readme.md b/keyboards/idobao/montex/v2/readme.md index 1a1cd0c7ecb4..649b3f47f3a0 100644 --- a/keyboards/idobao/montex/v2/readme.md +++ b/keyboards/idobao/montex/v2/readme.md @@ -1,17 +1,29 @@ -# IDOBAO MONTEX +# IDOBAO Montex V2 -A hotswap RGB numpad from IDOBAO. V2 added per-key RGB LEDs in addition to the 4 underglow RGB LEDs. - -## Support: +![MMONTEX V2](https://idobao.github.io/assets/img/idobao-id27.png) -* Keyboard Maintainer: [IBNobody](https://github.com/IBNobody) -* Hardware Supported: IDOBAO MONTEX -* Hardware Availability: [IDOBAO](https://www.idobao.net/products/ldobao-montex-pad-hot-swappable-mechanical-keyboard-kit) +A hotswap RGB numpad from IDOBAO. -To jump to the bootloader, the default in the repository and stock on the board is to hold the 4th key on the top row and tap the first key in the top row. Alternate methods are to hold the upper-left key down when plugging in the keyboard or pressing the reset button. (The reset button is accessable from the underside of the keyboard through an access hole.) +* Keyboard Maintainer: + - [IBNobody](https://github.com/IBNobody) + - [vinorodrigues](https://github.com/vinorodrigues) +* Hardware Supported: IDOBAO Montex V2 +* Hardware Availability: https://idobao.net/products/idobao-montex-pad-hot-swappable-keyboard-kit-%E7%9A%84%E5%89%AF%E6%9C%AC Make example for this keyboard (after setting up your build environment): make idobao/montex/v2:default +Flashing example for this keyboard: + + make idobao/montex/v2: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 +* **Keycode in layout**: Press the key mapped to `RESET` if it is available diff --git a/keyboards/idobao/montex/v2/rules.mk b/keyboards/idobao/montex/v2/rules.mk index 45464194dabd..93d8d8ce9819 100644 --- a/keyboards/idobao/montex/v2/rules.mk +++ b/keyboards/idobao/montex/v2/rules.mk @@ -12,9 +12,10 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover +NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output - -LAYOUTS = numpad_6x5 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/idobao/montex/v2/v2.c b/keyboards/idobao/montex/v2/v2.c index 7b4d8b62a375..1bd8de74e069 100644 --- a/keyboards/idobao/montex/v2/v2.c +++ b/keyboards/idobao/montex/v2/v2.c @@ -1,17 +1,64 @@ -/* Copyright 2021 NachoxMacho -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* Copyright 2022 IBNobody & vinorodrigues + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #include "v2.h" + +#ifdef RGB_MATRIX_ENABLE + +#define __ NO_LED + +led_config_t g_led_config = { { + // Key Matrix to LED Index + // Montex v2 WS2812 are laid in a Z-shape with index 0 = top-right + // Based on: https://xelus.netlify.app/guides/KLE_to_RGB_parser + { 4, 3, 2, 1, 0}, + { 5, 6, 7, 8, 9}, + { 14, 13, 12, 11, 10}, + { 15, 16, 17, 18, __}, + { 23, 22, 21, 20, __}, + { 24, 25, 26, 19, __} +}, { + // LED Index to Physical Position + // per-key + // Based on: https://xelus.netlify.app/guides/KLE_to_RGB_parser + {224,0 }, {168,0 }, {112,0 }, { 56,0 }, { 0,0 }, // top row + { 0,17 }, { 56,17 }, {112,17 }, {168,17 }, {224,17 }, // num-lk & /*- (reversed) + {224,35 }, {168,29 }, {112,29 }, { 56,29 }, { 0,29 }, // 789+ + { 0,41 }, { 56,41 }, {112,41 }, {168,41 }, // 456 (reversed) + {224,58 }, {168,52 }, {112,52 }, { 56,52 }, // 123 + { 0,52 }, { 0,64 }, { 84,64 }, {168,64 } // 0. & enter (reversed) + // underglow + #ifndef ID27_DISABLE_UNDERGLOW + , {224,64 }, { 0,64 }, + { 0,0 }, { 224,0 } + #endif +}, { + // LED Index to Flag + // LED_FLAG_MODIFIER 0x01, LED_FLAG_UNDERGLOW 0x02, LED_FLAG_KEYLIGHT 0x04, LED_FLAG_INDICATOR 0x08 + // per-key + 1, 1, 1, 1, 1, + 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, + 4, 4, 4, 4, + 4, 4, 4, 4, + 4, 4, 4, 4 + // underglow + #ifndef ID27_DISABLE_UNDERGLOW + , 2, 2, 2, 2 + #endif +} }; + +#endif diff --git a/keyboards/idobao/montex/v2/v2.h b/keyboards/idobao/montex/v2/v2.h index d57097fa88b2..3b703185b49d 100644 --- a/keyboards/idobao/montex/v2/v2.h +++ b/keyboards/idobao/montex/v2/v2.h @@ -1,35 +1,39 @@ -/* Copyright 2021 NachoxMacho -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* Copyright 2022 IBNobody & vinorodrigues + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #pragma once #include "quantum.h" -#define LAYOUT_numpad_6x5( \ - K00, K01, K02, K03, K04, \ - K10, K11, K12, K13, K14, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33, K34, \ - K40, K41, K42, K43, \ - K50, K51, K52, K53 \ +/* NB: LAYOUT defined in `info.json` */ + +/* ----------------------------- keep ----- +#define LAYOUT( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, K24, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43, K53, \ + K50, K51, K52 \ ) { \ - { K00, K01, K02, K03, K04 }, \ - { K10, K11, K12, K13, K14 }, \ - { K20, K21, K22, K23, K34 }, \ - { K30, K31, K32, K33, KC_NO }, \ - { K40, K41, K42, K43, KC_NO }, \ - { K50, K51, K52, K53, KC_NO } \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, K24 }, \ + { K30, K31, K32, K33, KC_NO }, \ + { K40, K41, K42, K43, KC_NO }, \ + { K50, K51, K52, K53, KC_NO } \ } +---------------------------------------- */ From 4bcceabd81e7c5527ccbc635bdf2726235654993 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 29 Apr 2022 12:23:49 -0500 Subject: [PATCH 08/12] Update keyboards/idobao/montex/v2/rules.mk Co-authored-by: Ryan --- keyboards/idobao/montex/v2/rules.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/idobao/montex/v2/rules.mk b/keyboards/idobao/montex/v2/rules.mk index 93d8d8ce9819..f797a90b1fdb 100644 --- a/keyboards/idobao/montex/v2/rules.mk +++ b/keyboards/idobao/montex/v2/rules.mk @@ -15,7 +15,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Enable N-Key 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 RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 From bff42d2b48ae639ab10471e687c6695582fb923c Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 29 Apr 2022 12:24:14 -0500 Subject: [PATCH 09/12] Update keyboards/idobao/montex/v2/v2.h Co-authored-by: Ryan --- keyboards/idobao/montex/v2/v2.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/keyboards/idobao/montex/v2/v2.h b/keyboards/idobao/montex/v2/v2.h index 3b703185b49d..f0b0c9465225 100644 --- a/keyboards/idobao/montex/v2/v2.h +++ b/keyboards/idobao/montex/v2/v2.h @@ -17,23 +17,3 @@ #pragma once #include "quantum.h" - -/* NB: LAYOUT defined in `info.json` */ - -/* ----------------------------- keep ----- -#define LAYOUT( \ - K00, K01, K02, K03, K04, \ - K10, K11, K12, K13, K14, \ - K20, K21, K22, K23, K24, \ - K30, K31, K32, K33, \ - K40, K41, K42, K43, K53, \ - K50, K51, K52 \ -) { \ - { K00, K01, K02, K03, K04 }, \ - { K10, K11, K12, K13, K14 }, \ - { K20, K21, K22, K23, K24 }, \ - { K30, K31, K32, K33, KC_NO }, \ - { K40, K41, K42, K43, KC_NO }, \ - { K50, K51, K52, K53, KC_NO } \ -} ----------------------------------------- */ From aca22898ac215331b163541c97b29fa78a61c8cb Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 29 Apr 2022 12:24:27 -0500 Subject: [PATCH 10/12] Update keyboards/idobao/montex/v2/config.h Co-authored-by: Ryan --- keyboards/idobao/montex/v2/config.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/keyboards/idobao/montex/v2/config.h b/keyboards/idobao/montex/v2/config.h index c1351be16448..1e599c272f2a 100644 --- a/keyboards/idobao/montex/v2/config.h +++ b/keyboards/idobao/montex/v2/config.h @@ -18,14 +18,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -/* NB: VENDOR_ID & PRODUCT_ID et.al. moved to `info.json` */ -// #define VENDOR_ID 0x6964 // "id" -// #define PRODUCT_ID 0x0227 // 0x0027 | 0x02 = v2 designator (for VIA) -// #define DEVICE_VER 0x0002 -// #define MANUFACTURER IDOBAO -// #define PRODUCT Montex ID27 - /* Key Matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 5 From 3a2a1dde82cec4f46f066f4547e8eb593e842917 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 11 May 2022 09:52:41 -0500 Subject: [PATCH 11/12] Removing via_nug keymap --- .../idobao/montex/v2/keymaps/via_nug/config.h | 29 ---- .../idobao/montex/v2/keymaps/via_nug/keymap.c | 132 ------------------ .../montex/v2/keymaps/via_nug/readme.md | 5 - .../idobao/montex/v2/keymaps/via_nug/rules.mk | 2 - 4 files changed, 168 deletions(-) delete mode 100644 keyboards/idobao/montex/v2/keymaps/via_nug/config.h delete mode 100644 keyboards/idobao/montex/v2/keymaps/via_nug/keymap.c delete mode 100644 keyboards/idobao/montex/v2/keymaps/via_nug/readme.md delete mode 100644 keyboards/idobao/montex/v2/keymaps/via_nug/rules.mk diff --git a/keyboards/idobao/montex/v2/keymaps/via_nug/config.h b/keyboards/idobao/montex/v2/keymaps/via_nug/config.h deleted file mode 100644 index df9201758200..000000000000 --- a/keyboards/idobao/montex/v2/keymaps/via_nug/config.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2022 IBNobody & vinorodrigues - * - * 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 - -/** - * NB! THIS VARIANT DISABLES THE UNDERGLOW LEDs - * FOR BOARDS WITH A SOLID (NON-ACRYLIC) BOTTOM - */ - -#define DYNAMIC_KEYMAP_LAYER_COUNT 6 - -#if defined(RGB_MATRIX_ENABLE) - #define VIA_QMK_RGBLIGHT_ENABLE - #define ID27_DISABLE_UNDERGLOW -#endif diff --git a/keyboards/idobao/montex/v2/keymaps/via_nug/keymap.c b/keyboards/idobao/montex/v2/keymaps/via_nug/keymap.c deleted file mode 100644 index 64c0e740307f..000000000000 --- a/keyboards/idobao/montex/v2/keymaps/via_nug/keymap.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright 2022 IBNobody & vinorodrigues - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * NB! THIS VARIANT DISABLES THE UNDERGLOW LEDs - * FOR BOARDS WITH A SOLID (NON-ACRYLIC) BOTTOM - */ - -#include QMK_KEYBOARD_H - -enum montex_layers { - _BASE, - _FN, - _EMPTY2, // Just to initialize dynamic layers in VIA - _EMPTY3, - _EMPTY4, - _EMPTY5 -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┌───┬───┬───┬───┐ - * │Esc│Tab│ F1│Cal│Bsp│ - * ├───┼───┼───┼───┼───┤ - * │Ctr│Num│ / │ * │ - │ - * ├───┼───┼───┼───┼───┤ - * │Gui│ 7 │ 8 │ 9 │ │ - * ├───┼───┼───┼───┤ + │ - * │Alt│ 4 │ 5 │ 6 │ │ - * ├───┼───┼───┼───┼───┤ - * │Shi│ 1 │ 2 │ 3 │ │ - * ├───┼───┴───┼───┤Ent│ - * │MO1│ 0 │ . │ │ - * └───┴───────┴───┴───┘ - */ - [_BASE] = LAYOUT( - KC_GESC, KC_TAB, KC_F1, KC_CALC, KC_BSPC, - KC_LCTRL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_LGUI, KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_LALT, KC_P4, KC_P5, KC_P6, - KC_LSHIFT, KC_P1, KC_P2, KC_P3, KC_PENT, - MO(1), KC_P0, KC_PDOT - ), - - /* - * ┌───┌───┐───┬───┬───┐ - * │Rst│TOG│MOD│PSs│SLk│ - * ├───┼───┘───┼───┼───┤ - * │Hu+│ │Sp-│Sp+│Br-│ - * ├───┼───┼───┼───┼───┤ - * │Hu-│Hom│ ↑ │PgU│ │ - * ├───┼───┼───┼───┤Br+│ - * │St+│ ← │ │ → │ │ - * ├───┼───┼───┼───┤───┤ - * │St-│End│ ↓ │PgD│ │ - * ├───┼───┴───┼───┤Ent│ - * │mo1│Insert │Del│ │ - * └───┴───────┴───┘───┘ - */ - [_FN] = LAYOUT( - RESET, RGB_TOG, RGB_MOD, KC_PSCR, KC_SLCK, - RGB_HUI, XXXXXXX, RGB_SPD, RGB_SPI, RGB_VAD, - RGB_HUD, KC_HOME, KC_UP, KC_PGUP, RGB_VAI, - RGB_SAI, KC_LEFT, XXXXXXX, KC_RGHT, - RGB_SAD, KC_END, KC_DOWN, KC_PGDN, KC_ENT, - _______, KC_INS, KC_DEL - ), - - /* 4 extra layers incase you want to map the top row to layer buttons - * ┌───┌───┐───┬───┬───┐ - * │ │ │ │ │ │ - * ├───┼───┘───┼───┼───┤ - * │ │ │ │ │ │ - * ├───┼───┼───┼───┼───┤ - * │ │ │ │ │ │ - * ├───┼───┼───┼───┤ │ - * │ │ │ │ │ │ - * ├───┼───┼───┼───┤───┤ - * │ │ │ │ │ │ - * ├───┼───┴───┼───┤ │ - * │ │ │ │ │ - * └───┴───────┴───┘───┘ - */ - [_EMPTY2] = LAYOUT( - _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______ - ), - - [_EMPTY3] = LAYOUT( - _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______ - ), - - [_EMPTY4] = LAYOUT( - _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______ - ), - - [_EMPTY5] = LAYOUT( - _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, _______ - ) -}; diff --git a/keyboards/idobao/montex/v2/keymaps/via_nug/readme.md b/keyboards/idobao/montex/v2/keymaps/via_nug/readme.md deleted file mode 100644 index 9828a5b6d52e..000000000000 --- a/keyboards/idobao/montex/v2/keymaps/via_nug/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# The VIA keymap for v2 *(No UnderGlow variant)* - -**NB!** THIS VARIANT DISABLES THE UNDERGLOW LEDs FOR BOARDS WITH A SOLID (NON-ACRYLIC) BOTTOM - -![](https://idobao.github.io/kle/idobao-id27-v2.png) diff --git a/keyboards/idobao/montex/v2/keymaps/via_nug/rules.mk b/keyboards/idobao/montex/v2/keymaps/via_nug/rules.mk deleted file mode 100644 index 36b7ba9cbc98..000000000000 --- a/keyboards/idobao/montex/v2/keymaps/via_nug/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -VIA_ENABLE = yes -LTO_ENABLE = yes From 5fd58d0272d941c82373918842534a2fca566076 Mon Sep 17 00:00:00 2001 From: Vino Rodrigues <366673+vinorodrigues@users.noreply.github.com> Date: Thu, 16 Jun 2022 11:28:58 +1000 Subject: [PATCH 12/12] update to montex code (#11) * remove VIA_QMK_RGBLIGHT_ENABLE * more data driven config, simple copyright headers, some code cleanup --- keyboards/idobao/montex/v2/config.h | 56 +++++-------- keyboards/idobao/montex/v2/info.json | 82 +++++++++++-------- .../idobao/montex/v2/keymaps/default/keymap.c | 25 ++---- .../montex/v2/keymaps/default/readme.md | 3 - .../idobao/montex/v2/keymaps/via/config.h | 21 +---- .../idobao/montex/v2/keymaps/via/keymap.c | 53 +++++------- .../idobao/montex/v2/keymaps/via/readme.md | 3 - .../idobao/montex/v2/keymaps/via/rules.mk | 0 keyboards/idobao/montex/v2/post_rules.mk | 8 ++ keyboards/idobao/montex/v2/readme.md | 20 ++++- keyboards/idobao/montex/v2/rules.mk | 19 +---- keyboards/idobao/montex/v2/v2.c | 52 ++++++++---- keyboards/idobao/montex/v2/v2.h | 17 +--- 13 files changed, 161 insertions(+), 198 deletions(-) mode change 100644 => 100755 keyboards/idobao/montex/v2/config.h mode change 100644 => 100755 keyboards/idobao/montex/v2/info.json mode change 100644 => 100755 keyboards/idobao/montex/v2/keymaps/default/keymap.c delete mode 100644 keyboards/idobao/montex/v2/keymaps/default/readme.md mode change 100644 => 100755 keyboards/idobao/montex/v2/keymaps/via/config.h mode change 100644 => 100755 keyboards/idobao/montex/v2/keymaps/via/keymap.c delete mode 100644 keyboards/idobao/montex/v2/keymaps/via/readme.md mode change 100644 => 100755 keyboards/idobao/montex/v2/keymaps/via/rules.mk create mode 100644 keyboards/idobao/montex/v2/post_rules.mk mode change 100644 => 100755 keyboards/idobao/montex/v2/readme.md mode change 100644 => 100755 keyboards/idobao/montex/v2/rules.mk mode change 100644 => 100755 keyboards/idobao/montex/v2/v2.c mode change 100644 => 100755 keyboards/idobao/montex/v2/v2.h diff --git a/keyboards/idobao/montex/v2/config.h b/keyboards/idobao/montex/v2/config.h old mode 100644 new mode 100755 index 1e599c272f2a..47d43ca458a6 --- a/keyboards/idobao/montex/v2/config.h +++ b/keyboards/idobao/montex/v2/config.h @@ -1,40 +1,10 @@ -/* Copyright 2022 IBNobody & vinorodrigues - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2022 IBNobody (@IBNobody) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "config_common.h" -/* Key Matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 5 - -/* Keyboard Matrix Assignments */ - -#define MATRIX_ROW_PINS { D4, D6, D7, B4, B5, C6 } -#define MATRIX_COL_PINS { D5, D3, D2, D1, D0 } -// #define UNUSED_PINS {} -#define DIODE_DIRECTION ROW2COL - -/* Other settings */ - -/* Debounce reduces chatter (unintended double-presses) - set 0 if - debouncing is not needed */ -#define DEBOUNCE 5 - /* LED Matrix & Animations */ #define RGB_DI_PIN B1 @@ -42,7 +12,7 @@ #ifndef ID27_DISABLE_UNDERGLOW #define DRIVER_LED_TOTAL 31 // The number of LEDs connected #else - #define DRIVER_LED_TOTAL 27 // disable underglow LEDs + #define DRIVER_LED_TOTAL 27 // -4 disabled underglow LEDs #endif // #define RGBLIGHT_ANIMATIONS // don't use, please explicitly define @@ -85,7 +55,7 @@ #define ENABLE_RGB_MATRIX_HUE_WAVE #define ENABLE_RGB_MATRIX_PIXEL_RAIN #define ENABLE_RGB_MATRIX_PIXEL_FLOW - #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + // #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL /* enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined */ // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP @@ -104,4 +74,20 @@ // #define ENABLE_RGB_MATRIX_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH // #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif +#endif // RGB_MATRIX_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 diff --git a/keyboards/idobao/montex/v2/info.json b/keyboards/idobao/montex/v2/info.json old mode 100644 new mode 100755 index b9baaf88925b..62715ec00a5d --- a/keyboards/idobao/montex/v2/info.json +++ b/keyboards/idobao/montex/v2/info.json @@ -1,50 +1,66 @@ { - "keyboard_name": "Montex ID27", - "url": "https://idobao.net", - "maintainer": "IDOBAOKB", "manufacturer": "IDOBAO", + "keyboard_name": "Montex ID27v2", + "maintainer": "IBNobody", "bootloader": "atmel-dfu", + "diode_direction": "ROW2COL", + "debounce": 5, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "backlight": false, + "rgblight": false + }, + "matrix_pins": { + "cols": ["D5", "D3", "D2", "D1", "D0"], + "rows": ["D4", "D6", "D7", "B4", "B5", "C6"] + }, "processor": "atmega32u4", + "url": "https://idobao.net/search?type=product&q=montex*", "usb": { - "vid": "0x6964", + "device_version": "2.0.0", "pid": "0x0227", - "device_version": "2.0.0" + "vid": "0x6964" } "layouts": { - "LAYOUT": { + "LAYOUT_numpad_6x5": { "layout": [ - { "matrix": [0, 0], "label": "K00 (D4,D5)", "x": 0, "y": 0 }, - { "matrix": [0, 1], "label": "K01 (D4,D3)", "x": 1, "y": 0 }, - { "matrix": [0, 2], "label": "K02 (D4,D2)", "x": 2, "y": 0 }, - { "matrix": [0, 3], "label": "K03 (D4,D1)", "x": 3, "y": 0 }, - { "matrix": [0, 4], "label": "K04 (D4,D0)", "x": 4, "y": 0 }, + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, - { "matrix": [1, 0], "label": "K10 (D6,D5)", "x": 0, "y": 1 }, - { "matrix": [1, 1], "label": "K11 (D6,D3)", "x": 1, "y": 1 }, - { "matrix": [1, 2], "label": "K12 (D6,D2)", "x": 2, "y": 1 }, - { "matrix": [1, 3], "label": "K13 (D6,D1)", "x": 3, "y": 1 }, - { "matrix": [1, 4], "label": "K14 (D6,D0)", "x": 4, "y": 1 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1 }, - { "matrix": [2, 0], "label": "K20 (D7,D5)", "x": 0, "y": 2 }, - { "matrix": [2, 1], "label": "K21 (D7,D3)", "x": 1, "y": 2 }, - { "matrix": [2, 2], "label": "K22 (D7,D2)", "x": 2, "y": 2 }, - { "matrix": [2, 3], "label": "K23 (D7,D1)", "x": 3, "y": 2 }, - { "matrix": [2, 4], "label": "K24 (D7,D0)", "x": 4, "y": 2, "h": 2 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2, "h": 2 }, - { "matrix": [3, 0], "label": "K30 (B4,D5)", "x": 0, "y": 3 }, - { "matrix": [3, 1], "label": "K31 (B4,D3)", "x": 1, "y": 3 }, - { "matrix": [3, 2], "label": "K32 (B4,D2)", "x": 2, "y": 3 }, - { "matrix": [3, 3], "label": "K33 (B4,D1)", "x": 3, "y": 3 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, - { "matrix": [4, 0], "label": "K40 (B5,D5)", "x": 0, "y": 4 }, - { "matrix": [4, 1], "label": "K41 (B5,D3)", "x": 1, "y": 4 }, - { "matrix": [4, 2], "label": "K42 (B5,D2)", "x": 2, "y": 4 }, - { "matrix": [4, 3], "label": "K43 (B5,D1)", "x": 3, "y": 4 }, - { "matrix": [5, 3], "label": "K53 (C6,D1)", "x": 4, "y": 4, "h": 2 }, + { "matrix": [4, 0], "x": 0, "y": 4 }, + { "matrix": [4, 1], "x": 1, "y": 4 }, + { "matrix": [4, 2], "x": 2, "y": 4 }, + { "matrix": [4, 3], "x": 3, "y": 4 }, + { "matrix": [5, 3], "x": 4, "y": 4, "h": 2 }, - { "matrix": [5, 0], "label": "K50 (C6,D5)", "x": 0, "y": 5 }, - { "matrix": [5, 1], "label": "K51 (C6,D3)", "x": 1, "y": 5, "w": 2 }, - { "matrix": [5, 2], "label": "K52 (C6,D2)", "x": 3, "y": 5 } + { "matrix": [5, 0], "x": 0, "y": 5 }, + { "matrix": [5, 1], "x": 1, "y": 5, "w": 2 }, + { "matrix": [5, 2], "x": 3, "y": 5 } ] } } diff --git a/keyboards/idobao/montex/v2/keymaps/default/keymap.c b/keyboards/idobao/montex/v2/keymaps/default/keymap.c old mode 100644 new mode 100755 index e7841f608d1f..b51de4317bc3 --- a/keyboards/idobao/montex/v2/keymaps/default/keymap.c +++ b/keyboards/idobao/montex/v2/keymaps/default/keymap.c @@ -1,18 +1,5 @@ -/* Copyright 2022 IBNobody & vinorodrigues - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2022 IBNobody (@IBNobody) +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H @@ -32,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │MO1│ 0 │ . │ │ * └───┴───────┴───┴───┘ */ - [0] = LAYOUT( + [0] = LAYOUT_numpad_6x5( KC_GESC, KC_TAB, KC_F1, KC_CALC, KC_BSPC, KC_LCTRL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_LGUI, KC_P7, KC_P8, KC_P9, KC_PPLS, @@ -44,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * ┌───┌───┐───┬───┬───┐ * │Rst│TOG│MOD│PSc│SLk│ - * ├───┼───┘───┼───┼───┤ + * ├───┼───┼───┼───┼───┤ * │Hu+│ │Sp-│Sp+│Br-│ * ├───┼───┼───┼───┼───┤ * │Hu-│Hom│ ↑ │PgU│ │ @@ -56,8 +43,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │mo1│Insert │Del│ │ * └───┴───────┴───┘───┘ */ - [1] = LAYOUT( - RESET, RGB_TOG, RGB_MOD, KC_PSCR, KC_SLCK, + [1] = LAYOUT_numpad_6x5( + QK_BOOT, RGB_TOG, RGB_MOD, KC_PSCR, KC_SLCK, RGB_HUI, XXXXXXX, RGB_SPD, RGB_SPI, RGB_VAD, RGB_HUD, KC_HOME, KC_UP, KC_PGUP, RGB_VAI, RGB_SAI, KC_LEFT, XXXXXXX, KC_RGHT, diff --git a/keyboards/idobao/montex/v2/keymaps/default/readme.md b/keyboards/idobao/montex/v2/keymaps/default/readme.md deleted file mode 100644 index 8b73c8b0f199..000000000000 --- a/keyboards/idobao/montex/v2/keymaps/default/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# The default keymap for v2 - -![](https://idobao.github.io/kle/idobao-id27-v2.png) diff --git a/keyboards/idobao/montex/v2/keymaps/via/config.h b/keyboards/idobao/montex/v2/keymaps/via/config.h old mode 100644 new mode 100755 index d3eebb3a30fd..40b377f958f2 --- a/keyboards/idobao/montex/v2/keymaps/via/config.h +++ b/keyboards/idobao/montex/v2/keymaps/via/config.h @@ -1,23 +1,6 @@ -/* Copyright 2022 IBNobody & vinorodrigues - * - * 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 . - */ +// Copyright 2022 IBNobody (@IBNobody) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #define DYNAMIC_KEYMAP_LAYER_COUNT 6 - -#if defined(RGB_MATRIX_ENABLE) - #define VIA_QMK_RGBLIGHT_ENABLE -#endif diff --git a/keyboards/idobao/montex/v2/keymaps/via/keymap.c b/keyboards/idobao/montex/v2/keymaps/via/keymap.c old mode 100644 new mode 100755 index ab73b1ca0ace..7f336b7d5067 --- a/keyboards/idobao/montex/v2/keymaps/via/keymap.c +++ b/keyboards/idobao/montex/v2/keymaps/via/keymap.c @@ -1,18 +1,5 @@ -/* Copyright 2022 IBNobody & vinorodrigues - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2022 IBNobody (@IBNobody) +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H @@ -27,7 +14,7 @@ enum montex_layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* - * ┌───┌───┬───┬───┬───┐ + * ┌───┬───┬───┬───┬───┐ * │Esc│Tab│ F1│Cal│Bsp│ * ├───┼───┼───┼───┼───┤ * │Ctr│Num│ / │ * │ - │ @@ -41,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │MO1│ 0 │ . │ │ * └───┴───────┴───┴───┘ */ - [_BASE] = LAYOUT( + [_BASE] = LAYOUT_numpad_6x5( KC_GESC, KC_TAB, KC_F1, KC_CALC, KC_BSPC, KC_LCTRL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_LGUI, KC_P7, KC_P8, KC_P9, KC_PPLS, @@ -51,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* - * ┌───┌───┐───┬───┬───┐ + * ┌───┬───┬───┬───┬───┐ * │Rst│TOG│MOD│PSs│SLk│ - * ├───┼───┘───┼───┼───┤ + * ├───┼───┼───┼───┼───┤ * │Hu+│ │Sp-│Sp+│Br-│ * ├───┼───┼───┼───┼───┤ * │Hu-│Hom│ ↑ │PgU│ │ @@ -63,10 +50,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │St-│End│ ↓ │PgD│ │ * ├───┼───┴───┼───┤Ent│ * │mo1│Insert │Del│ │ - * └───┴───────┴───┘───┘ + * └───┴───────┴───┴───┘ */ - [_FN] = LAYOUT( - RESET, RGB_TOG, RGB_MOD, KC_PSCR, KC_SLCK, + [_FN] = LAYOUT_numpad_6x5( + QK_BOOT, RGB_TOG, RGB_MOD, KC_PSCR, KC_SLCK, RGB_HUI, XXXXXXX, RGB_SPD, RGB_SPI, RGB_VAD, RGB_HUD, KC_HOME, KC_UP, KC_PGUP, RGB_VAI, RGB_SAI, KC_LEFT, XXXXXXX, KC_RGHT, @@ -75,9 +62,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* 4 extra layers incase you want to map the top row to layer buttons - * ┌───┌───┐───┬───┬───┐ + * ┌───┬───┬───┬───┬───┐ * │ │ │ │ │ │ - * ├───┼───┘───┼───┼───┤ + * ├───┼───┼───┼───┼───┤ * │ │ │ │ │ │ * ├───┼───┼───┼───┼───┤ * │ │ │ │ │ │ @@ -87,41 +74,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ │ │ * ├───┼───┴───┼───┤ │ * │ │ │ │ │ - * └───┴───────┴───┘───┘ + * └───┴───────┴───┴───┘ */ - [_EMPTY2] = LAYOUT( + [_EMPTY2] = LAYOUT_numpad_6x5( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______ + _______, _______, _______ ), - [_EMPTY3] = LAYOUT( + [_EMPTY3] = LAYOUT_numpad_6x5( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______ + _______, _______, _______ ), - [_EMPTY4] = LAYOUT( + [_EMPTY4] = LAYOUT_numpad_6x5( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______ + _______, _______, _______ ), - [_EMPTY5] = LAYOUT( + [_EMPTY5] = LAYOUT_numpad_6x5( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______ + _______, _______, _______ ) }; diff --git a/keyboards/idobao/montex/v2/keymaps/via/readme.md b/keyboards/idobao/montex/v2/keymaps/via/readme.md deleted file mode 100644 index bd5a40c1e386..000000000000 --- a/keyboards/idobao/montex/v2/keymaps/via/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# The VIA keymap for v2 - -![](https://idobao.github.io/kle/idobao-id27-v2.png) diff --git a/keyboards/idobao/montex/v2/keymaps/via/rules.mk b/keyboards/idobao/montex/v2/keymaps/via/rules.mk old mode 100644 new mode 100755 diff --git a/keyboards/idobao/montex/v2/post_rules.mk b/keyboards/idobao/montex/v2/post_rules.mk new file mode 100644 index 000000000000..f2d43fa6ac44 --- /dev/null +++ b/keyboards/idobao/montex/v2/post_rules.mk @@ -0,0 +1,8 @@ +# some (if not most) Montex have a solid back plate, +# this enables switching off the bottom facing LEDs +# Usage: `make idobao/montex/v2:default UNDERGLOW=off` + +UNDERGLOW ?= yes +ifneq ($(strip $(UNDERGLOW)), yes) + OPT_DEFS += -DID27_DISABLE_UNDERGLOW +endif diff --git a/keyboards/idobao/montex/v2/readme.md b/keyboards/idobao/montex/v2/readme.md old mode 100644 new mode 100755 index 649b3f47f3a0..793507b8f1f3 --- a/keyboards/idobao/montex/v2/readme.md +++ b/keyboards/idobao/montex/v2/readme.md @@ -1,14 +1,25 @@ # IDOBAO Montex V2 -![MMONTEX V2](https://idobao.github.io/assets/img/idobao-id27.png) +![MONTEX V2](https://i.imgur.com/uHEispxh.png) A hotswap RGB numpad from IDOBAO. + +## Numeric Keypad + * Keyboard Maintainer: - [IBNobody](https://github.com/IBNobody) - [vinorodrigues](https://github.com/vinorodrigues) -* Hardware Supported: IDOBAO Montex V2 -* Hardware Availability: https://idobao.net/products/idobao-montex-pad-hot-swappable-keyboard-kit-%E7%9A%84%E5%89%AF%E6%9C%AC +* Hardware Supported: **IDOBAO Montex V2** +* Hardware Availability: [IDOBAO.net](https://idobao.net/search?type=product&q=montex*) + + +## Layout + +![](https://idobao.github.io/kle/idobao-id27-v2.png) + + +## Compiling and Flashing Make example for this keyboard (after setting up your build environment): @@ -18,7 +29,8 @@ Flashing example for this keyboard: make idobao/montex/v2: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). +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 diff --git a/keyboards/idobao/montex/v2/rules.mk b/keyboards/idobao/montex/v2/rules.mk old mode 100644 new mode 100755 index f797a90b1fdb..205f56d5fd06 --- a/keyboards/idobao/montex/v2/rules.mk +++ b/keyboards/idobao/montex/v2/rules.mk @@ -1,20 +1,5 @@ -# MCU name -MCU = atmega32u4 +# This file intentionally mostly left blank +# ** settings are data driven & stored in `info.json` ** -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/idobao/montex/v2/v2.c b/keyboards/idobao/montex/v2/v2.c old mode 100644 new mode 100755 index 1bd8de74e069..0f06aa708e86 --- a/keyboards/idobao/montex/v2/v2.c +++ b/keyboards/idobao/montex/v2/v2.c @@ -1,24 +1,42 @@ -/* Copyright 2022 IBNobody & vinorodrigues - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2022 IBNobody (@IBNobody) +// SPDX-License-Identifier: GPL-2.0-or-later #include "v2.h" +#define __ NO_LED + #ifdef RGB_MATRIX_ENABLE -#define __ NO_LED +/* Under-, Per-key + * ┌───┬───┬───┬───┬───┐ + * │ 4 │ 3 │ 2 │ 1 │ 0 │ + * ├───┼───┼───┼───┼───┤ + * │ 5 │ 6 │ 7 │ 8 │ 9 │ + * ├───┼───┼───┼───┼───┤ + * │14 │13 │12 │11 │ │ + * ├───┼───┼───┼───┤10 │ + * │15 │16 │17 │18 │ │ + * ├───┼───┼───┼───┼───┤ + * │23 │22 │21 │20 │ │ + * ├───┼───┴───┼───┤19 │ + * │24 │ 25 │26 │ │ + * └───┴───────┴───┴───┘ + * + * Underglow (from top / [Esc] = top left) + * ┌─────────┬─────────┐ + * │ │ │ + * │ │ │ + * │ 29 │ 30 │ + * │ │ │ + * │ │ │ + * ├─────────┼─────────┤ + * │ │ │ + * │ │ │ + * │ 28 │ 27 │ + * │ │ │ + * │ │ │ + * └─────────┴─────────┘ + */ led_config_t g_led_config = { { // Key Matrix to LED Index @@ -40,7 +58,7 @@ led_config_t g_led_config = { { { 0,41 }, { 56,41 }, {112,41 }, {168,41 }, // 456 (reversed) {224,58 }, {168,52 }, {112,52 }, { 56,52 }, // 123 { 0,52 }, { 0,64 }, { 84,64 }, {168,64 } // 0. & enter (reversed) - // underglow + // underglow LEDs (positions pushed to nearest edge to match edge key colors) #ifndef ID27_DISABLE_UNDERGLOW , {224,64 }, { 0,64 }, { 0,0 }, { 224,0 } diff --git a/keyboards/idobao/montex/v2/v2.h b/keyboards/idobao/montex/v2/v2.h old mode 100644 new mode 100755 index f0b0c9465225..3f486480db65 --- a/keyboards/idobao/montex/v2/v2.h +++ b/keyboards/idobao/montex/v2/v2.h @@ -1,18 +1,5 @@ -/* Copyright 2022 IBNobody & vinorodrigues - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2022 IBNobody (@IBNobody) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once