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

Added keyboard KPRepublic BM60V2EC #16866

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from 10 commits
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
21 changes: 21 additions & 0 deletions keyboards/kprepublic/bm60hsrgb_ec/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# BM60HSRGB_EC

A 60% hotswap inswitch RGB keyboard with rotary encoder from KP Republic.

* Keyboard Maintainer: [luisgit9](https://github.com/luisgit9)
* Hardware Supported: BM60HSRGB_EC/rev2
* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60ec-bm60-ec-rgb-60-gh60-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-rgb-switch-type-c-rotary-knob)

Make example for this keyboard (after setting up your build environment):
drashna marked this conversation as resolved.
Show resolved Hide resolved

for rev2: make kprepublic/bm60hsrgb_ec/rev2: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).

## Bootloader

Enter the bootloader in 3 ways in rev2 board:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the Escape key in the default layout) 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` (MO(1) + Backspace in the default layout)
139 changes: 139 additions & 0 deletions keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/* Copyright 2021 bdtc123
*
* 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 0x4B50
#define PRODUCT_ID 0x1124
#define DEVICE_VER 0x0002
#define MANUFACTURER KP Republic
#define PRODUCT BM60V2EC
Comment on lines +21 to +25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define VENDOR_ID 0x4B50
#define PRODUCT_ID 0x1124
#define DEVICE_VER 0x0002
#define MANUFACTURER KP Republic
#define PRODUCT BM60V2EC


/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 14

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/

#define MATRIX_ROW_PINS { E6, D2, D3, D5, F6 }
#define MATRIX_COL_PINS { B2, B3, B7, B0, B1, F7, D4, D6, D7, B4, B5, B6, C6, C7 }
#define UNUSED_PINS

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3

//rgb light setting
#define RGBLIGHT_LIMIT_VAL 150
#define RGBLED_NUM 6
#define RGB_DI_PIN F0
#define RGBLIGHT_ANIMATIONS
LuisGit9 marked this conversation as resolved.
Show resolved Hide resolved
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
LuisGit9 marked this conversation as resolved.
Show resolved Hide resolved
#define DRIVER_ADDR_1 0b1010000

#define RGB_MATRIX_KEYPRESSES
// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
#define ENABLE_RGB_MATRIX_BAND_VAL
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
#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_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

#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 63
//#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL

#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE)
#define RGB_MATRIX_DISABLE_KEYCODES
#endif

#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120

#define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL

// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them;
// don't use those LEDs in RGB Matrix in that case.
#ifdef RGBLIGHT_ENABLE
# define WS2812_LED_TOTAL 0
#else
# define WS2812_LED_TOTAL 6
#endif

#define DRIVER_LED_TOTAL (ISSI_LED_TOTAL + WS2812_LED_TOTAL)

#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#endif

#define ENCODERS_PAD_A {F1}
#define ENCODERS_PAD_B {F4}
#define ENCODERS_RESOLUTION 2
79 changes: 79 additions & 0 deletions keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"keyboard_name": "BM60V2EC",
"url": "https://kprepublic.com/products/bm60ec-bm60-ec-rgb-60-gh60-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-rgb-switch-type-c-rotary-knob",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"url": "https://kprepublic.com/products/bm60ec-bm60-ec-rgb-60-gh60-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-rgb-switch-type-c-rotary-knob",
"manufacturer": "kprepublic",
"url": "https://kprepublic.com/products/bm60ec-bm60-ec-rgb-60-gh60-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-rgb-switch-type-c-rotary-knob",

"maintainer": "luisgit9",
"layouts": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"layouts": {
"usb": {
"vid": "0x4B50",
"pid": "0x1124",
"device_version": "0.0.2"
},
"layouts": {

"LAYOUT_60_ansi_arrow": {
"layout": [
{"x":0, "y":0, "label":"KC_ESC", "matrix":[0,0]},
{"x":1, "y":0, "label":"KC_1", "matrix":[0,1]},
{"x":2, "y":0, "label":"KC_2", "matrix":[0,2]},
{"x":3, "y":0, "label":"KC_3", "matrix":[0,3]},
{"x":4, "y":0, "label":"KC_4", "matrix":[0,4]},
{"x":5, "y":0, "label":"KC_5", "matrix":[0,5]},
{"x":6, "y":0, "label":"KC_6", "matrix":[0,6]},
{"x":7, "y":0, "label":"KC_7", "matrix":[0,7]},
{"x":8, "y":0, "label":"KC_8", "matrix":[0,8]},
{"x":9, "y":0, "label":"KC_9", "matrix":[0,9]},
{"x":10, "y":0, "label":"KC_0", "matrix":[0,10]},
{"x":11, "y":0, "label":"KC_MINS", "matrix":[0,11]},
{"x":12, "y":0, "label":"KC_EQL", "matrix":[0,12]},
{"x":13, "y":0, "w":2, "label":"KC_BSPC", "matrix":[0,13]},
{"x":14, "y":0, "label":"KC_MUTE", "matrix":[2,12]},

{"x":0, "y":1, "w":1.5, "label":"KC_TAB", "matrix":[1,0]},
{"x":1.5, "y":1, "label":"KC_Q", "matrix":[1,1]},
{"x":2.5, "y":1, "label":"KC_W", "matrix":[1,2]},
{"x":3.5, "y":1, "label":"KC_E", "matrix":[1,3]},
{"x":4.5, "y":1, "label":"KC_R", "matrix":[1,4]},
{"x":5.5, "y":1, "label":"KC_T", "matrix":[1,5]},
{"x":6.5, "y":1, "label":"KC_Y", "matrix":[1,6]},
{"x":7.5, "y":1, "label":"KC_U", "matrix":[1,7]},
{"x":8.5, "y":1, "label":"KC_I", "matrix":[1,8]},
{"x":9.5, "y":1, "label":"KC_O", "matrix":[1,9]},
{"x":10.5, "y":1, "label":"KC_P", "matrix":[1,10]},
{"x":11.5, "y":1, "label":"KC_LBRC", "matrix":[1,11]},
{"x":12.5, "y":1, "label":"KC_RBRC", "matrix":[1,12]},
{"x":13.5, "y":1, "w":1.5, "label":"KC_BSLS", "matrix":[1,13]},

{"x":0, "y":2, "w":1.75, "label":"KC_CAPS", "matrix":[2,0]},
{"x":1.75, "y":2, "label":"KC_A", "matrix":[2,1]},
{"x":2.75, "y":2, "label":"KC_S", "matrix":[2,2]},
{"x":3.75, "y":2, "label":"KC_D", "matrix":[2,3]},
{"x":4.75, "y":2, "label":"KC_F", "matrix":[2,4]},
{"x":5.75, "y":2, "label":"KC_G", "matrix":[2,5]},
{"x":6.75, "y":2, "label":"KC_H", "matrix":[2,6]},
{"x":7.75, "y":2, "label":"KC_J", "matrix":[2,7]},
{"x":8.75, "y":2, "label":"KC_K", "matrix":[2,8]},
{"x":9.75, "y":2, "label":"KC_L", "matrix":[2,9]},
{"x":10.75, "y":2, "label":"KC_SCLN", "matrix":[2,10]},
{"x":11.75, "y":2, "label":"KC_QUOT", "matrix":[2,11]},
{"x":12.75, "y":2, "w":2.25, "label":"KC_ENT", "matrix":[2,12]},

{"x":0, "y":3, "w":2.25, "label":"KC_LSFT", "matrix":[3,0]},
{"x":2.25, "y":3, "label":"KC_Z", "matrix":[3,1]},
{"x":3.25, "y":3, "label":"KC_X", "matrix":[3,2]},
{"x":4.25, "y":3, "label":"KC_C", "matrix":[3,3]},
{"x":5.25, "y":3, "label":"KC_V", "matrix":[3,4]},
{"x":6.25, "y":3, "label":"KC_B", "matrix":[3,5]},
{"x":7.25, "y":3, "label":"KC_N", "matrix":[3,6]},
{"x":8.25, "y":3, "label":"KC_M", "matrix":[3,7]},
{"x":9.25, "y":3, "label":"KC_COMM", "matrix":[3,8]},
{"x":10.25, "y":3, "label":"KC_DOT", "matrix":[3,9]},
{"x":11.25, "y":3, "w":1.75, "label":"KC_RSFT", "matrix":[3,10]},
{"x":13, "y":3, "label":"KC_UP", "matrix":[3,11]},
{"x":14, "y":3, "label":"KC_SLSH", "matrix":[3,12]},

{"x":0, "y":4, "w":1.25, "label":"KC_LCTL", "matrix":[4,0]},
{"x":1.25, "y":4, "w":1.25, "label":"KC_LGUI", "matrix":[4,1]},
{"x":2.5, "y":4, "w":1.25, "label":"KC_LALT", "matrix":[4,2]},
{"x":3.75, "y":4, "w":6.25, "label":"KC_SPC", "matrix":[4,3]},
{"x":10, "y":4, "label":"KC_RALT", "matrix":[4,4]},
{"x":11, "y":4, "label":"KC_MO(1)", "matrix":[4,5]},
{"x":12, "y":4, "label":"KC_LEFT", "matrix":[4,6]},
{"x":13, "y":4, "label":"KC_DOWN", "matrix":[4,7]},
{"x":14, "y":4, "label":"KC_RIGHT", "matrix":[4,8]}
]
}
}
}
36 changes: 36 additions & 0 deletions keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* Copyright 2021 bdtc123
* Copyright 2022 peepeetee
*
* 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_60_ansi_arrow(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_MUTE, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_60_ansi_arrow(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QK_BOOT,

_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, KC_DEL,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, KC_PGUP, KC_INS,
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
)

};

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
![KPRepublic BM60EC Rev 2 Layout Image](https://i.imgur.com/pCNnmh8.png)

# Default BM60EC Rev 2 Layout

The default key layout for this keyboard. It's a straighforward configuration, with the only unusual elements being the tilde-Esc, and the use of the rotary encoder. The encoder is currently configured to work as a mouse wheel up/down, and left/right when CTRL is depressed. The secondary layer activated by MO(1) contains largely LED-related fuctions, and the PGUP, PGDOWN, HOME, and END functions on the arrow keys.
22 changes: 22 additions & 0 deletions keyboards/kprepublic/bm60hsrgb_ec/rev2/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# BM60HSRGB_EC

A 60% hotswap inswitch RGB keyboard with rotary encoder from KP Republic.

* Keyboard Maintainer: [luisgit9](https://github.com/luisgit9)
* Hardware Supported: BM60HSRGB_EC/rev2
* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60ec-bm60-ec-rgb-60-gh60-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-rgb-switch-type-c-rotary-knob)

Make example for this keyboard (after setting up your build environment):

for rev2: make kprepublic/bm60hsrgb_ec/rev2: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).


## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the Escape key in the default layout) 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` (MO(1) + Backspace in the default layout)
Loading