Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Idobao Montex RGB (V2) #16897

Merged
merged 20 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merged code fron work done with @vinorodrigues
  • Loading branch information
IBNobody committed Apr 29, 2022
commit 53f43f36b19b93c40c127290cd9cb51c61d38caa
179 changes: 92 additions & 87 deletions keyboards/idobao/montex/v2/config.h
Original file line number Diff line number Diff line change
@@ -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
70 changes: 39 additions & 31 deletions keyboards/idobao/montex/v2/info.json
Original file line number Diff line number Diff line change
@@ -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 }
]
}
}
Expand Down
78 changes: 39 additions & 39 deletions keyboards/idobao/montex/v2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -1,67 +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/>.
*/
/* 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 │ │
* ├───┼───┼───┼───┤ + │
* │Alt│ 4 │ 5 │ 6 │ │
* ├───┼───┼───┼───┼───┤
* │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
)
};
3 changes: 3 additions & 0 deletions keyboards/idobao/montex/v2/keymaps/default/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The default keymap for v2

![](https://idobao.github.io/kle/idobao-id27-v2.png)
Loading