diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-25 16:02:54 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-25 16:02:54 +0200 |
commit | 6afdd9d74da250e47ac64d6690bd19d037045e99 (patch) | |
tree | 661f6cfb244c02bcd1fbfe8fb9b2bd9242a91394 /keyboards/kprepublic | |
parent | 93a55e61b59d20f7cd842cce02e5b18a63a23612 (diff) | |
parent | 1bdf4cdc22ae57d111efb2f7d71e405e5c7b3f11 (diff) | |
download | qmk_firmware-6afdd9d74da250e47ac64d6690bd19d037045e99.tar.gz qmk_firmware-6afdd9d74da250e47ac64d6690bd19d037045e99.zip |
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/kprepublic')
126 files changed, 3075 insertions, 393 deletions
diff --git a/keyboards/kprepublic/bm16a/config.h b/keyboards/kprepublic/bm16a/config.h index 120232bb91..7e6289b793 100644 --- a/keyboards/kprepublic/bm16a/config.h +++ b/keyboards/kprepublic/bm16a/config.h @@ -18,13 +18,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x016A -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPrepublic -#define PRODUCT bm16a - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 4 @@ -41,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D3, D5, D1, D2} #define MATRIX_COL_PINS { D6, D4, D7, B4} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm16a/info.json b/keyboards/kprepublic/bm16a/info.json index 520e508249..6c616e11d1 100644 --- a/keyboards/kprepublic/bm16a/info.json +++ b/keyboards/kprepublic/bm16a/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "bm16a", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x016A", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_ortho_4x4": { "layout": [ diff --git a/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c b/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c index 8a01ff016d..ea61e608c3 100644 --- a/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c +++ b/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P0, KC_PDOT, KC_SPC, MO(_FN1) ), [_FN1] = LAYOUT_ortho_4x4( - RESET, KC_PAST, KC_PSLS, _______, + QK_BOOT, KC_PAST, KC_PSLS, _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______ diff --git a/keyboards/kprepublic/bm16s/config.h b/keyboards/kprepublic/bm16s/config.h index 4ee57f3510..2de3ffe3d4 100755 --- a/keyboards/kprepublic/bm16s/config.h +++ b/keyboards/kprepublic/bm16s/config.h @@ -1,13 +1,6 @@ #pragma once #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 //KP -#define PRODUCT_ID 0x016B -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPrepublic -#define PRODUCT bm16s - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 4 @@ -15,7 +8,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D0, D3, D2 } #define MATRIX_COL_PINS { F7, F6, D4, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm16s/info.json b/keyboards/kprepublic/bm16s/info.json index 938666a504..03d0659be0 100644 --- a/keyboards/kprepublic/bm16s/info.json +++ b/keyboards/kprepublic/bm16s/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "bm16s", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x016B", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_ortho_4x4": { "layout": [ diff --git a/keyboards/kprepublic/bm16s/keymaps/media/keymap.c b/keyboards/kprepublic/bm16s/keymaps/media/keymap.c index a2a9b72db9..8c592a4151 100755 --- a/keyboards/kprepublic/bm16s/keymaps/media/keymap.c +++ b/keyboards/kprepublic/bm16s/keymaps/media/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_MPLY, KC_MNXT, MO(1) ), [1] = LAYOUT_ortho_4x4( - RESET, _______, _______, _______, + QK_BOOT, _______, _______, _______, RGB_SPD, RGB_BRU, RGB_SPI, _______, RGB_RMOD, RGB_BRD, RGB_MOD, _______, RGB_TOG, _______, _______, _______ diff --git a/keyboards/kprepublic/bm40hsrgb/config.h b/keyboards/kprepublic/bm40hsrgb/config.h index 8790de8a7b..8e4710abb3 100755 --- a/keyboards/kprepublic/bm40hsrgb/config.h +++ b/keyboards/kprepublic/bm40hsrgb/config.h @@ -17,13 +17,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x3430 // "40" -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM40 Hotswap RGB - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 @@ -31,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B3, B2, E6, B5 } #define MATRIX_COL_PINS { B6, C6, B4, D7, D4, D6, C7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm40hsrgb/info.json b/keyboards/kprepublic/bm40hsrgb/info.json index ddd99d3e35..2d1dd70df0 100644 --- a/keyboards/kprepublic/bm40hsrgb/info.json +++ b/keyboards/kprepublic/bm40hsrgb/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "BM40HSRGB", + "keyboard_name": "BM40 Hotswap RGB", + "manufacturer": "KPRepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x3430", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_planck_mit": { "layout": [ diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h new file mode 100644 index 0000000000..2534ffd554 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h @@ -0,0 +1,56 @@ +// Copyright 2021 Taeyoon Kim (@partrita) +// SPDX-License-Identifier: GPL-2.0-or-later +// /* +// Set any config.h overrides for your specific keymap here. +// See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +// */ +#pragma once + +#define TAPPING_TERM 200 // time of holding key, milliseconds + +// Prevent normal rollover on alphas from accidentally triggering mods. +#define IGNORE_MOD_TAP_INTERRUPT + +// Enable rapid switch from tap to hold, disables double tap hold auto-repeat. +#define TAPPING_FORCE_HOLD + +// Mouse key speed and acceleration. +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 16 +#undef MOUSEKEY_WHEEL_DELAY +#define MOUSEKEY_WHEEL_DELAY 0 +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 6 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 64 + +// The firmware is too large! +#define COMBO_COUNT 1 // number of combo +#define COMBO_TERM 80 // timeout period for combos to 40ms. + +//disable broken animations +#ifdef RGB_MATRIX_ENABLE +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef RGB_MATRIX_STARTUP_MODE +// # define RGBLIGHT_HUE_STEP 20 +#endif diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/keymap.c new file mode 100644 index 0000000000..4c06536945 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/keymap.c @@ -0,0 +1,91 @@ +// Copyright 2021 Taeyoon Kim (@partrita) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "keymap_korean.h" + +enum layers { + _Base, + _Navi, + _Numb, + _Func, +}; + +// Left-hand home row mods - Base Layer +#define HOME_A LGUI_T(KC_A) +#define HOME_S LALT_T(KC_S) +#define HOME_D LCTL_T(KC_D) +#define HOME_F LSFT_T(KC_F) +#define HOME_J RSFT_T(KC_J) +#define HOME_K LCTL_T(KC_K) +#define HOME_L LALT_T(KC_L) +#define HOME_QU LGUI_T(KC_QUOT) + +// layer keys +#define Lay_SPC LT(_Func,KC_SPC) +#define NAVI MO(_Navi) +#define NUMB MO(_Numb) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_Base] = LAYOUT_planck_mit( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, + HOME_A, HOME_S, HOME_D, HOME_F, KC_G, KC_NO, KC_NO, KC_H, HOME_J, HOME_K, HOME_L, HOME_QU, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_NO, KC_NO, KC_NO, NAVI, Lay_SPC, KC_NO, KC_BSPC, NUMB, KC_NO, KC_NO, KC_NO + ), + [_Navi] = LAYOUT_planck_mit( + KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_ESC, KC_NO, KC_NO, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + KC_LSFT, HOME_S, HOME_D, HOME_F, KC_TAB, KC_NO, KC_NO, KC_ENT, KC_RSFT, HOME_K, HOME_L, HOME_QU, + KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, KC_NO, KC_NO, KC_BTN2, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_NO, KC_NO, KC_NO, KC_NO, Lay_SPC, KC_NO, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO + ), + [_Numb] = LAYOUT_planck_mit( + KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, + KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, KC_NO, KC_NO, KC_ENT, KC_RSFT, HOME_K, HOME_L, HOME_QU, + KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HAEN, KC_NO, + KC_NO, KC_NO, KC_NO, KC_0, KC_MINS, KC_NO, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO + ), + [_Func] = LAYOUT_planck_mit( + KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, + KC_F11, KC_F4, KC_F5, KC_F6, KC_SCRL, KC_NO, KC_NO, KC_CAPS, KC_RSFT, HOME_K, HOME_L, HOME_QU, + KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, KC_NO, KC_NO, KC_INS, KC_NO, KC_NO, KC_HAEN, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, Lay_SPC, KC_NO, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + + +// color by layer +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = get_highest_layer(state); + switch (layer) { + case _Navi: + rgblight_mode_noeeprom(RGB_MATRIX_RAINBOW_BEACON); + break; + case _Numb: + rgblight_mode_noeeprom(RGB_MATRIX_HUE_PENDULUM); + break; + case _Func: + rgblight_mode_noeeprom(RGB_MATRIX_GRADIENT_LEFT_RIGHT); + break; + default: + rgblight_mode_noeeprom(RGB_MATRIX_SOLID_REACTIVE_WIDE); + } + return state; +} + +// COMBO key for HOME ROW modifier +// modify `config.h` file +// by adding #define COMBO_COUNT 1 (replacing 1 with the number that you’re using). +// modify `rules.mk` file +// by adding # COMBO_ENABLE = yes + +enum combos { + SFT_HAN, +}; + +const uint16_t PROGMEM sft_han_combo[] = {LSFT_T(KC_F), LT(_Func,KC_SPC), COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [SFT_HAN] = COMBO(sft_han_combo, KC_HAEN), +};
\ No newline at end of file diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/readme.md new file mode 100644 index 0000000000..31ac2602b6 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/readme.md @@ -0,0 +1,63 @@ +# The 35 keymap for bm40hsrgb + +This layout is made almost entirely from [miryoku](https://github.com/manna-harbour/miryoku). However, I used fewer layers and reduced 36 keys to 34. + +> As little as possible, as simple as possible, as easy as possible to memorize + +Replaced the Ctrl, GUI, Alt, and Shift keys with home mod row. A combo function was added by removing some RGB animations of the bm40's keyboard to free up memory. If animation is not removed, it is because there is not enough memory to compile. Added code that uses RGB matrix animation so that you can see at a glance which layer is being used, and you can move faster by increasing the speed of the mouse key. + +And because I'm Korean, a combo for Korean and English keyboard conversion has been added, but if you don't need it, you can delete it. + + +- Flash: + + `qmk flash -kb kprepublic/bm40hsrgb -km 34keys` + +# Layout + +Press and hold to activate the keys in parentheses. + + +https://imgur.com/a/UkKfCYm + + +## _BASE(QWERTY) + +![](https://i.imgur.com/PuHFVXT.png) + + +| Q | W | E | R | T | | | Y | U | I | O | P | +|---|---|---|---|---|---|---|---|---|---|---|---| +| A(GUI) | S(Alt) | D(Ctrl) | F(Shift) | G | | | H | J(Shift) | K(Ctrl) | L(Alt) | '(GUI) | +| Z | X| C| V| B| | | N | M | , | . | /| +| | | | NaviLayer| Space(_Func) | | | Backspace | NumberLayer | | | | + +## _Navi + +![](https://i.imgur.com/BwDHx64.png) + +| Mousewheel left | Mousewheel down | Mousewheel up | Mousewheel right | ESC | | | DEL | HOME | PageDown | PageUP | END | +|---|---|---|---|---|---|---|---|---|---|---|---| +| A(GUI) | S(Alt) | D(Ctrl) | F(Shift) | TAB | | | ENTER | J(Shift) | K(Ctrl) | L(Alt) | '(GUI) | +| Mouse left | Mouse down | Mouse up| Mouse right | left click | | | left click | Left | Down | Up | Right | +| | | | | Space | | | Backspace | NumberLayer | | | | + +## _Numb + +![](https://i.imgur.com/lPPyUsk.png) + +| [ | 7 | 8 | 9 | ] | | | DEL | | | | | +|---|---|---|---|---|---|---|---|---|---|---|---| +| ; | 4 | 5 | 6 | = | | | ENTER | J(Shift) | K(Ctrl) | L(Alt) | '(GUI) | +| ` | 1 | 2 | 3 | \ | | | | | | | | +| | | | 0| - | | | Backspace | | | | | + +## _Func + +![](https://i.imgur.com/rz0jaoe.png) + +| F12 | F7 | F8 | F9 | PrintScreen | | | RESET | | | | | +|---|---|---|---|---|---|---|---|---|---|---|---| +| F11 | F4 | F5 | F6 | ScrollLock | | | CapsLock | J(Shift) | K(Ctrl) | L(Alt) | '(GUI) | +| F10 | F1 | F2 | F3 | PauseBreak | | | Insert | | | | | +| | | | NaviLayer | Space | | | Backspace | NumberLayer | | | | diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/rules.mk new file mode 100644 index 0000000000..96655e7b5a --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/rules.mk @@ -0,0 +1,4 @@ +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +COMBO_ENABLE = yes +EXTRAKEY_ENABLE = yes diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/config.h new file mode 100644 index 0000000000..bfcec37892 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/config.h @@ -0,0 +1,85 @@ +// Copyright 2022 Fae Fankhauser (@CoffeeIsLife87) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define LAYER_STATE_8BIT + +// RGB Matrix effects disable +#ifdef RGB_MATRIX_ENABLE +# define UNDERGLOW_DISABLE + +# define RGB_TRIGGER_ON_KEYDOWN + +# define RGB_MATRIX_LED_FLUSH_LIMIT 10 + +# undef ENABLE_RGB_MATRIX_SOLID_COLOR +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_HUE_BREATHING +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM +# undef ENABLE_RGB_MATRIX_HUE_WAVE +# undef ENABLE_RGB_MATRIX_PIXEL_RAIN +# undef ENABLE_RGB_MATRIX_PIXEL_FLOW +# undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN + +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif + +// If RGBLight is enabled +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM DRIVER_LED_TOTAL + +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +#endif + +// Feature disable +#ifndef NO_PRINT +# define NO_PRINT +#endif + +#ifndef NO_DEBUG +# define NO_DEBUG +#endif + +#ifndef NO_ACTION_ONESHOT +# define NO_ACTION_ONESHOT +#endif + +// Configure features +#ifdef DYNAMIC_MACRO_ENABLE +# define DYNAMIC_MACRO_USER_CALL +# define DYNAMIC_MACRO_NO_NESTING +#endif + +#ifdef MOUSEKEY_ENABLE +# define MOUSEKEY_INTERVAL 16 // 60 FPS +# define MK_3_SPEED +#endif
\ No newline at end of file diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c new file mode 100644 index 0000000000..9130bd678e --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c @@ -0,0 +1,165 @@ +// Copyright 2022 Fae Fankhauser (@CoffeeIsLife87) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum custom_keycodes { + NULLKEY = SAFE_RANGE, // An empty key to start (and maybe end) the enum + #ifdef DYNAMIC_MACRO_ENABLE + MCR_PLY, // Macro play + MCR_REC, // Macro record + MCR_SWT, // Swap active macro + #endif +}; + +enum layout_names { + _MAIN = 0, // Keys Layout: The main keyboard layout that has all the characters + _SUB, // Extension to Main + _CTR, // Macros, RGB, Audio controls, layer access. More or less the control center of my keyboard + _END, +}; + +#ifdef DYNAMIC_MACRO_ENABLE + // Macro 1 is = 1, Macro 2 = -1, No macro = 0 + static bool MACRO1 = true; + static bool RECORDING = false; + + static uint16_t REC = DM_REC1; + static uint16_t PLY = DM_PLY1; + + void dynamic_macro_record_start_user(void) { + REC = DM_RSTP; + RECORDING = true; + } + void dynamic_macro_record_end_user(int8_t direction) { + RECORDING = false; + } +#else + #define MCR_PLY KC_NO + #define MCR_REC KC_NO + #define MCR_SWT KC_NO +#endif + +const uint16_t PROGMEM keymaps[_END][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT_planck_mit( + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC, + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_ENT , + KC_LCTL, KC_LGUI, XXXXXXX,KC_LALT ,MO(_SUB), KC_SPC ,MO(_CTR), KC_LEFT, KC_DOWN, KC_UP , KC_RGHT + ), + [_SUB] = LAYOUT_planck_mit( + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL, + XXXXXXX, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, KC_PGUP, + _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_PGDN, + _______, _______, XXXXXXX, _______, _______, _______ , _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + [_CTR] = LAYOUT_planck_mit( + XXXXXXX, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, XXXXXXX, XXXXXXX, KC_VOLU, XXXXXXX, XXXXXXX, MCR_REC, + XXXXXXX, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, MCR_PLY, + XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, XXXXXXX, XXXXXXX, MCR_SWT, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +#define LAYER (get_highest_layer(layer_state)) +#define LAYER_SIZE (MATRIX_ROWS * MATRIX_COLS) +#define CHECK_LED() \ + if ((i >= DRIVER_LED_TOTAL) \ + || ((g_led_config.flags[pos] == LED_FLAG_NONE) || (g_led_config.flags[pos] == LED_FLAG_UNDERGLOW))) \ + continue + +#ifdef RGB_MATRIX_ENABLE + + #ifdef UNDERGLOW_DISABLE + void keyboard_pre_init_user(void) { + + for (int key_id = 0; key_id < DRIVER_LED_TOTAL; key_id++ ) { + if (g_led_config.flags[key_id] == LED_FLAG_UNDERGLOW) { + g_led_config.flags[key_id] = LED_FLAG_NONE; + } + } + } + #endif + + void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (LAYER != _MAIN) { + + int DimmedMax = UINT8_MAX - (UINT8_MAX - rgb_matrix_config.hsv.v); + + for (uint8_t i = led_min; i <= led_max; i++) { + + uint8_t pos = ((uint8_t*)g_led_config.matrix_co)[i]; + + CHECK_LED(); // Check LED before moving on + uint16_t KC = pgm_read_word(&((uint16_t*)keymaps)[(LAYER_SIZE * LAYER) + i]); + + if (KC == KC_NO) { + RGB_MATRIX_INDICATOR_SET_COLOR(pos, 0, 0, 0 ); + } + + #ifdef DYNAMIC_MACRO_ENABLE + else if (KC == MCR_SWT) { + if (!MACRO1) { + RGB_MATRIX_INDICATOR_SET_COLOR(pos, 0, DimmedMax, DimmedMax); + } + } else if (KC == MCR_REC) { + if (RECORDING) { + RGB_MATRIX_INDICATOR_SET_COLOR(pos, DimmedMax, 0, 0); + } + } + #endif + + } + } + } +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + #ifdef DYNAMIC_MACRO_ENABLE + if (keycode == MCR_REC) keycode = REC; + if (keycode == MCR_PLY) keycode = PLY; + if (!process_dynamic_macro(keycode, record)) { + REC = (MACRO1 ? DM_REC1 : DM_REC2); + return false; + } + #endif + + switch (keycode) { + #ifdef DYNAMIC_MACRO_ENABLE + case MCR_SWT: + if (!RECORDING && record->event.pressed) { + // if the button is pressed and we're not recording + MACRO1 = !MACRO1; + if (MACRO1) { + REC = DM_REC1; + PLY = DM_PLY1; + } else { + REC = DM_REC2; + PLY = DM_PLY2; + } + } + return false; + #endif + + #if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) // this only needs to be defined if both are enabled + case RGB_TOG: // We can intercept this keycode ig? Cool :) + if (record->event.pressed) { + if (rgb_matrix_is_enabled()) { + rgb_matrix_disable/*_noeeprom*/(); + rgblight_enable/*_noeeprom*/(); + } else if (rgblight_is_enabled()) { + rgb_matrix_disable/*_noeeprom*/(); + rgblight_disable/*_noeeprom*/(); + } else { + rgb_matrix_enable/*_noeeprom*/(); + rgblight_disable/*_noeeprom*/(); + } + } + return false; + #endif + + default: + return true; //Process all other keycodes normally + } +}
\ No newline at end of file diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/readme.md new file mode 100644 index 0000000000..2fb004cece --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/readme.md @@ -0,0 +1,55 @@ +# Kprepublic BM40HSRGB Coffee + +A layout that aims to be familiar to people that have used larger boards + +## The layout + +The primary layer ( `_MAIN` ) is as close to standard qwerty as I could get. +``` +esc | q | w | e | r | t | y | u | i | o | p | bksp +tab | a | s | d | f | g | h | j | k | l | ; | ' +shft | z | x | c | v | b | n | m | , | . | / | rtrn +ctrl | win | | alt | SUB | spc | CTR | lft | dwn | up | rght +``` + +The secondary layer ( `_SUB` ) is for syntax, F keys, and number keys +``` +grv | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | del + | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | pgup + _ | F7 | F8 | F9 | F10 | F11 | F12 | | | | \ | pgdn + _ | _ | | _ | _ | _ | _ | | | | +``` + +The control layer ( `_CTR` ) is for lighting, media, and macros +``` + | SPD- | BRI+ | SPD+ | HUE+ | SAT+ | | | VOL+ | | | MCR_REC + | EFCT- | BRI- | EFCT+ | HUE- | SAT- | | PREV | PLAY | NEXT | | MCR_PLY + | | TOG | | | | | | VOL- | | | MCR_SWT + | | | | | _ | | | | | +``` + +| Key name | Explanation | +| -------- | -------------------------------------- | +| \_ | Passthrough the key on the layer below | +| SUB | Goes to _SUB layer while held down | +| CTR | Goes to _CTR layer while held down | +| SPD +/- | Changes speed for the RGB effect | +| BRI +/- | Changes the brightness of the lighting | +| EFCT +/- | Moves to the next/previous effect | +| TOG | Toggles the lighting on or off | +| HUE +/- | Changes the hue for RGB effects | +| SAT +/- | Changes the saturation for RGB effects | +| MSE | Toggles the Mouse layer | +| VOL +/- | Raises or lowers media volume | +| PREV | Goes to previous media | +| PLAY | Play/Pause media | +| NEXT | Goes to next media | +| MCR_REC | Record macro ( Press again to stop ) | +| MCR_PLY | Play recorded macro | +| MCR_SWT | Switch active macro | + +## Compiling + +Compiling: `make kprepublic/bm40hsrgb:coffee` + +Flashing: `make kprepublic/bm40hsrgb:coffee:flash` diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/rules.mk new file mode 100644 index 0000000000..5d3039b8e2 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = no +NKRO_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes +LTO_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c new file mode 100644 index 0000000000..5029d557dd --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c @@ -0,0 +1,332 @@ +/* Copyright 2020 tominabox1 + * + * 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 layers { + _ALPHA, + _LEFTFN, + _RIGHTFN, + _NUMPAD, + _LEAGUE, + _PUBG, + _OVERWATCH, + _STARCRAFT, + _TETRIS, + _CLEAN, + _RGB +}; + +#define ALPHA TO(_ALPHA) +#define LEFTFN MO(_LEFTFN) +#define RIGHTFN MO(_RIGHTFN) +#define NUMPAD MO(_NUMPAD) +#define LEAGUE TG(_LEAGUE) +#define PUBG TG(_PUBG) +#define OVERWATCH TG(_OVERWATCH) +#define STARCRAFT TG(_STARCRAFT) +#define TETRIS TG(_TETRIS) +#define CLEAN TG(_CLEAN) +#define RGB MO(_RGB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* ALPHA + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Return| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |ESC/NP| KOR | Win | Alt |LEFTFN| Space |RFN/- | = |Delete| \ | Enter| + * `-----------------------------------------------------------------------------------' + */ +[_ALPHA] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + LT(NUMPAD, KC_ESC), KC_LNG1, KC_LGUI, KC_LALT, LEFTFN, KC_SPC, LT(RIGHTFN, KC_MINS), KC_EQL, KC_DEL, KC_BSLS, KC_PENT +), + +/* LEFTFN + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Left | Down | Up |Right |CTRL+/|HANJA | [ | ] | ) | : | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| PGUP | PGDN | Home | End | CAPS |PRNTSR| ( | , | . | / | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RGB | [ | ] | Alt | Trns | Space | _ | + | INS | | | Ent. | + * `-----------------------------------------------------------------------------------' + */ +[_LEFTFN] = LAYOUT_planck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_LCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, LCTL(KC_SLSH), KC_LNG2, KC_LBRC, KC_RBRC, KC_RPRN, KC_COLN, KC_DQUO, + KC_LSFT, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_CAPS, KC_PSCR, KC_LPRN, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + RGB, KC_LBRC, KC_RBRC, KC_LALT, KC_TRNS, KC_SPC, KC_UNDS, KC_PLUS, KC_INS, KC_PIPE, KC_PENT +), + + +/* RIGHTFN + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | Pause|SCRLCK| | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | | | | | | F1 | F2 | F3 | F4 | F5 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| | | | | | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Alt | | Space | Trns | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RIGHTFN] = LAYOUT_planck_mit( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PAUS, KC_SCRL, KC_NO, KC_F11, KC_F12, + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_NO, KC_NO, KC_NO, KC_LALT, KC_NO, KC_SPC, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO +), + +/* NUMPAD + * ,-----------------------------------------------------------------------------------. + * | * | 7 | 8 | 9 | NumLk| | | | | | | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Alt | 4 | 5 | 6 | Enter| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | - | 1 | 2 | 3 | Bksp | | | | | Ctrl | Shift|Return| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Trns | , | + | . | 0 | Space |LEAGUE| PUBG | OVWCh| SC |TETRIS| + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_planck_mit( + KC_PAST, KC_P7, KC_P8, KC_P9, KC_NLCK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, + KC_LALT, KC_P4, KC_P5, KC_P6, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_PMNS, KC_P1, KC_P2, KC_P3, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_LSFT, KC_ENT, + KC_TRNS, KC_COMM, KC_PPLS, KC_PDOT, KC_0, KC_SPC, LEAGUE, PUBG, OVERWATCH, STARCRAFT, TETRIS +), + +/* LEAGUE + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | 5 | Y | | | O | P | ESC | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | A | S | D | F | | | | | L | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | 6 | 4 | 1 | B | | | | | | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | 3 | X | C | Alt | 2 | Space | | | | | ALPHA| + * `-----------------------------------------------------------------------------------' + */ +[_LEAGUE] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_5, KC_Y, KC_NO, KC_NO, KC_O, KC_P, KC_ESC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_NO, KC_NO, KC_NO, KC_NO, KC_L, KC_NO, KC_NO, + KC_LSFT, KC_Z, KC_6, KC_4, KC_1, KC_B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, + KC_3, KC_X, KC_C, KC_LALT, KC_2, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, ALPHA +), + +/* PUBG + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | ESC | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | 1 | A | S | D | F | G | H | J | K | L | | F7 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | 3 | X | C | V | B | M | . | | | F9 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | 5 | 4 | Alt | 2 | Space | 6 | 8 | 7 | 9 | ALPHA| + * `-----------------------------------------------------------------------------------' + */ +[_PUBG] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, + KC_1, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_F7, + KC_LSFT, KC_Z, KC_3, KC_X, KC_C, KC_V, KC_B, KC_M, KC_DOT, KC_NO, KC_NO, KC_F9, + KC_LCTL, KC_5, KC_4, KC_LALT, KC_2, KC_SPC, KC_6, KC_8, KC_7, KC_9, ALPHA +), + +/* OVERWATCH + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | ESC | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | 1 | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | | Alt | 2 | Space | Bksp | | | | ALPHA| + * `-----------------------------------------------------------------------------------' + */ +[_OVERWATCH] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, + KC_1, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_NO, KC_NO, KC_LALT, KC_2, KC_SPC, KC_BSPC, KC_NO, KC_NO, KC_NO, ALPHA +), + +/* STARCRAFT + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | | | Alt | F1 | Space | F10 | Pause|Delete| | ALPHA| + * `-----------------------------------------------------------------------------------' + */ +[_STARCRAFT] = LAYOUT_planck_mit( + + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_ESC, KC_NO, KC_NO, KC_LALT, KC_F1, KC_SPC, KC_F10, KC_PAUS, KC_DEL, KC_NO, ALPHA +), + +/* TETRIS + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | Up | E | R | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | A | Left | Down | Right| F | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | | Alt | S | Space | | | | | ALPHA| + * `-----------------------------------------------------------------------------------' + */ +[_TETRIS] = LAYOUT_planck_mit( + + KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_A, KC_LEFT, KC_DOWN, KC_RIGHT, KC_F, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_NO, KC_NO, KC_LALT, KC_S, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, ALPHA + +), + +/* TETRIS + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | ALPHA| + * `-----------------------------------------------------------------------------------' + */ +[_CLEAN] = LAYOUT_planck_mit( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, ALPHA +), + +/* RGB (LEFTFN + RGB) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | CLEAN| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |RGBTGL| MOD+ | BRT+ | SAT+ | | | | FX+ | HUE+ | | MOD R| MODES| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | MOD- | BRT- | SAT- | Trns | | FX- | HUE- | | MOD B| MOD P| + * `-----------------------------------------------------------------------------------' + */ +[_RGB] = LAYOUT_planck_mit( + KC_NO, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, CLEAN, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_SAI, KC_NO, KC_NO, KC_NO, RGB_SPI, RGB_HUI, KC_NO, RGB_M_R, RGB_M_SW, + KC_NO, RGB_RMOD, RGB_VAD, RGB_SAD, KC_TRNS, KC_NO, RGB_SPD, RGB_HUD, KC_NO, RGB_M_B, RGB_M_P +) + +}; + +/* + +// Key Matrix to LED Index +{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, +{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}, +{24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}, +{36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46} + +*/ +void rgb_matrix_indicators_user(void) { + switch (get_highest_layer(layer_state)) { + case _ALPHA: + break; + case _LEFTFN: + break; + case _RIGHTFN: + break; + case _NUMPAD: + break; + case _LEAGUE: + rgb_matrix_set_color(1, 15, 15, 15); + rgb_matrix_set_color(2, 15, 15, 15); + rgb_matrix_set_color(3, 15, 15, 15); + rgb_matrix_set_color(4, 15, 15, 15); + rgb_matrix_set_color(15, 50, 40, 0); + rgb_matrix_set_color(16, 50, 5, 0); + rgb_matrix_set_color(29, 0, 15, 50); + rgb_matrix_set_color(10, 20, 2, 15); + break; + + case _PUBG: + rgb_matrix_set_color(12, 15, 15, 15); + rgb_matrix_set_color(40, 15, 15, 15); + rgb_matrix_set_color(42, 3, 3, 50); + rgb_matrix_set_color(43, 5, 50, 8); + rgb_matrix_set_color(44, 50, 35, 0); + rgb_matrix_set_color(45, 30, 30, 15); + break; + + case _OVERWATCH: + rgb_matrix_set_color(11, 80, 20, 0); + rgb_matrix_set_color(46, 80, 20, 0); + break; + + case _STARCRAFT: + rgb_matrix_set_color(11, 5, 80, 15); + rgb_matrix_set_color(46, 5, 80, 15); + break; + + case _TETRIS: + rgb_matrix_set_color(2, 60, 10, 20); + rgb_matrix_set_color(13, 60, 10, 20); + rgb_matrix_set_color(14, 60, 10, 20); + rgb_matrix_set_color(15, 60, 10, 20); + break; + + case _CLEAN: + rgb_matrix_set_color_all(255, 255, 255); + break; + + case _RGB: + break; + } + + led_t led_state = host_keyboard_led_state(); + + //Capslock led + if (led_state.caps_lock) { + rgb_matrix_set_color(12, 145, 145, 145); + } + + //Numlock led + if (!led_state.num_lock) { + rgb_matrix_set_color(0, 145, 145, 145); + } + + //Scroll lock led + if (led_state.scroll_lock) { + rgb_matrix_set_color(24, 145, 145, 145); + } + +} diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/readme.md new file mode 100644 index 0000000000..4a706c7315 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/readme.md @@ -0,0 +1,3 @@ +# Dan's kprepublic bm40 layout + +Dan's personal keymap with LED indicator support. diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h index b38e4b8fc6..e71078415a 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h @@ -30,9 +30,6 @@ #define AUTO_SHIFT_TIMEOUT TAPPING_TERM #define AUTO_SHIFT_NO_SETUP -// Recommended for heavy chording. -#define QMK_KEYS_PER_SCAN 4 - // Mouse key speed and acceleration. #undef MOUSEKEY_DELAY #define MOUSEKEY_DELAY 0 @@ -60,10 +57,6 @@ #define RGBLIGHT_LIMIT_VAL 10 -//bootmagic -#define BOOTMAGIC_KEY_SALT KC_V -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - #ifdef RGB_MATRIX_ENABLE # undef ENABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c index 1ebea18175..12db3f2eec 100755 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [FUN] = LAYOUT_planck_mit( - KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, + KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QK_BOOT, KC_F11, KC_F4, KC_F5, KC_F6, KC_SLCK, KC_NO, KC_NO, KC_NO, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ALGR, KC_NO, KC_NO, KC_NO, KC_APP, KC_SPC, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h index 2b0d0961c4..a88ae7f2e8 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h @@ -25,10 +25,6 @@ //#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGBLIGHT_LIMIT_VAL 10 -//bootmagic -#define BOOTMAGIC_KEY_SALT KC_V -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - #ifdef RGB_MATRIX_ENABLE #define TAPPING_TERM 200 diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c index b04f7ffb7c..1e97aba495 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c @@ -19,7 +19,7 @@ #include QMK_KEYBOARD_H // non-KC_ keycodes -#define KC_RST RESET +#define KC_RST QK_BOOT #define KC_TOG RGB_TOG #define KC_MOD RGB_MOD #define KC_HUI RGB_HUI diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h index d39f6b95c8..cdfa67acb0 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h @@ -25,10 +25,6 @@ //#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGBLIGHT_LIMIT_VAL 10 -//bootmagic -#define BOOTMAGIC_KEY_SALT KC_V -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - #ifdef RGB_MATRIX_ENABLE #define TAPPING_TERM 200 diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c index 12539fe41c..e725e23214 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c @@ -19,7 +19,7 @@ #include QMK_KEYBOARD_H // non-KC_ keycodes -#define KC_RST RESET +#define KC_RST QK_BOOT #define KC_TOG RGB_TOG #define KC_MOD RGB_MOD #define KC_HUI RGB_HUI diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h index a4634c581e..dbadc3da99 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h @@ -25,10 +25,6 @@ //#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGBLIGHT_LIMIT_VAL 10 -//bootmagic -#define BOOTMAGIC_KEY_SALT KC_V -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - #ifdef RGB_MATRIX_ENABLE #define TAPPING_TERM 200 diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c index 999e6b18af..02ea122a03 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c @@ -19,7 +19,7 @@ #include QMK_KEYBOARD_H // non-KC_ keycodes -#define KC_RST RESET +#define KC_RST QK_BOOT #define KC_TOG RGB_TOG #define KC_MOD RGB_MOD #define KC_HUI RGB_HUI diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c index e72d83f9d0..ecce30e237 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c @@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // adjust layer ok [_ADJUST] = LAYOUT_planck_mit( - RESET, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, + QK_BOOT, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, KC_CAPS, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, QWERTY, DVORAK, COLEMAK, WORKMAN, MIDI, _______, MI_ON, MI_OFF, MI_TOG, MU_ON, MU_OFF, MU_TOG, MU_MOD, AU_ON, AU_OFF, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/kprepublic/bm43a/config.h b/keyboards/kprepublic/bm43a/config.h index e08561d916..23f1753fc7 100644 --- a/keyboards/kprepublic/bm43a/config.h +++ b/keyboards/kprepublic/bm43a/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM43A - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 diff --git a/keyboards/kprepublic/bm43a/info.json b/keyboards/kprepublic/bm43a/info.json index 005945d50e..0cbeeac633 100644 --- a/keyboards/kprepublic/bm43a/info.json +++ b/keyboards/kprepublic/bm43a/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "BM43A", + "manufacturer": "KPRepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0xFEED", + "pid": "0x0000", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/kprepublic/bm43a/keymaps/stevexyz/keymap.c b/keyboards/kprepublic/bm43a/keymaps/stevexyz/keymap.c index 04df426ba9..7c7324f555 100644 --- a/keyboards/kprepublic/bm43a/keymaps/stevexyz/keymap.c +++ b/keyboards/kprepublic/bm43a/keymaps/stevexyz/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 12+11+11+9 DF(2), KC_MUTE, KC_VOLD, KC_VOLU, KC_COMM, KC_1, KC_2, KC_3, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, DF(3), XXXXXXX, XXXXXXX, KC_SPC, KC_0, KC_DOT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT ), [3] = LAYOUT( - DF(0), KC_SLEP, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + DF(0), KC_SLEP, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, BL_STEP, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), diff --git a/keyboards/kprepublic/bm43hsrgb/config.h b/keyboards/kprepublic/bm43hsrgb/config.h index c778f56995..dc753287d2 100755 --- a/keyboards/kprepublic/bm43hsrgb/config.h +++ b/keyboards/kprepublic/bm43hsrgb/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 -#define PRODUCT_ID 0x6061 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM43 Hotswap RGB - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 diff --git a/keyboards/kprepublic/bm43hsrgb/info.json b/keyboards/kprepublic/bm43hsrgb/info.json index dbee830364..052a4f8a6a 100755 --- a/keyboards/kprepublic/bm43hsrgb/info.json +++ b/keyboards/kprepublic/bm43hsrgb/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "BM43HSRGB", + "keyboard_name": "BM43 Hotswap RGB", + "manufacturer": "KPRepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x6061", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/keymap.c b/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/keymap.c index 366c755558..f201c3d88f 100755 --- a/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/keymap.c +++ b/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS ), [_FN] = LAYOUT( - KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/config.h b/keyboards/kprepublic/bm60hsrgb/rev1/config.h index b8f002dca6..f1a160730c 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev1/config.h +++ b/keyboards/kprepublic/bm60hsrgb/rev1/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0xEF8C -#define DEVICE_VER 0x0001 -#define MANUFACTURER KP Republic -#define PRODUCT BM60HSRGB - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/info.json b/keyboards/kprepublic/bm60hsrgb/rev1/info.json index a5fb20a008..4c1db804bd 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev1/info.json +++ b/keyboards/kprepublic/bm60hsrgb/rev1/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "BM60HSRGB", + "manufacturer": "KP Republic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0xEF8C", + "device_version": "0.0.1" + }, "layout_aliases": { "LAYOUT": "LAYOUT_60_ansi_arrow" }, diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/keymaps/jbradforddillon/keymap.c b/keyboards/kprepublic/bm60hsrgb/rev1/keymaps/jbradforddillon/keymap.c index c43365356e..da5aa92901 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev1/keymaps/jbradforddillon/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb/rev1/keymaps/jbradforddillon/keymap.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - 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, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/config.h b/keyboards/kprepublic/bm60hsrgb/rev2/config.h index d8e7501b22..09ba659d65 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb/rev2/config.h @@ -17,13 +17,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 -#define PRODUCT_ID 0x1121 -#define DEVICE_VER 0x0002 -#define MANUFACTURER KP Republic -#define PRODUCT BM60V2 - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 @@ -40,7 +33,6 @@ */ #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 diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/info.json b/keyboards/kprepublic/bm60hsrgb/rev2/info.json index 7cbd7fb4f7..af88dc88b6 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm60hsrgb/rev2/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "bm60v2", + "keyboard_name": "BM60V2", + "manufacturer": "KP Republic", "url": "", "maintainer": "bdtc123", + "usb": { + "vid": "0x4B50", + "pid": "0x1121", + "device_version": "0.0.2" + }, "layouts": { "LAYOUT_60_ansi_arrow": { "layout": [ diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/config.h b/keyboards/kprepublic/bm60hsrgb_ec/rev1/config.h index 9aa52dae90..868ce40d8c 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/config.h +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/config.h @@ -18,13 +18,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0xEF9C -#define DEVICE_VER 0x0001 -#define MANUFACTURER KP Republic -#define PRODUCT BM60HSRGB_EC - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/info.json b/keyboards/kprepublic/bm60hsrgb_ec/rev1/info.json index e85a9fffc3..d56d62fe59 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/info.json +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/info.json @@ -1,78 +1,87 @@ { - "keyboard_name": "BM60HSRGB_EC", + "keyboard_name": "BM60HSRGB_EC Rev1", + "manufacturer": "KP Republic", "url": "", - "maintainer": "qmk", + "maintainer": "peepeetee", + "usb": { + "vid": "0x4B50", + "pid": "0xEF9C", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT": { "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0}, - {"label":"K21 (B2,D1)", "x":14, "y":0}, - {"label":"K43 (E6,D3)", "x":15, "y":0}, - {"label":"K44 (E6,D5)", "x":16, "y":0}, - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, - {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3, "w":1.75}, - {"label":"K3C (B3,C7)", "x":13, "y":3}, - {"label":"K3D (B3,F7)", "x":14, "y":3}, - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4}, - {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K4B (E6,C6)", "x":12, "y":4}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4} + {"label":"K00 (B0, D0)", "x":0, "y":0.5}, + {"label":"K01 (B0, D1)", "x":1, "y":0.5}, + {"label":"K02 (B0, D2)", "x":2, "y":0.5}, + {"label":"K03 (B0, D3)", "x":3, "y":0.5}, + {"label":"K04 (B0, D5)", "x":4, "y":0.5}, + {"label":"K05 (B0, D4)", "x":5, "y":0.5}, + {"label":"K06 (B0, D6)", "x":6, "y":0.5}, + {"label":"K07 (B0, D7)", "x":7, "y":0.5}, + {"label":"K08 (B0, B4)", "x":8, "y":0.5}, + {"label":"K09 (B0, B5)", "x":9, "y":0.5}, + {"label":"K0A (B0, B6)", "x":10, "y":0.5}, + {"label":"K0B (B0, C6)", "x":11, "y":0.5}, + {"label":"K0C (B0, C7)", "x":12, "y":0.5}, + {"label":"K0D (B0, F7)", "x":13, "y":0.5}, + {"label":"K21 (B2, D1)", "x":14, "y":0.5}, + {"label":"K43 (E6, D3)", "x":13.9, "y":0, "w":0.6, "h":0.5}, + {"label":"K44 (E6, D5)", "x":14.5, "y":0, "w":0.6, "h":0.5}, + + {"label":"K10 (B1, D0)", "x":0, "y":1.5, "w":1.5}, + {"label":"K11 (B1, D1)", "x":1.5, "y":1.5}, + {"label":"K12 (B1, D2)", "x":2.5, "y":1.5}, + {"label":"K13 (B1, D3)", "x":3.5, "y":1.5}, + {"label":"K14 (B1, D5)", "x":4.5, "y":1.5}, + {"label":"K15 (B1, D4)", "x":5.5, "y":1.5}, + {"label":"K16 (B1, D6)", "x":6.5, "y":1.5}, + {"label":"K17 (B1, D7)", "x":7.5, "y":1.5}, + {"label":"K18 (B1, B4)", "x":8.5, "y":1.5}, + {"label":"K19 (B1, B5)", "x":9.5, "y":1.5}, + {"label":"K1A (B1, B6)", "x":10.5, "y":1.5}, + {"label":"K1B (B1, C6)", "x":11.5, "y":1.5}, + {"label":"K1C (B1, C7)", "x":12.5, "y":1.5}, + {"label":"K1D (B1, F7)", "x":13.5, "y":1.5, "w":1.5}, + + {"label":"K20 (B2, D0)", "x":0, "y":2.5, "w":1.75}, + {"label":"K22 (B2, D2)", "x":1.75, "y":2.5}, + {"label":"K23 (B2, D3)", "x":2.75, "y":2.5}, + {"label":"K24 (B2, D5)", "x":3.75, "y":2.5}, + {"label":"K25 (B2, D4)", "x":4.75, "y":2.5}, + {"label":"K26 (B2, D6)", "x":5.75, "y":2.5}, + {"label":"K27 (B2, D7)", "x":6.75, "y":2.5}, + {"label":"K28 (B2, B4)", "x":7.75, "y":2.5}, + {"label":"K29 (B2, B5)", "x":8.75, "y":2.5}, + {"label":"K2A (B2, B6)", "x":9.75, "y":2.5}, + {"label":"K2B (B2, C6)", "x":10.75, "y":2.5}, + {"label":"K2C (B2, C7)", "x":11.75, "y":2.5}, + {"label":"K2D (B2, F7)", "x":12.75, "y":2.5, "w":2.25}, + + {"label":"K31 (B3, D1)", "x":0, "y":3.5, "w":2.25}, + {"label":"K32 (B3, D2)", "x":2.25, "y":3.5}, + {"label":"K33 (B3, D3)", "x":3.25, "y":3.5}, + {"label":"K34 (B3, D5)", "x":4.25, "y":3.5}, + {"label":"K35 (B3, D4)", "x":5.25, "y":3.5}, + {"label":"K36 (B3, D6)", "x":6.25, "y":3.5}, + {"label":"K37 (B3, D7)", "x":7.25, "y":3.5}, + {"label":"K38 (B3, B4)", "x":8.25, "y":3.5}, + {"label":"K39 (B3, B5)", "x":9.25, "y":3.5}, + {"label":"K3A (B3, B6)", "x":10.25, "y":3.5}, + {"label":"K3B (B3, C6)", "x":11.25, "y":3.5, "w":1.75}, + {"label":"K3C (B3, C7)", "x":13, "y":3.5}, + {"label":"K3D (B3, F7)", "x":14, "y":3.5}, + + {"label":"K40 (E6, D0)", "x":0, "y":4.5, "w":1.25}, + {"label":"K41 (E6, D1)", "x":1.25, "y":4.5, "w":1.25}, + {"label":"K42 (E6, D2)", "x":2.5, "y":4.5, "w":1.25}, + {"label":"K46 (E6, D6)", "x":3.75, "y":4.5, "w":6.25}, + {"label":"K49 (E6, B5)", "x":10, "y":4.5}, + {"label":"K4A (E6, B6)", "x":11, "y":4.5}, + {"label":"K4B (E6, C6)", "x":12, "y":4.5}, + {"label":"K4C (E6, C7)", "x":13, "y":4.5}, + {"label":"K4D (E6, F7)", "x":14, "y":4.5} ] } } - ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" } diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb_ec/rev1/keymaps/default/keymap.c index eaf57e31ac..eb7e5cc221 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/keymaps/default/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RESET, _______, _______, _______, _______, _______, _______, _______, _______ + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/keymaps/via/keymap.c b/keyboards/kprepublic/bm60hsrgb_ec/rev1/keymaps/via/keymap.c index 4f4396ad50..a82f480bf0 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/keymaps/via/keymap.c @@ -28,21 +28,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RESET, _______, _______, _______, _______, _______, _______, _______, _______ + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______ ), [2] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RESET, _______, _______, _______, _______, _______, _______, _______, _______ + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______ ), [3] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RESET, _______, _______, _______, _______, _______, _______, _______, _______ + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/readme.md b/keyboards/kprepublic/bm60hsrgb_ec/rev1/readme.md index 2c0996974b..f22bf4f97c 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/readme.md +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/readme.md @@ -2,9 +2,9 @@ A 60% hotswap inswitch RGB keyboard with an encoder from KP Republic. -* Keyboard Maintainer: [bdtc123](https://github.com/bdtc123) +* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) * Hardware Supported: BM60HSRGB_EC/rev1 -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-60-gh60-hot-swappable-pcb-programmed-qmk-firmware-type-c) +* 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) ## Bootloader @@ -12,7 +12,7 @@ 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 +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h index 5c2bf39ced..ac80357e9f 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h @@ -17,13 +17,6 @@ #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 BM60V2_ec - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 @@ -43,7 +36,6 @@ */ #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 diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json b/keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json index 613511b784..b8e28b0ea2 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json @@ -1,80 +1,86 @@ { - "keyboard_name": "bm60hsrgb_ec", + "keyboard_name": "BM60HSRGB_EC Rev2", + "manufacturer": "KP Republic", "url": "", - "maintainer": "qmk", + "maintainer": "peepeetee", + "usb": { + "vid": "0x4B50", + "pid": "0x1124", + "device_version": "0.0.2" + }, "layouts": { "LAYOUT": { "layout": [ - {"x":0, "y":0}, - {"x":1, "y":0}, - {"x":2, "y":0}, - {"x":3, "y":0}, - {"x":4, "y":0}, - {"x":5, "y":0}, - {"x":6, "y":0}, - {"x":7, "y":0}, - {"x":8, "y":0}, - {"x":9, "y":0}, - {"x":10, "y":0}, - {"x":11, "y":0}, - {"x":12, "y":0}, - {"x":13, "y":0}, - {"x":14.75, "y":0}, - {"x":15.75, "y":0}, - {"x":16.75, "y":0}, + {"x":0, "y":0.5}, + {"x":1, "y":0.5}, + {"x":2, "y":0.5}, + {"x":3, "y":0.5}, + {"x":4, "y":0.5}, + {"x":5, "y":0.5}, + {"x":6, "y":0.5}, + {"x":7, "y":0.5}, + {"x":8, "y":0.5}, + {"x":9, "y":0.5}, + {"x":10, "y":0.5}, + {"x":11, "y":0.5}, + {"x":12, "y":0.5}, + {"x":13, "y":0.5}, + {"x":14, "y":0.5}, + {"x":13.9, "y":0, "w":0.6, "h":0.5}, + {"x":14.5, "y":0, "w":0.6, "h":0.5}, - {"x":0, "y":1, "w":1.5}, - {"x":1.5, "y":1}, - {"x":2.5, "y":1}, - {"x":3.5, "y":1}, - {"x":4.5, "y":1}, - {"x":5.5, "y":1}, - {"x":6.5, "y":1}, - {"x":7.5, "y":1}, - {"x":8.5, "y":1}, - {"x":9.5, "y":1}, - {"x":10.5, "y":1}, - {"x":11.5, "y":1}, - {"x":12.5, "y":1}, - {"x":13.5, "y":1, "w":1.5}, + {"x":0, "y":1.5, "w":1.5}, + {"x":1.5, "y":1.5}, + {"x":2.5, "y":1.5}, + {"x":3.5, "y":1.5}, + {"x":4.5, "y":1.5}, + {"x":5.5, "y":1.5}, + {"x":6.5, "y":1.5}, + {"x":7.5, "y":1.5}, + {"x":8.5, "y":1.5}, + {"x":9.5, "y":1.5}, + {"x":10.5, "y":1.5}, + {"x":11.5, "y":1.5}, + {"x":12.5, "y":1.5}, + {"x":13.5, "y":1.5, "w":1.5}, - {"x":0, "y":2, "w":1.75}, - {"x":1.75, "y":2}, - {"x":2.75, "y":2}, - {"x":3.75, "y":2}, - {"x":4.75, "y":2}, - {"x":5.75, "y":2}, - {"x":6.75, "y":2}, - {"x":7.75, "y":2}, - {"x":8.75, "y":2}, - {"x":9.75, "y":2}, - {"x":10.75, "y":2}, - {"x":11.75, "y":2}, - {"x":12.75, "y":2, "w":2.25}, + {"x":0, "y":2.5, "w":1.75}, + {"x":1.75, "y":2.5}, + {"x":2.75, "y":2.5}, + {"x":3.75, "y":2.5}, + {"x":4.75, "y":2.5}, + {"x":5.75, "y":2.5}, + {"x":6.75, "y":2.5}, + {"x":7.75, "y":2.5}, + {"x":8.75, "y":2.5}, + {"x":9.75, "y":2.5}, + {"x":10.75, "y":2.5}, + {"x":11.75, "y":2.5}, + {"x":12.75, "y":2.5, "w":2.25}, - {"x":0, "y":3, "w":2.25}, - {"x":2.25, "y":3}, - {"x":3.25, "y":3}, - {"x":4.25, "y":3}, - {"x":5.25, "y":3}, - {"x":6.25, "y":3}, - {"x":7.25, "y":3}, - {"x":8.25, "y":3}, - {"x":9.25, "y":3}, - {"x":10.25, "y":3}, - {"x":11.25, "y":3, "w":1.75}, - {"x":13, "y":3}, - {"x":14, "y":3}, + {"x":0, "y":3.5, "w":2.25}, + {"x":2.25, "y":3.5}, + {"x":3.25, "y":3.5}, + {"x":4.25, "y":3.5}, + {"x":5.25, "y":3.5}, + {"x":6.25, "y":3.5}, + {"x":7.25, "y":3.5}, + {"x":8.25, "y":3.5}, + {"x":9.25, "y":3.5}, + {"x":10.25, "y":3.5}, + {"x":11.25, "y":3.5, "w":1.75}, + {"x":13, "y":3.5}, + {"x":14, "y":3.5}, - {"x":0, "y":4, "w":1.25}, - {"x":1.25, "y":4, "w":1.25}, - {"x":2.5, "y":4, "w":1.25}, - {"x":3.75, "y":4, "w":6.25}, - {"x":10, "y":4}, - {"x":11, "y":4}, - {"x":12, "y":4}, - {"x":13, "y":4}, - {"x":14, "y":4} + {"x":0, "y":4.5, "w":1.25}, + {"x":1.25, "y":4.5, "w":1.25}, + {"x":2.5, "y":4.5, "w":1.25}, + {"x":3.75, "y":4.5, "w":6.25}, + {"x":10, "y":4.5}, + {"x":11, "y":4.5}, + {"x":12, "y":4.5}, + {"x":13, "y":4.5}, + {"x":14, "y":4.5} ] } } diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/default/keymap.c index 5e84d5bbe3..8e373e8c39 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/default/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - _______, 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, _______, _______, _______, _______, _______, _______, RMT, RMS, RMIH, RMDH, RMIS, RMDS, RMIV, RMDV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/via/keymap.c b/keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/via/keymap.c index c087c857fb..74191c2ff9 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/keymaps/via/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - _______, 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, _______, _______, _______, _______, _______, _______, RMT, RMS, RMIH, RMDH, RMIS, RMDS, RMIV, RMDV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/readme.md b/keyboards/kprepublic/bm60hsrgb_ec/rev2/readme.md index 39e986c1c5..caf1dae82a 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/readme.md +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/readme.md @@ -2,13 +2,17 @@ A 60% hotswap inswitch RGB keyboard with an encoder from KP Republic. -* Keyboard Maintainer: [bdtc123](https://github.com/bdtc123) +* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) * Hardware Supported: BM60HSRGB_EC/rev2 -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-60-gh60-hot-swappable-pcb-programmed-qmk-firmware-type-c) +* 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) + +## 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 +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev1/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev1/config.h index 42b9d2afb1..4ef984b4be 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev1/config.h +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev1/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0xEF8C -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM60HSRGB_ISO - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev1/info.json b/keyboards/kprepublic/bm60hsrgb_iso/rev1/info.json index b53600e44d..9531c81748 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev1/info.json +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev1/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "BM60HSRGB_ISO", + "keyboard_name": "BM60HSRGB_ISO Rev1", + "manufacturer": "KPRepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0xEF8C", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_60_iso_arrow": { "layout": [ diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h index 4653db4fd6..80dc26907c 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h @@ -19,13 +19,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 -#define PRODUCT_ID 0x1123 -#define DEVICE_VER 0x0002 -#define MANUFACTURER KP REPUBLIC -#define PRODUCT BM60V2_ISO - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 @@ -42,7 +35,6 @@ */ #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 diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/info.json b/keyboards/kprepublic/bm60hsrgb_iso/rev2/info.json index 8fd3f1786f..feee1fd9a7 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/info.json +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "bm60v2_ISO", + "keyboard_name": "BM60HSRGB_ISO Rev2", + "manufacturer": "KPRepublic", "url": "", "maintainer": "kp republic", + "usb": { + "vid": "0x4B50", + "pid": "0x1123", + "device_version": "0.0.2" + }, "layouts": { "LAYOUT_60_iso_arrow": { "layout": [ diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h index a3aab0e65e..88c44d4440 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0xEF8D -#define DEVICE_VER 0x0001 -#define MANUFACTURER KP Republic -#define PRODUCT BM60HSRGB_POKER - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/info.json b/keyboards/kprepublic/bm60hsrgb_poker/rev1/info.json index 09abf6e353..c168002147 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/info.json +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "BM60HSRGB_POKER", + "keyboard_name": "BM60HSRGB Poker Rev1", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0xEF8D", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_60_ansi": { "layout": [ diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c index 5050b25a90..fb7e9c33c3 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), [1] = LAYOUT_60_ansi(KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_UP, KC_INS, KC_HOME, KC_END, + QK_BOOT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_UP, KC_INS, KC_HOME, KC_END, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c index e59660242e..4a438b822b 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c @@ -58,14 +58,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_fn] = LAYOUT_60_ansi( KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, QK_BOOT, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, qwerty, colemak, gamer, _______, _______, _______, _______, _______ ), [_rgb] = LAYOUT_60_ansi( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h index d40004f502..96d8a450c9 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h @@ -17,13 +17,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 -#define PRODUCT_ID 0x1122 -#define DEVICE_VER 0x0002 -#define MANUFACTURER KP Republic -#define PRODUCT BM60V2_poker - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 @@ -40,7 +33,6 @@ */ #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 diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/info.json b/keyboards/kprepublic/bm60hsrgb_poker/rev2/info.json index 914334e113..8ec74866f2 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/info.json +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "bm60v2_poker", + "keyboard_name": "BM60HSRGB Poker Rev2", + "manufacturer": "KPrepublic", "url": "", "maintainer": "bdtc123", + "usb": { + "vid": "0x4B50", + "pid": "0x1122", + "device_version": "0.0.2" + }, "layouts": { "LAYOUT_60_ansi": { "layout": [ diff --git a/keyboards/kprepublic/bm65hsrgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm65hsrgb/keymaps/default/keymap.c index 1e1aae0413..1b3ce7a456 100644 --- a/keyboards/kprepublic/bm65hsrgb/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm65hsrgb/keymaps/default/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/kprepublic/bm65hsrgb/rev1/config.h b/keyboards/kprepublic/bm65hsrgb/rev1/config.h index b428a78864..c5e8022d35 100644 --- a/keyboards/kprepublic/bm65hsrgb/rev1/config.h +++ b/keyboards/kprepublic/bm65hsrgb/rev1/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 //KP -#define PRODUCT_ID 0xEF6E -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM65HSRGB - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 @@ -46,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. B3, \ E6 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm65hsrgb/rev1/info.json b/keyboards/kprepublic/bm65hsrgb/rev1/info.json index 788f8be23e..0d99dd2dc2 100644 --- a/keyboards/kprepublic/bm65hsrgb/rev1/info.json +++ b/keyboards/kprepublic/bm65hsrgb/rev1/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "BM65HSRGB", + "manufacturer": "KPrepublic", "url": "", "maintainer": "bytesapart", + "usb": { + "vid": "0x4B50", + "pid": "0xEF6E", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_65_ansi_blocker": { "layout": [ diff --git a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/config.h b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/config.h new file mode 100644 index 0000000000..0e06652715 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/config.h @@ -0,0 +1,36 @@ +/* Copyright 2021 deadolus 2022 p4yne + * + * 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/>. + */ + +// place overrides here + +#pragma once +#define LSPO_KEYS KC_LSFT, KC_LSFT, KC_8 +#define RSPC_KEYS KC_RSFT, KC_LSFT, KC_9 +#define LAPO_KEYS KC_LALT, KC_RALT, KC_QUOT +#define RAPC_KEYS KC_RALT, KC_RALT, KC_NUHS + +#define LEADER_TIMEOUT 1000 +#define LEADER_PER_KEY_TIMING 250 + +// control underglow +// i.e. switch it off +//#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT +//#define RGBLIGHT_DEFAULT_HUE 0 +//#define RGBLIGHT_DEFAULT_SAT UINT8_MAX +//#define RGBLIGHT_DEFAULT_SAT 0 +//#define RGBLIGHT_DEFAULT_VAL RGBLIGHT_LIMIT_VAL +//#define RGBLIGHT_DEFAULT_VAL 0 +//#define RGBLIGHT_DEFAULT_SPD 0 diff --git a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/custom_keymap.h b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/custom_keymap.h new file mode 100644 index 0000000000..8f11e4072b --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/custom_keymap.h @@ -0,0 +1,71 @@ +/* Copyright 2019 ash0x0 2021 peepeetee, deadolus 2022 p4yne + * + * 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 + +#include "print.h" +#include <string.h> +// HID has not yet been implemented for this keyboard +// #include "raw_hid.h" + +#define MILLISECONDS_IN_SECOND 1000 + +// Custom HSV values +#define C_HSV_WINERED 0, 255, 85 +#define C_HSV_DARKGOLD 36, 255, 85 +#define C_HSV_DARKBLUE 170, 255, 85 + +// Default color HSV Values (for inspiration) +// #define HSV_AZURE 132, 102, 255 +// #define HSV_BLACK 0, 0, 0 +// #define HSV_BLUE 170, 255, 255 +// #define HSV_CHARTREUSE 64, 255, 255 +// #define HSV_CORAL 11, 176, 255 +// #define HSV_CYAN 128, 255, 255 +// #define HSV_GOLD 36, 255, 255 +// #define HSV_GOLDENROD 30, 218, 218 +// #define HSV_GREEN 85, 255, 255 +// #define HSV_MAGENTA 213, 255, 255 +// #define HSV_ORANGE 28, 255, 255 +// #define HSV_PINK 234, 128, 255 +// #define HSV_PURPLE 191, 255, 255 +// #define HSV_RED 0, 255, 255 +// #define HSV_SPRINGGREEN 106, 255, 255 +// #define HSV_TEAL 128, 255, 128 +// #define HSV_TURQUOISE 123, 90, 112 +// #define HSV_WHITE 0, 0, 255 +// #define HSV_YELLOW 43, 255, 255 +// #define HSV_OFF HSV_BLACK + + +//========================================================== CONFIGURABLE DEFAULTS ========================================================== +#define RGB_DEFAULT_TIME_OUT 30 +#define RGB_FAST_MODE_TIME_OUT 3 +#define RGB_TIME_OUT_MAX 600 +#define RGB_TIME_OUT_MIN 10 +#define RGB_TIME_OUT_STEP 10 + +bool disable_layer_color; + +uint8_t dfa_state; //state for my language switching DFA + + +bool rgb_enabled_flag; // Current LED state flag. If false then LED is off. +bool rgb_time_out_enable; // Idle LED toggle enable. If false then LED will not turn off after idle timeout. +bool rgb_time_out_fast_mode_enabled; // Enable flag for RGB timeout fast mode +bool rgb_time_out_user_value; // This holds the toggle value set by user with ROUT_TG. It's necessary as RGB_TOG changes timeout enable. +uint16_t rgb_time_out_seconds; // Idle LED timeout value, in seconds not milliseconds +uint16_t rgb_time_out_saved_seconds; // The saved user config for RGB timeout period +led_flags_t rgb_time_out_saved_flag; // Store LED flag before timeout so it can be restored when LED is turned on again. diff --git a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/keymap.c b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/keymap.c new file mode 100644 index 0000000000..442111bb6e --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/keymap.c @@ -0,0 +1,471 @@ +/* Copyright 2019 ashlar 2021 peepeetee, deadolus 2022 p4yne + * + * 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 +#include "custom_keymap.h" +#include "sendstring_german.h" + +#ifdef TAP_DANCE_ENABLE +enum { + TD_HOME_END, +}; + +// Tap Dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // tap once for home, twice for end + [TD_HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END) +}; +#endif + +// Custom layer types +enum layertypes { + LYR_SOLID, // fullsize coloring + LYR_TRANS, // used keys in layer color, lower layer shines through on unused keys + LYR_BLACK // only used key in layer color +}; + +// Defines names for use in layer keycodes and the keymap +enum layers { + _LVL0_, + _LVL1_, + _LVL2_, + _LVL3_, + _LVL4_, + _LVL5_, + _LVL6_, + _LVL7_ +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │PgD│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │End│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│GUI │Alt │ │ Alt│Ctrl│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ +#ifdef TAP_DANCE_ENABLE +/* 0: ISO qwertz, SPACECADET and TAPDANCE */ +/* [_LVL0_] = LAYOUT_65_iso_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_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, TD(TD_HOME_END), + 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_NUHS, KC_ENT, KC_PGUP, + KC_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LAPO, KC_SPC, KC_RAPC, MO(_LVL1_), KC_LEFT, KC_DOWN, KC_RGHT + ), + */ +/* 0: ISO DE qwertz, SPACECADET and TAPDANCE */ + [_LVL0_] = LAYOUT_65_iso_blocker( + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_ACUT, KC_BSPC, KC_DEL, + KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UDIA, DE_PLUS, TD(TD_HOME_END), + KC_CAPS, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, DE_ODIA, DE_ADIA, DE_HASH, KC_ENT, KC_PGUP, + KC_LSPO, DE_LABK, DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RSPC, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LAPO, KC_SPC, KC_RAPC, MO(_LVL1_), KC_LEFT, KC_DOWN, KC_RGHT + ), +#else + /* 0: ISO qwertz, SPACECADET but no TAPDANCE */ + [_LVL0_] = LAYOUT_65_iso_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_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_ENT, KC_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_PGUP, + KC_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LAPO, KC_SPC, KC_RAPC, MO(_LVL1_), KC_LEFT, KC_DOWN, KC_RGHT + ), +#endif + /* 1: Function key, multimedia control, layer switching board and LEADER */ + [_LVL1_] = LAYOUT_65_iso_blocker( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, LGUI(KC_END), + S(KC_GRV), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PAUSE), + QK_BOOT, TO(_LVL2_), TO(_LVL3_), TO(_LVL4_), TO(_LVL5_), TO(_LVL6_), TO(_LVL7_), _______, _______, _______, KC_BRIU, _______, KC_MUTE, TO(_LVL0_), KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, _______, S(KC_MUTE), KC_MPLY, KC_VOLD, + _______, _______, _______, KC_LEAD, _______, _______, KC_MPRV, KC_MSTP, KC_MNXT + ), + /* 2: Mouse layer and virtual/multiple desktop navigation */ + [_LVL2_] = LAYOUT_65_iso_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_PGDN, KC_PGUP, KC_PSCR, KC_WH_U, _______, _______, _______, + _______, _______, KC_BTN1, KC_BTN2, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_WH_D, _______, _______, TO(_LVL0_), _______, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, _______, _______, LCA(KC_UP), LCA(KC_E), + _______, _______, _______, _______, _______, _______, LCA(KC_LEFT), LCA(KC_DOWN), LCA(KC_RGHT) + ), +#ifdef DYNAMIC_MACRO_ENABLE + /* 3: Dynamic macro, NUMPAD and settings */ + [_LVL3_] = LAYOUT_65_iso_blocker( + _______, DM_PLY1, DM_PLY2, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, + _______, DM_REC1, DM_REC2, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, _______, _______, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, TO(_LVL0_), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, + _______, _______, _______, RGB_TOG, KC_0, KC_PCMM, _______, _______, _______ + ), +#else + /* 3: NUMPAD and settings */ + [_LVL3_] = LAYOUT_65_iso_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, + _______, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, _______, _______, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, TO(_LVL0_), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, + _______, _______, _______, RGB_TOG, KC_0, KC_PCMM, _______, _______, _______ + ), +#endif + /* Gaming layer no TAPDANCE no SPACECADET simple QWERTZ layout for custom coloring */ + [_LVL4_] = LAYOUT_65_iso_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_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_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TO(_LVL0_), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* 5: ISO qwerty DE 2 US Base Layer */ + [_LVL5_] = LAYOUT_65_iso_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_MINS, DE_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Y, KC_U, KC_I, KC_O, KC_P, DE_LBRC, DE_RBRC, KC_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN, DE_QUOT, DE_BSLS, KC_ENT, KC_PGUP, + MO(_LVL6_), DE_GRV, DE_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_COMM, DE_DOT, DE_SLSH, MO(_LVL6_), KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TO(_LVL0_), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* 6: ISO qwerty DE 2 US Shifted Layer */ + [_LVL6_] = LAYOUT_65_iso_blocker( + _______, DE_EXLM, DE_AT, DE_HASH, DE_DLR, DE_PERC, DE_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, DE_UNDS, DE_PLUS, _______, _______, + _______, S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), S(DE_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), DE_LCBR, DE_RCBR, KC_END, + KC_CAPS, S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), S(KC_H), S(KC_J), S(KC_K), S(KC_L), DE_COLN, DE_DQUO, DE_PIPE, _______, _______, + KC_LSFT, DE_TILD, S(DE_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), S(KC_N), S(KC_M), DE_LABK, DE_RABK, DE_QUES, KC_RSFT, _______, _______, + _______, _______, _______, _______, _______, TO(_LVL0_), _______, _______, _______ + ), +/* Led Type Lighting Layer functionally equivalent to _LVL0_ / layer 0 */ +#ifdef TAP_DANCE_ENABLE + /* 7: ISO DE qwertz, SPACECADET and TAPDANCE */ + [_LVL7_] = LAYOUT_65_iso_blocker( + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_ACUT, KC_BSPC, KC_DEL, + KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UDIA, DE_PLUS, TD(TD_HOME_END), + KC_CAPS, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, DE_ODIA, DE_ADIA, DE_HASH, KC_ENT, KC_PGUP, + KC_LSPO, DE_LABK, DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RSPC, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LAPO, KC_SPC, KC_RAPC, TO(_LVL0_), KC_LEFT, KC_DOWN, KC_RGHT + ), +#else + /* 7: ISO qwertz, SPACECADET but no TAPDANCE */ + [_LVL7_] = LAYOUT_65_iso_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_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_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LAPO, KC_SPC, KC_RAPC, TO(_LVL0_), KC_LEFT, KC_DOWN, KC_RGHT + ), +#endif + + + /*template + [_UL] = LAYOUT_65_iso_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(0), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + */ +}; + + +// layer color and type +const uint8_t PROGMEM ledmap[][4] = { + // LEDs off on Layer 0 + //[_LVL0_] = {{0, 0, 0}, LYR_SOLID}, + [_LVL0_] = {C_HSV_WINERED, LYR_SOLID}, + [_LVL1_] = {HSV_RED, LYR_TRANS}, + [_LVL2_] = {HSV_MAGENTA, LYR_BLACK}, + [_LVL3_] = {HSV_PURPLE, LYR_BLACK}, + [_LVL4_] = {C_HSV_DARKGOLD, LYR_SOLID}, + [_LVL5_] = {C_HSV_DARKBLUE, LYR_SOLID}, + [_LVL6_] = {HSV_BLUE, LYR_TRANS}, + [_LVL7_] = {C_HSV_WINERED, LYR_SOLID} +}; + + +void keyboard_post_init_user(void) { + // Call the post init code. +#ifdef CONSOLE_ENABLE + debug_enable=true; + debug_matrix=true; +#endif + //rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + //rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); + //rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); + //rgb_matrix_sethsv(HSV_OFF); + //rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR); + //rgb_matrix_sethsv_noeeprom(HSV_OFF); + //rgb_matrix_set_color_all(RGB_BLACK); + rgb_matrix_enable(); +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef CONSOLE_ENABLE + // useful for getting matrix right + uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %u, time: %u, interrupt: %u, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); +#endif + + switch (keycode) { + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); + rgb_matrix_set_color_all(RGB_BLACK); + } + break; + case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(RGB_BLACK); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; + default: + return true; // Process all other keycodes normally + } +} + + +void set_led_color_by_hsv(int ledkey, uint8_t h_in, uint8_t s_in, uint8_t v_in){ + HSV hsv = { .h = h_in, .s = s_in, .v = v_in}; + RGB rgb = hsv_to_rgb(hsv); + float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX; + rgb_matrix_set_color(ledkey, f * rgb.r, f * rgb.g, f * rgb.b); +} + +void set_led_color_by_layer(int layer, int ledkey){ + set_led_color_by_hsv(ledkey, pgm_read_byte(&ledmap[layer][0]), + pgm_read_byte(&ledmap[layer][1]), + pgm_read_byte(&ledmap[layer][2])); +} + +void set_ledkey_by_layer_type(int layer, int ledkey, uint16_t key){ + if (rgb_matrix_get_flags() != LED_FLAG_ALL){ + if ( key == KC_TRNS ) { + if ((pgm_read_byte(&ledmap[layer][3]) == LYR_TRANS) && (layer > 0)){ + // this key is transparent and the layer below does something + // - light it up in (lower) layer-1 specific color + set_led_color_by_layer(layer-1, ledkey); + } + if (pgm_read_byte(&ledmap[layer][3]) == LYR_BLACK){ + // this key is transparent but the lower layer is not intended + // to be used, it still works but not intended; type BLACK + set_led_color_by_hsv(ledkey, HSV_BLACK); + } + } else { + // this key does something - light it up in layer specific color + // regular key and SOLID or BLACK as layer type + set_led_color_by_layer(layer, ledkey); + } + } +} + +void set_caps_lock(int layer) { + int caps_lock_led = 30; + led_t host_leds = host_keyboard_led_state(); + if (host_leds.caps_lock) { + set_led_color_by_hsv(caps_lock_led, HSV_WHITE); + } else { + // if capslock is not pressed don't clear it, + // it might be used for displaying led pattern + if((rgb_matrix_get_flags() != LED_FLAG_ALL)) { + // or to keep the correct lighting on for the layer that use all keys + // on all other layers turn the led off, so only switch it of when + // layer is BLACK + if(pgm_read_byte(&ledmap[layer][3]) == LYR_BLACK){ + set_led_color_by_hsv(caps_lock_led, HSV_BLACK); + } + } + } +} + +void set_layer_color(int layer) { + // key specific lighting + int ledkey=0; + for (int keyindex=0; keyindex<MATRIX_COLS*MATRIX_ROWS;keyindex++) { + uint8_t row = keyindex/MATRIX_COLS; + uint8_t col = (keyindex-(keyindex/MATRIX_COLS)*MATRIX_COLS); + uint16_t key=pgm_read_word(&keymaps[layer][row][col]); + + // continue if this is not a valid key + if (key==KC_NO) { continue; } + + // handle layer specific coloring + set_ledkey_by_layer_type(layer, ledkey, key); + /* === below this function add custom overriding ledkey lighting === */ + + // gaming layer with highlighted keys + //if (IS_LAYER_ON(_LVL4_)) { + if (layer == _LVL4_) { + if((key==KC_W) || (key==KC_A) || (key==KC_S) || (key==KC_D)) { + set_led_color_by_hsv(ledkey, HSV_GOLD); + } + if((key==KC_R) || (key==KC_SPC) || (key==KC_LSFT) || (key==KC_LCTL)) { + set_led_color_by_hsv(ledkey, HSV_GOLDENROD); + } + } + + // color testing layer + /*if (layer == _LVL7_) { + switch (ledkey) { + case 16: { + set_led_color_by_hsv(ledkey, HSV_AZURE); + } + break; + case 17: { + set_led_color_by_hsv(ledkey, HSV_BLUE); + } + break; + case 18: { + set_led_color_by_hsv(ledkey, HSV_CHARTREUSE); + } + break; + case 19: { + set_led_color_by_hsv(ledkey, HSV_CORAL); + } + break; + case 20: { + set_led_color_by_hsv(ledkey, HSV_CYAN); + } + break; + case 21: { + set_led_color_by_hsv(ledkey, HSV_GOLD); + } + break; + case 22: { + set_led_color_by_hsv(ledkey, HSV_GOLDENROD); + } + break; + case 23: { + set_led_color_by_hsv(ledkey, HSV_MAGENTA); + } + break; + case 24: { + set_led_color_by_hsv(ledkey, HSV_ORANGE); + } + break; + case 25: { + set_led_color_by_hsv(ledkey, HSV_PINK); + } + break; + case 26: { + set_led_color_by_hsv(ledkey, HSV_RED); + } + break; + case 27: { + set_led_color_by_hsv(ledkey, HSV_SPRINGGREEN); + } + break; + case 32: { + set_led_color_by_hsv(ledkey, HSV_MAGENTA); + } + break; + case 33: { + set_led_color_by_hsv(ledkey, HSV_TEAL); + } + break; + case 34: { + set_led_color_by_hsv(ledkey, HSV_TURQUOISE); + } + break; + case 35: { + set_led_color_by_hsv(ledkey, HSV_WHITE); + } + break; + case 36: { + set_led_color_by_hsv(ledkey, HSV_YELLOW); + } + break; + case 37: { + set_led_color_by_hsv(ledkey, HSV_PURPLE); + } + break; + case 38: { + set_led_color_by_hsv(ledkey, HSV_GREEN); + } + break; + default: { + } + break; + } + }*/ + ledkey++; + } + // non key specific lighting instead led flag based + if (layer == _LVL7_){ + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; ++i) { + if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + set_led_color_by_hsv(i, C_HSV_DARKGOLD); + } + if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { + set_led_color_by_hsv(i, HSV_BLACK); + } + if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_KEYLIGHT)) { + set_led_color_by_layer(layer, i); + } + } + } + + return; +} + +void rgb_matrix_indicators_user(void) { + int layer = get_highest_layer(layer_state); + set_layer_color(layer); + set_caps_lock(layer); +} + +#ifdef LEADER_ENABLE +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_F) { + // Anything you can do in a macro. + SEND_STRING("QMK is awesome."); + } + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(SS_LCTL("a") SS_LCTL("c")); + } + SEQ_TWO_KEYS(KC_S, KC_S) { + SEND_STRING(SS_LCTL("v")); + } + SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { + SEND_STRING("https://start.duckduckgo.com\n"); + } + } +} +#endif diff --git a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/readme.md b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/readme.md new file mode 100644 index 0000000000..924e63cef7 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/readme.md @@ -0,0 +1,22 @@ +# p4yne's keymap for the bm65iso + +* Eight layers (DE, LYR_SW_MEDIA, MOUSE_DSKTP_NAV, DYN_MACRO_NUMPAD_LEADER, GAMING, US, US_SHIFTED, DE_FLAG_LIGHTNING) +* Different color for each layer (DRK_RED, RED, MAGENTA, PURPLE, DRK_GOLD, DRK_BLUE, BLUE, DRK_RED) +* Keys with something else defined than KC_TRNS are lit up in the layer color, so you easily can see which keys have some function defined +* Custom layer types for KC_TRNS keys to let lower layer shine through, or stay black/off +* Custom lighting based on layer, key and led flag +* Caps-Lock lights up when active +* Some leader shortcuts defined - nothing useful yet +* Some space cadet keys defined for easier insertion of () and {} +* Bootmagic lite enabled via default settings so you can plug in the keyboard while holding esc to land in bootloader mode +* Manages all this and still fits in to the program memory + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm65hsrgb_iso:p4yne + +Flashing example for this keyboard: + + make kprepublic/bm65hsrgb_iso:p4yne:flash + +Keyboard Maintainer: **[p4yne](https://github.com/p4yne)** diff --git a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/rules.mk b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/rules.mk new file mode 100644 index 0000000000..a94bdba88b --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/p4yne/rules.mk @@ -0,0 +1,23 @@ +#Features +TAP_DANCE_ENABLE = yes +SPACE_CADET_ENABLE = yes + + +MAGIC_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +LEADER_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes + +#Disabled Features +#COMBO_ENABLE = no +# Combo Key Grave and Escape +#GRAVE_ESC_ENABLE = no +# no unicode support +#UNICODE_ENABLE = no + +#Debugging +#COMMAND_ENABLE = no +#CONSOLE_ENABLE = yes + + diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev1/config.h b/keyboards/kprepublic/bm65hsrgb_iso/rev1/config.h index aafb43bb51..0b5a3bf8e4 100644 --- a/keyboards/kprepublic/bm65hsrgb_iso/rev1/config.h +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev1/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x0653 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KP Republic -#define PRODUCT BM65HSRGB_ISO - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev1/info.json b/keyboards/kprepublic/bm65hsrgb_iso/rev1/info.json index 9212c43339..02d55f9b0d 100644 --- a/keyboards/kprepublic/bm65hsrgb_iso/rev1/info.json +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev1/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "BM65HSRGB_ISO", + "keyboard_name": "BM65HSRGB ISO", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x0653", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_65_iso_blocker": { "layout": [ diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/deadolus/keymap.c b/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/deadolus/keymap.c index 46de987a68..680f79a668 100644 --- a/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/deadolus/keymap.c +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/deadolus/keymap.c @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PAUSE), _______, TO(_GREEN_), TO(_BLUE_), TO(_CYAN_), TO(_MAGENTA_), TO(_YELLOW_), _______, _______, _______, _______, _______, _______, _______, TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, - RESET, _______, _______, KC_LEAD, _______, _______, KC_MPLY, KC_VOLD, KC_MUTE + QK_BOOT, _______, _______, KC_LEAD, _______, _______, KC_MPLY, KC_VOLD, KC_MUTE ), diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/config.h b/keyboards/kprepublic/bm68hsrgb/rev1/config.h index 636ff1c785..9b9d534c42 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev1/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 //KP -#define PRODUCT_ID 0xEF6F -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM68HSRGB - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 @@ -46,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. B3, \ E6 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/info.json b/keyboards/kprepublic/bm68hsrgb/rev1/info.json index 0a72da6e98..c89d5262ba 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/info.json +++ b/keyboards/kprepublic/bm68hsrgb/rev1/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "BM68HSRGB", + "keyboard_name": "BM68HSRGB Rev1", + "manufacturer": "KPrepublic", "url": "", "maintainer": "peepeetee", + "usb": { + "vid": "0x4B50", + "pid": "0xEF6F", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_65_ansi": { "layout": [ diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/default/keymap.c b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/default/keymap.c index 878967718f..feea65f84c 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/default/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h index 0748f83cdc..3ddb813486 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h @@ -35,7 +35,6 @@ // #define MOUSEKEY_MAX_SPEED 10 // #define MOUSEKEY_WHEEL_DELAY 0 #define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap // #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/keymap.c b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/keymap.c index 934463b11f..bf842b138b 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/keymap.c +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DELETE, RGB_MOD, RGB_HUI, RGB_VAI, RGB_SAI, RGB_SPI, _______, KC_KP_7, KC_KP_8, KC_KP_9, _______, _______, _______, _______, _______, KC_PGUP, RGB_TOG, RGB_HUD, RGB_VAD, RGB_SAD, RGB_SPD, _______, KC_KP_4, KC_KP_5, KC_KP_6, _______, _______, _______, _______, KC_PGDOWN, - BL_TOGG, _______, _______, _______, _______, RESET, KC_KP_1, KC_KP_2, KC_KP_3, _______, _______, _______, KC_AUDIO_VOL_UP, KC_END, + BL_TOGG, _______, _______, _______, _______, QK_BOOT, KC_KP_1, KC_KP_2, KC_KP_3, _______, _______, _______, KC_AUDIO_VOL_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, KC_BRIGHTNESS_DOWN, KC_AUDIO_VOL_DOWN, KC_BRIGHTNESS_UP ), diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/via/keymap.c b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/via/keymap.c index 453853fc63..09df21f267 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/via/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [2] = LAYOUT_65_ansi( diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/config.h b/keyboards/kprepublic/bm68hsrgb/rev2/config.h index 900aa699cb..86fbb7ae3b 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev2/config.h @@ -18,19 +18,11 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 -#define PRODUCT_ID 0x1131 -#define DEVICE_VER 0x0002 -#define MANUFACTURER KP republic -#define PRODUCT bm68v2 - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { D6, D4, D5, D3, F6 } #define MATRIX_COL_PINS { F0, F1, B0, B1, B2, B3, E6, B7, D2, D7, B4, B5, B6, C6, C7} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/info.json b/keyboards/kprepublic/bm68hsrgb/rev2/info.json index 23a4d4d38f..4239947cdb 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm68hsrgb/rev2/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "bm68hsrgb/rev2", + "keyboard_name": "BM68HSRGB Rev2", + "manufacturer": "KPrepublic", "url": "", "maintainer": "bdtc123", + "usb": { + "vid": "0x4B50", + "pid": "0x1131", + "device_version": "0.0.2" + }, "layouts": { "LAYOUT_65_ansi": { "layout": [ diff --git a/keyboards/kprepublic/bm80hsrgb/config.h b/keyboards/kprepublic/bm80hsrgb/config.h index 7adc89720d..049aca9b8a 100644 --- a/keyboards/kprepublic/bm80hsrgb/config.h +++ b/keyboards/kprepublic/bm80hsrgb/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 //KP -#define PRODUCT_ID 0xEF83 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM80HSRGB - /* key matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 17 @@ -42,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B1, B0, C6, C7 } #define MATRIX_COL_PINS { F0, F1, F4, D7, D6, D4, D5, D3, D2, F5, F6, F7, D1, D0, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm80hsrgb/info.json b/keyboards/kprepublic/bm80hsrgb/info.json index f46024a93f..d05e4c5c34 100644 --- a/keyboards/kprepublic/bm80hsrgb/info.json +++ b/keyboards/kprepublic/bm80hsrgb/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "BM80HSRGB", + "manufacturer": "KPRepublic", "url": "", "maintainer": "peepeetee", + "usb": { + "vid": "0x4B50", + "pid": "0xEF83", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_tkl_ansi": { "layout": [ diff --git a/keyboards/kprepublic/bm80hsrgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm80hsrgb/keymaps/default/keymap.c index 0f0467060b..e84b2b5d53 100644 --- a/keyboards/kprepublic/bm80hsrgb/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm80hsrgb/keymaps/default/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h index b322afae9b..97cae26cbd 100644 --- a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h +++ b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h @@ -22,7 +22,6 @@ // #define TERMINAL_HELP #define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too // #define TAPPING_TERM_PER_KEY // Enables handling for per key TAPPING_TERM settings diff --git a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/keymap.c b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/keymap.c index d4a188089b..38024a0911 100644 --- a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/keymap.c +++ b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_VAI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_VAD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, KC_AUDIO_VOL_UP, + _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, KC_AUDIO_VOL_UP, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRIGHTNESS_DOWN, KC_AUDIO_VOL_DOWN, KC_BRIGHTNESS_UP ) diff --git a/keyboards/kprepublic/bm80hsrgb/keymaps/via/keymap.c b/keyboards/kprepublic/bm80hsrgb/keymaps/via/keymap.c index 824f671ece..40354e785b 100644 --- a/keyboards/kprepublic/bm80hsrgb/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm80hsrgb/keymaps/via/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/kprepublic/bm80v2/bm80v2.c b/keyboards/kprepublic/bm80v2/bm80v2.c new file mode 100644 index 0000000000..4b8e5af13f --- /dev/null +++ b/keyboards/kprepublic/bm80v2/bm80v2.c @@ -0,0 +1,149 @@ +/* Copyright 2022 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/>. + */ +#include "bm80v2.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS6_SW1, CS5_SW1, CS4_SW1}, + {0, CS6_SW3, CS5_SW3, CS4_SW3}, + {0, CS6_SW4, CS5_SW4, CS4_SW4}, + {0, CS6_SW5, CS5_SW5, CS4_SW5}, + {0, CS6_SW6, CS5_SW6, CS4_SW6}, + {0, CS6_SW7, CS5_SW7, CS4_SW7}, + {0, CS6_SW8, CS5_SW8, CS4_SW8}, + {0, CS6_SW9, CS5_SW9, CS4_SW9}, + {0, CS21_SW1, CS20_SW1, CS19_SW1}, + {0, CS21_SW2, CS20_SW2, CS19_SW2}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW5, CS20_SW5, CS19_SW5}, + {0, CS21_SW6, CS20_SW6, CS19_SW6}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + {0, CS21_SW8, CS20_SW8, CS19_SW8}, + + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS9_SW9, CS8_SW9, CS7_SW9}, + {0,CS24_SW1, CS23_SW1, CS22_SW1}, + {0,CS24_SW2, CS23_SW2, CS22_SW2}, + {0,CS24_SW3, CS23_SW3, CS22_SW3}, + {0,CS24_SW4, CS23_SW4, CS22_SW4}, + {0,CS24_SW5, CS23_SW5, CS22_SW5}, + {0,CS24_SW6, CS23_SW6, CS22_SW6}, + {0,CS24_SW7, CS23_SW7, CS22_SW7}, + {0,CS24_SW8, CS23_SW8, CS22_SW8}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS12_SW9, CS11_SW9, CS10_SW9}, + {0, CS27_SW1, CS26_SW1, CS25_SW1}, + {0, CS27_SW2, CS26_SW2, CS25_SW2}, + {0, CS27_SW3, CS26_SW3, CS25_SW3}, + {0, CS27_SW4, CS26_SW4, CS25_SW4}, + {0, CS27_SW5, CS26_SW5, CS25_SW5}, + {0, CS27_SW6, CS26_SW6, CS25_SW6}, + {0, CS27_SW7, CS26_SW7, CS25_SW7}, + {0, CS27_SW8, CS26_SW8, CS25_SW8}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS15_SW2, CS14_SW2, CS13_SW2}, + {0, CS15_SW3, CS14_SW3, CS13_SW3}, + {0, CS15_SW4, CS14_SW4, CS13_SW4}, + {0, CS15_SW5, CS14_SW5, CS13_SW5}, + {0, CS15_SW6, CS14_SW6, CS13_SW6}, + {0, CS15_SW7, CS14_SW7, CS13_SW7}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS15_SW9, CS14_SW9, CS13_SW9}, + {0, CS30_SW1, CS29_SW1, CS28_SW1}, + {0, CS30_SW2, CS29_SW2, CS28_SW2}, + {0, CS30_SW3, CS29_SW3, CS28_SW3}, + {0, CS30_SW4, CS29_SW4, CS28_SW4}, + + {0, CS18_SW1, CS17_SW1, CS16_SW1}, + {0, CS18_SW3, CS17_SW3, CS16_SW3}, + {0, CS18_SW4, CS17_SW4, CS16_SW4}, + {0, CS18_SW5, CS17_SW5, CS16_SW5}, + {0, CS18_SW6, CS17_SW6, CS16_SW6}, + {0, CS18_SW7, CS17_SW7, CS16_SW7}, + {0, CS18_SW8, CS17_SW8, CS16_SW8}, + {0, CS18_SW9, CS17_SW9, CS16_SW9}, + {0, CS33_SW1, CS32_SW1, CS31_SW1}, + {0, CS33_SW2, CS32_SW2, CS31_SW2}, + {0, CS33_SW3, CS32_SW3, CS31_SW3}, + {0, CS33_SW4, CS32_SW4, CS31_SW4}, + {0, CS33_SW7, CS32_SW7, CS31_SW7}, + + {0, CS3_SW1, CS2_SW1, CS1_SW1}, + {0, CS3_SW2, CS2_SW2, CS1_SW2}, + {0, CS3_SW3, CS2_SW3, CS1_SW3}, + {0, CS3_SW6, CS2_SW6, CS1_SW6}, + {0, CS36_SW2, CS35_SW2, CS34_SW2}, + {0, CS36_SW3, CS35_SW3, CS34_SW3}, + {0, CS36_SW4, CS35_SW4, CS34_SW4}, + {0, CS36_SW5, CS35_SW5, CS34_SW5}, + {0, CS36_SW6, CS35_SW6, CS34_SW6}, + {0, CS36_SW7, CS35_SW7, CS34_SW7}, + {0, CS36_SW8, CS35_SW8, CS34_SW8} + +}; +led_config_t g_led_config = { { + { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 }, + { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 }, + { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, NO_LED, NO_LED, NO_LED, NO_LED }, + { 63, NO_LED, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, NO_LED, NO_LED, 75, NO_LED }, + { 76, 77, 78, NO_LED,NO_LED, 79, NO_LED, NO_LED, NO_LED, NO_LED, 80, 81, 82, 83, 84, 85, 86 } +}, +{ + { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, + { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, { 217, 20 }, + { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 }, { 217, 30 }, + { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, + { 17, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, + { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 } +}, +{ 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 +} }; + + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (host_keyboard_led_state().caps_lock) + { + rgb_matrix_set_color(50, 0xFF, 0xFF, 0xFF); + } +} +#endif + diff --git a/keyboards/kprepublic/bm80v2/bm80v2.h b/keyboards/kprepublic/bm80v2/bm80v2.h new file mode 100644 index 0000000000..ee1418f9cf --- /dev/null +++ b/keyboards/kprepublic/bm80v2/bm80v2.h @@ -0,0 +1,34 @@ +/* Copyright 2022 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 "quantum.h" + +#define LAYOUT_tkl_ansi( \ + K0_0, K0_2, K0_3, K0_4, K0_5, K0_6,K0_7, K0_8, K0_9, K0_A, K0_B, K0_C, K0_D, K0_E, K0_F, K0_10, \ + K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9, K1_A, K1_B, K1_C, K1_D, K1_E, K1_F, K1_10, \ + K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9, K2_A, K2_B, K2_C, K2_D, K2_E, K2_F, K2_10, \ + K3_0, K3_1, K3_2, K3_3, K3_4, K3_5, K3_6, K3_7, K3_8, K3_9, K3_A, K3_B, K3_C, \ + K4_0, K4_2, K4_3, K4_4, K4_5, K4_6, K4_7, K4_8, K4_9, K4_A, K4_B, K4_C, K4_F, \ + K5_0, K5_1, K5_2, K5_5, K5_A, K5_B, K5_C, K5_D, K5_E, K5_F, K5_10 \ +) { \ + { K0_0, KC_NO, K0_2, K0_3, K0_4, K0_5, K0_6, K0_7, K0_8, K0_9, K0_A, K0_B, K0_C, K0_D, K0_E, K0_F, K0_10 }, \ + { K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9, K1_A, K1_B, K1_C, K1_D, K1_E, K1_F, K1_10 }, \ + { K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9, K2_A, K2_B, K2_C, K2_D, K2_E, K2_F, K2_10 }, \ + { K3_0, K3_1, K3_2, K3_3, K3_4, K3_5, K3_6, K3_7, K3_8, K3_9, K3_A, K3_B, K3_C, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K4_0, KC_NO, K4_2, K4_3, K4_4, K4_5, K4_6, K4_7, K4_8, K4_9, K4_A, K4_B, K4_C, KC_NO, KC_NO, K4_F, KC_NO }, \ + { K5_0, K5_1, K5_2, KC_NO, KC_NO, K5_5, KC_NO, KC_NO, KC_NO, KC_NO, K5_A, K5_B, K5_C, K5_D, K5_E, K5_F, K5_10 } \ +} + diff --git a/keyboards/kprepublic/bm80v2/config.h b/keyboards/kprepublic/bm80v2/config.h new file mode 100644 index 0000000000..f04ec1d960 --- /dev/null +++ b/keyboards/kprepublic/bm80v2/config.h @@ -0,0 +1,75 @@ +/* Copyright 2022 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" + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 +#define MATRIX_ROW_PINS { C7, C6, B6, F5, F7, F6 } +#define MATRIX_COL_PINS { E6, F0, F1, F4, D7, D6, B7, B1, B0, B2, B3, D3, D5, D4, D2, B4, B5 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#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_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_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +// 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_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_ADDR_1 0b0110000 +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 87 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 diff --git a/keyboards/kprepublic/bm80v2/info.json b/keyboards/kprepublic/bm80v2/info.json new file mode 100644 index 0000000000..38999bf96c --- /dev/null +++ b/keyboards/kprepublic/bm80v2/info.json @@ -0,0 +1,109 @@ +{ + "keyboard_name": "BM80v2", + "manufacturer": "KPrepublic", + "url": "", + "maintainer": "edwardslau", + "usb": { + "vid": "0x4B50", + "pid": "0x1141", + "device_version": "0.0.2" + }, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"Print Screen", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"`~", "x":0, "y":1.5}, + {"label":"1!", "x":1, "y":1.5}, + {"label":"2@", "x":2, "y":1.5}, + {"label":"3#", "x":3, "y":1.5}, + {"label":"4$", "x":4, "y":1.5}, + {"label":"5%", "x":5, "y":1.5}, + {"label":"6^", "x":6, "y":1.5}, + {"label":"7&", "x":7, "y":1.5}, + {"label":"8*", "x":8, "y":1.5}, + {"label":"9(", "x":9, "y":1.5}, + {"label":"0)", "x":10, "y":1.5}, + {"label":"-_", "x":11, "y":1.5}, + {"label":"=+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"[{", "x":11.5, "y":2.5}, + {"label":"]}", "x":12.5, "y":2.5}, + {"label":"\\|", "x":13.5,"y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"Page Down", "x":17.25, "y":2.5}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":";:", "x":10.75, "y":3.5}, + {"label":"'\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",<", "x":9.25, "y":4.5}, + {"label":".>", "x":10.25, "y":4.5}, + {"label":"/?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"GUI", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/kprepublic/bm80v2/keymaps/default/keymap.c b/keyboards/kprepublic/bm80v2/keymaps/default/keymap.c new file mode 100644 index 0000000000..11cf4e1137 --- /dev/null +++ b/keyboards/kprepublic/bm80v2/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +// Copyright 2021 Yizhen Liu (@edwardslau) +// SPDX-License-Identifier: GPL-2.0 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl_ansi( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/kprepublic/bm80v2/keymaps/via/keymap.c b/keyboards/kprepublic/bm80v2/keymaps/via/keymap.c new file mode 100644 index 0000000000..11cf4e1137 --- /dev/null +++ b/keyboards/kprepublic/bm80v2/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +// Copyright 2021 Yizhen Liu (@edwardslau) +// SPDX-License-Identifier: GPL-2.0 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl_ansi( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/kprepublic/bm80v2/keymaps/via/rules.mk b/keyboards/kprepublic/bm80v2/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/kprepublic/bm80v2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kprepublic/bm80v2/readme.md b/keyboards/kprepublic/bm80v2/readme.md new file mode 100644 index 0000000000..72ff25909f --- /dev/null +++ b/keyboards/kprepublic/bm80v2/readme.md @@ -0,0 +1,20 @@ +# bm80v2 + +A 80% hotswap inswitch RGB keyboard. + +* Keyboard Maintainer: [edwardslau](https://github.com/edwardslau) +* Hardware Supported: BM80V2 +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm80rgb-bm80-rgb-80-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c?_pos=7&_sid=767c48383&_ss=r) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic bm80v2:default + +Flashing example for this keyboard: + + make kprepublic bm80v2:default:flash + +## Bootloader +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead + +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/kprepublic/bm80v2/rules.mk b/keyboards/kprepublic/bm80v2/rules.mk new file mode 100644 index 0000000000..1632311563 --- /dev/null +++ b/keyboards/kprepublic/bm80v2/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Light +MOUSEKEY_ENABLE = no # 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 = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes # Use RGB matrix +RGB_MATRIX_DRIVER = IS31FL3741 +LTO_ENABLE = yes +LAYOUTS = tkl_ansi diff --git a/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c new file mode 100644 index 0000000000..90d476aa2c --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c @@ -0,0 +1,150 @@ +/* Copyright 2022 edwardslau * + * 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 "bm80v2_iso.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS6_SW1, CS5_SW1, CS4_SW1}, + {0, CS6_SW3, CS5_SW3, CS4_SW3}, + {0, CS6_SW4, CS5_SW4, CS4_SW4}, + {0, CS6_SW5, CS5_SW5, CS4_SW5}, + {0, CS6_SW6, CS5_SW6, CS4_SW6}, + {0, CS6_SW7, CS5_SW7, CS4_SW7}, + {0, CS6_SW8, CS5_SW8, CS4_SW8}, + {0, CS6_SW9, CS5_SW9, CS4_SW9}, + {0, CS21_SW1, CS20_SW1, CS19_SW1}, + {0, CS21_SW2, CS20_SW2, CS19_SW2}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW5, CS20_SW5, CS19_SW5}, + {0, CS21_SW6, CS20_SW6, CS19_SW6}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + {0, CS21_SW8, CS20_SW8, CS19_SW8}, + + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS9_SW9, CS8_SW9, CS7_SW9}, + {0,CS24_SW1, CS23_SW1, CS22_SW1}, + {0,CS24_SW2, CS23_SW2, CS22_SW2}, + {0,CS24_SW3, CS23_SW3, CS22_SW3}, + {0,CS24_SW4, CS23_SW4, CS22_SW4}, + {0,CS24_SW5, CS23_SW5, CS22_SW5}, + {0,CS24_SW6, CS23_SW6, CS22_SW6}, + {0,CS24_SW7, CS23_SW7, CS22_SW7}, + {0,CS24_SW8, CS23_SW8, CS22_SW8}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS12_SW9, CS11_SW9, CS10_SW9}, + {0, CS27_SW1, CS26_SW1, CS25_SW1}, + {0, CS27_SW2, CS26_SW2, CS25_SW2}, + {0, CS27_SW3, CS26_SW3, CS25_SW3}, + {0, CS27_SW4, CS26_SW4, CS25_SW4}, + {0, CS27_SW5, CS26_SW5, CS25_SW5}, + {0, CS27_SW6, CS26_SW6, CS25_SW6}, + {0, CS27_SW7, CS26_SW7, CS25_SW7}, + {0, CS27_SW8, CS26_SW8, CS25_SW8}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS15_SW2, CS14_SW2, CS13_SW2}, + {0, CS15_SW3, CS14_SW3, CS13_SW3}, + {0, CS15_SW4, CS14_SW4, CS13_SW4}, + {0, CS15_SW5, CS14_SW5, CS13_SW5}, + {0, CS15_SW6, CS14_SW6, CS13_SW6}, + {0, CS15_SW7, CS14_SW7, CS13_SW7}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS15_SW9, CS14_SW9, CS13_SW9}, + {0, CS30_SW1, CS29_SW1, CS28_SW1}, + {0, CS30_SW2, CS29_SW2, CS28_SW2}, + {0, CS30_SW3, CS29_SW3, CS28_SW3}, + {0, CS30_SW4, CS29_SW4, CS28_SW4}, + + {0, CS18_SW1, CS17_SW1, CS16_SW1}, + {0, CS18_SW2, CS17_SW2, CS16_SW2}, + {0, CS18_SW3, CS17_SW3, CS16_SW3}, + {0, CS18_SW4, CS17_SW4, CS16_SW4}, + {0, CS18_SW5, CS17_SW5, CS16_SW5}, + {0, CS18_SW6, CS17_SW6, CS16_SW6}, + {0, CS18_SW7, CS17_SW7, CS16_SW7}, + {0, CS18_SW8, CS17_SW8, CS16_SW8}, + {0, CS18_SW9, CS17_SW9, CS16_SW9}, + {0, CS33_SW1, CS32_SW1, CS31_SW1}, + {0, CS33_SW2, CS32_SW2, CS31_SW2}, + {0, CS33_SW3, CS32_SW3, CS31_SW3}, + {0, CS33_SW4, CS32_SW4, CS31_SW4}, + {0, CS33_SW7, CS32_SW7, CS31_SW7}, + + {0, CS3_SW1, CS2_SW1, CS1_SW1}, + {0, CS3_SW2, CS2_SW2, CS1_SW2}, + {0, CS3_SW3, CS2_SW3, CS1_SW3}, + {0, CS3_SW6, CS2_SW6, CS1_SW6}, + {0, CS36_SW2, CS35_SW2, CS34_SW2}, + {0, CS36_SW3, CS35_SW3, CS34_SW3}, + {0, CS36_SW4, CS35_SW4, CS34_SW4}, + {0, CS36_SW5, CS35_SW5, CS34_SW5}, + {0, CS36_SW6, CS35_SW6, CS34_SW6}, + {0, CS36_SW7, CS35_SW7, CS34_SW7}, + {0, CS36_SW8, CS35_SW8, CS34_SW8} + +}; +led_config_t g_led_config = { { + { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 }, + { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 }, + { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, NO_LED, NO_LED, NO_LED, NO_LED }, + { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, NO_LED, NO_LED, 76, NO_LED }, + { 77, 78, 79, NO_LED,NO_LED, 80, NO_LED, NO_LED, NO_LED, NO_LED, 81, 82, 83, 84, 85, 86, 87 } +}, +{ + { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, + { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, { 217, 20 }, + { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 175, 35 }, { 193, 30 }, { 205, 30 }, { 217, 30 }, + { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, + { 8, 49 }, { 22, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, + { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 } +}, +{ 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 +} }; + + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (host_keyboard_led_state().caps_lock) + { + rgb_matrix_set_color(50, 0xFF, 0xFF, 0xFF); + } +} +#endif + diff --git a/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.h b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.h new file mode 100644 index 0000000000..cee54e83e8 --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.h @@ -0,0 +1,36 @@ +/* Copyright 2022 edwardslau * + * 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 ___ KC_NO + +#define LAYOUT_tkl_iso( \ + K00, K02, K03, K04, K05, K06,K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K2D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \ + K50, K51, K52, K55, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, ___, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, ___, ___, ___ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, ___, ___, K4F, ___ }, \ + { K50, K51, K52, ___, ___, K55, ___, ___, ___, ___, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ +} + diff --git a/keyboards/kprepublic/bm80v2_iso/config.h b/keyboards/kprepublic/bm80v2_iso/config.h new file mode 100644 index 0000000000..aee11c42c9 --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/config.h @@ -0,0 +1,76 @@ +/* Copyright 2022 edwardslau * + * 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" + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 +#define MATRIX_ROW_PINS { C7, C6, B6, F5, F7, F6 } +#define MATRIX_COL_PINS { E6, F0, F1, F4, D7, D6, B7, B1, B0, B2, B3, D3, D5, D4, D2, B4, B5 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 +/* disable these deprecated features by default */ +#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 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#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_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_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +// 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_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_ADDR_1 0b0110000 +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 88 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 diff --git a/keyboards/kprepublic/bm80v2_iso/info.json b/keyboards/kprepublic/bm80v2_iso/info.json new file mode 100644 index 0000000000..71741c126b --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/info.json @@ -0,0 +1,110 @@ +{ + "keyboard_name": "BM80v2 ISO", + "manufacturer": "KPrepublic", + "url": "", + "maintainer": "edwardslau", + "usb": { + "vid": "0x4B50", + "pid": "0x1142", + "device_version": "0.0.2" + }, + "layouts": { + "LAYOUT_tkl_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1.5}, + {"x":1, "y":1.5}, + {"x":2, "y":1.5}, + {"x":3, "y":1.5}, + {"x":4, "y":1.5}, + {"x":5, "y":1.5}, + {"x":6, "y":1.5}, + {"x":7, "y":1.5}, + {"x":8, "y":1.5}, + {"x":9, "y":1.5}, + {"x":10, "y":1.5}, + {"x":11, "y":1.5}, + {"x":12, "y":1.5}, + {"x":13, "y":1.5, "w":2}, + {"x":15.25, "y":1.5}, + {"x":16.25, "y":1.5}, + {"x":17.25, "y":1.5}, + + {"x":0, "y":2.5, "w":1.5}, + {"x":1.5, "y":2.5}, + {"x":2.5, "y":2.5}, + {"x":3.5, "y":2.5}, + {"x":4.5, "y":2.5}, + {"x":5.5, "y":2.5}, + {"x":6.5, "y":2.5}, + {"x":7.5, "y":2.5}, + {"x":8.5, "y":2.5}, + {"x":9.5, "y":2.5}, + {"x":10.5, "y":2.5}, + {"x":11.5, "y":2.5}, + {"x":12.5, "y":2.5}, + {"x":15.25, "y":2.5}, + {"x":16.25, "y":2.5}, + {"x":17.25, "y":2.5}, + + {"x":0, "y":3.5, "w":1.75}, + {"x":1.75, "y":3.5}, + {"x":2.75, "y":3.5}, + {"x":3.75, "y":3.5}, + {"x":4.75, "y":3.5}, + {"x":5.75, "y":3.5}, + {"x":6.75, "y":3.5}, + {"x":7.75, "y":3.5}, + {"x":8.75, "y":3.5}, + {"x":9.75, "y":3.5}, + {"x":10.75, "y":3.5}, + {"x":11.75, "y":3.5}, + {"x":12.75, "y":3.5}, + {"x":13.75, "y":2.5, "w":1.25, "h":2}, + + {"x":0, "y":4.5, "w":1.25}, + {"x":1.25, "y":4.5}, + {"x":2.25, "y":4.5}, + {"x":3.25, "y":4.5}, + {"x":4.25, "y":4.5}, + {"x":5.25, "y":4.5}, + {"x":6.25, "y":4.5}, + {"x":7.25, "y":4.5}, + {"x":8.25, "y":4.5}, + {"x":9.25, "y":4.5}, + {"x":10.25, "y":4.5}, + {"x":11.25, "y":4.5}, + {"x":12.25, "y":4.5, "w":2.75}, + {"x":16.25, "y":4.5}, + + {"x":0, "y":5.5, "w":1.25}, + {"x":1.25, "y":5.5, "w":1.25}, + {"x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"x":10, "y":5.5, "w":1.25}, + {"x":11.25, "y":5.5, "w":1.25}, + {"x":12.5, "y":5.5, "w":1.25}, + {"x":13.75, "y":5.5, "w":1.25}, + {"x":15.25, "y":5.5}, + {"x":16.25, "y":5.5}, + {"x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/kprepublic/bm80v2_iso/keymaps/default/keymap.c b/keyboards/kprepublic/bm80v2_iso/keymaps/default/keymap.c new file mode 100644 index 0000000000..5e6f21f0d4 --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +// Copyright 2021 Yizhen Liu (@edwardslau) +// SPDX-License-Identifier: GPL-2.0 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_iso( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl_iso( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/kprepublic/bm80v2_iso/keymaps/via/keymap.c b/keyboards/kprepublic/bm80v2_iso/keymaps/via/keymap.c new file mode 100644 index 0000000000..5e6f21f0d4 --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +// Copyright 2021 Yizhen Liu (@edwardslau) +// SPDX-License-Identifier: GPL-2.0 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_iso( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl_iso( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/kprepublic/bm80v2_iso/keymaps/via/rules.mk b/keyboards/kprepublic/bm80v2_iso/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kprepublic/bm80v2_iso/readme.md b/keyboards/kprepublic/bm80v2_iso/readme.md new file mode 100644 index 0000000000..bb5d8e3728 --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/readme.md @@ -0,0 +1,21 @@ +# bm80v2_iso + +A 80% ISO hotswap inswitch RGB keyboard. + +* Keyboard Maintainer: [edwardslau](https://github.com/edwardslau) +* Hardware Supported: BM80V2_ISO +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm80-iso-bm80rgb-80-rgb-hot-swappable-custom-mechanical-keyboard-pcb-programmed-rgb-switch-underglow-type-c-qmk-via?_pos=9&_sid=b43edd6ac&_ss=r) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm80v2_iso:default + +Flashing example for this keyboard: + + make kprepublic/bm80v2_iso:default:flash + +## Bootloader + +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead + +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/kprepublic/bm80v2_iso/rules.mk b/keyboards/kprepublic/bm80v2_iso/rules.mk new file mode 100644 index 0000000000..e726773958 --- /dev/null +++ b/keyboards/kprepublic/bm80v2_iso/rules.mk @@ -0,0 +1,25 @@ +# 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 = no # 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 = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +RGB_MATRIX_ENABLE = yes # Use RGB matrix +RGB_MATRIX_DRIVER = IS31FL3741 + +LTO_ENABLE = yes + +LAYOUTS = tkl_iso diff --git a/keyboards/kprepublic/bm980hsrgb/config.h b/keyboards/kprepublic/bm980hsrgb/config.h index 01266e652c..af7e3f3be3 100644 --- a/keyboards/kprepublic/bm980hsrgb/config.h +++ b/keyboards/kprepublic/bm980hsrgb/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 //KP -#define PRODUCT_ID 0xEF61 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPrepublic -#define PRODUCT bm980rgb - /* key matrix size */ #define MATRIX_ROWS 7 #define MATRIX_COLS 15 @@ -42,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, B6, B5, B4, F7, F6, D7 } #define MATRIX_COL_PINS { B1, B2, B3, B7, D0, D1, D2, D3, D5, E6, F0, F1, F4, F5, D6 } -// #define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm980hsrgb/info.json b/keyboards/kprepublic/bm980hsrgb/info.json index 459b98a089..ba8173c6c8 100644 --- a/keyboards/kprepublic/bm980hsrgb/info.json +++ b/keyboards/kprepublic/bm980hsrgb/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "BM980", + "keyboard_name": "BM980 Hotswap RGB", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0xEF61", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/kprepublic/bm980hsrgb/keymaps/peepeetee/keymap.c b/keyboards/kprepublic/bm980hsrgb/keymaps/peepeetee/keymap.c index 9d6c64b33f..80deedc7b5 100644 --- a/keyboards/kprepublic/bm980hsrgb/keymaps/peepeetee/keymap.c +++ b/keyboards/kprepublic/bm980hsrgb/keymaps/peepeetee/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_VAI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_VAD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/kprepublic/cospad/config.h b/keyboards/kprepublic/cospad/config.h index bc53ef6206..895cc57a0d 100644 --- a/keyboards/kprepublic/cospad/config.h +++ b/keyboards/kprepublic/cospad/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B5C // "KP" -#define PRODUCT_ID 0xB1E5 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPrepublic -#define PRODUCT Cospad - /* key matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 4 @@ -42,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/cospad/info.json b/keyboards/kprepublic/cospad/info.json index bba19a4379..3009e986fa 100644 --- a/keyboards/kprepublic/cospad/info.json +++ b/keyboards/kprepublic/cospad/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "Cospad", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B5C", + "pid": "0xB1E5", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_ortho_6x4": { "layout": [ diff --git a/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c b/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c index af56305e5c..77c6ea8424 100644 --- a/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c +++ b/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c @@ -266,12 +266,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_SAD, BL_ON, COLEMAK, \ RGB_SAI, RGB_TOG, DVORAK, _______, \ RGB_HUD, RGB_MOD, KC_VOLD, _______, \ - RGB_HUI, RGB_RMOD, KC_VOLU, RESET), + RGB_HUI, RGB_RMOD, KC_VOLU, QK_BOOT), }; // Makes sure to update the good tri-layer if a layer changes layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY_LAYER: state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); break; @@ -289,8 +289,8 @@ layer_state_t layer_state_set_user(layer_state_t state) { } // Makes the tri-layer -uint32_t default_layer_state_set_kb(uint32_t state) { - switch (biton32(state)) { +layer_state_t default_layer_state_set_kb(layer_state_t state) { + switch (get_highest_layer(state)) { case _QWERTY_LAYER: state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); diff --git a/keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c b/keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c index dd2ff00cd1..d780a583e1 100644 --- a/keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c +++ b/keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c @@ -76,6 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_HUD, RGB_HUI, BL_ON, _______, RGB_SAD, RGB_SAI, BL_OFF, _______, RGB_VAD, RGB_VAI, BL_STEP, - _______, _______, RESET, _______ + _______, _______, QK_BOOT, _______ ) }; diff --git a/keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c b/keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c index 3a0c7d6e4e..cd64e0c9ec 100644 --- a/keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c +++ b/keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c @@ -76,6 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_HUD, RGB_HUI, BL_ON, RGB_SAD, RGB_SAI, BL_OFF, _______, RGB_VAD, RGB_VAI, BL_STEP, - _______, _______, RESET, _______ + _______, _______, QK_BOOT, _______ ) }; diff --git a/keyboards/kprepublic/jj40/config.h b/keyboards/kprepublic/jj40/config.h index c42b247d1a..d24ab5c5ff 100644 --- a/keyboards/kprepublic/jj40/config.h +++ b/keyboards/kprepublic/jj40/config.h @@ -16,12 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x0040 -#define DEVICE_VER 0x0200 -#define MANUFACTURER KPrepublic -#define PRODUCT JJ40 - /* matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 diff --git a/keyboards/kprepublic/jj40/info.json b/keyboards/kprepublic/jj40/info.json index 4b7c527ba9..a248f0cee7 100644 --- a/keyboards/kprepublic/jj40/info.json +++ b/keyboards/kprepublic/jj40/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "jj40", + "keyboard_name": "JJ40", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x0040", + "device_version": "2.0.0" + }, "layouts": { "LAYOUT_planck_mit": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] diff --git a/keyboards/kprepublic/jj40/keymaps/brdlf/keymap.c b/keyboards/kprepublic/jj40/keymaps/brdlf/keymap.c new file mode 100644 index 0000000000..625961ae23 --- /dev/null +++ b/keyboards/kprepublic/jj40/keymaps/brdlf/keymap.c @@ -0,0 +1,168 @@ +/* Copyright 2022 Abigail Fassl + * + * 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 + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) +#define FUN MO(_FUNC) +#define MOUSE MO(_MOUSE) + +enum layers { + _QWERTY = 0, + _FUNC, + _LOWER, + _RAISE, + _ADJUST, + _MOUSE, + _NUMPAD +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc* | Q | W | E | R | T | Y | U | I | O | P | Ent | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ;: | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Func |Lower |Space | Bksp |Raise | DEL | Bksl | NUM | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + LT(_NUMPAD, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT , + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT , + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT , + KC_LCTL, KC_LALT, KC_LGUI, FUN, LOWER, KC_SPC, KC_BSPC, RAISE, KC_DEL, KC_BSLS, TG(_NUMPAD), KC_RCTL +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| | | _ | - | + | = | \| | [{ | ]} | |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ___ | ___ | ___ | ___ | ___ |Space | Bksp |Mouse | DEL | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = LAYOUT_ortho_4x12( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 , + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LSFT(KC_GRV), KC_INSERT , + KC_LSHIFT, KC_NO, KC_NO, LSFT(KC_MINS), KC_MINS, LSFT(KC_EQL), KC_EQL, KC_BSLS, KC_LBRC, KC_RBRC, KC_NO, KC_RSHIFT , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | 1! | 2@ | 3# | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ! | @ | # | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| PSCRN| | | \| | _ | - | + | = | |BL ON | BLSP |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | | | ADJ | | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC , + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LCTL(KC_DEL), LCTL(KC_BSPC) , + KC_LSFT, KC_PSCR, S(KC_NUHS), KC_BSLS, LSFT(KC_MINS), KC_MINS, LSFT(KC_EQL), KC_EQL, _______, BL_ON, BL_STEP, KC_RSFT , + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | \| | | [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | _ | = | ( | ) | | | HOME | UP | END | |ZOOM +| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | - | + | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | ADJ | |CtrlBk|Raise |CtrlDl| | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_BSLS, KC_NO, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_PGUP, KC_HOME, KC_PGDOWN, KC_NO, KC_PSCREEN , + LSFT(KC_BSLS), LSFT(KC_MINS), KC_EQL, LSFT(KC_9), LSFT(KC_0), KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_NO, LCTL(LSFT(KC_EQL)) , + LSFT(KC_GRV), KC_MINS, LSFT(KC_EQL), LSFT(KC_LBRC), LSFT(KC_RBRC), KC_NO, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) , + _______, _______, _______, _______, _______, KC_SPC, LCTL(KC_BSPC), _______, LCTL(KC_DEL), _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | Reset| | | BLON| BLOFF| | | | | | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | RGB | MODE | VAD | VAI | | | Vol- | Vol+ | Play | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | HUD | HUI | SAD | SAI | | | Prev | Next | Mute | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + QK_BOOT, KC_NO, KC_NO, BL_ON, BL_OFF, KC_NO, KC_NO, _______, _______, _______, _______, KC_DEL , + KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, KC_NO, KC_NO, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ , + KC_NO, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Mouse + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | | WH_L | WH_UP| BTN3 | WH_D | WH_R | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = LAYOUT_ortho_4x12( + KC_ESC , _______, _______, _______, _______, _______, KC_MS_WH_LEFT, KC_MS_WH_UP, KC_MS_BTN3, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, _______, + KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______, + KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Num Pad + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | |NMLOCK| 7 | 8 | 9 | / | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | 4 | 5 | 6 | * | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | + | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 0 | . | , | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, KC_NLCK, KC_7, KC_8, KC_9, KC_KP_SLASH, _______ , + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK, _______ , + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_KP_PLUS, KC_KP_MINUS , + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_KP_DOT, KC_COMM, _______, _______ +) + +}; + +layer_state_t layer_state_set_user (layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _FUNC, _RAISE, _MOUSE); + return state; +}
\ No newline at end of file diff --git a/keyboards/kprepublic/jj40/keymaps/brdlf/readme.md b/keyboards/kprepublic/jj40/keymaps/brdlf/readme.md new file mode 100644 index 0000000000..a08c0422c2 --- /dev/null +++ b/keyboards/kprepublic/jj40/keymaps/brdlf/readme.md @@ -0,0 +1,69 @@ +# BRDLF custom layout + +> This is my personal configuration for 4x12 ortho keyboard JJ40. + +## Layers + +### Default QWERTY + +| | | | | | | | | | | | | +| :--------: | :-----: | :------: | :------: | :-------: | :----: | :------: | :------: | :----: | :----: | :----: | :-------: | +| Esc<br>NUM | Q<br>q | W<br>w | E<br>e | R<br>r | T<br>t | Y<br>y | U<br>u | I<br>i | O<br>o | P<br>p | <br>Enter | +| <br>Tab | A<br>a | S<br>s | D<br>d | F<br>f | G<br>g | H<br>h | J<br>j | K<br>k | L<br>l | :<br>; | "<br>' | +| <br>Shift | Z<br>z | X<br>x | C<br>c | V<br>v | B<br>b | N<br>n | M<br>m | <<br>, | ><br>. | ?<br>/ | <br>Shift | +| <br>Ctrl | <br>Alt | <br>GUI | <br>Func | <br>Lower | <br>Sp | <br>Bksp | <br>Raise| <br>Del| <br>\ |<br>NUM | <br>Ctrl | + +### Function + +| | | | | | | | | | | | | +| :-------: | :-----: | :-----: | :---------: | :-------: | :-------: | :------: | :-------: | :-----: | :-----: | :------: | :------: | +| <br>F1 | <br>F2 | <br>F3 | <br>F4 | <br>F5 | <br>F6 | <br>F7 | <br>F8 | <br>F9 | <br>F10 | <br>F11 | <br>F12 | +| !<br>1 | @<br>2 | #<br>3 | \$<br>4 | %<br>5 | ^<br>6 | &<br>7 | \*<br>8 | (<br>9 | )<br>0 | <br>~ | <br>INS | +| <br>Shift | | |<br>_ | <br>- | <br>+ | <br>= | |<br>\ | {<br>[ | }<br>] | | <br>Shft | | +| <br>Ctrl | <br>Alt | <br>GUI | <br>**Fun** | <br>Lower | <br>Space | <br>Bksp | <br>Raise | <br>Del | \|<br>\ | <br>NUM | <br>Ctrl | + + +### Lower + +| | | | | | | | | | | | | +| :-------: | :----------: | :----: | :-----: | :-------: | :----: | :----: | :-----: | :----: | :-------: | :--------: | :--------: | +| !<br>1 | @<br>2 | #<br>3 | $<br>4 | %<br>5 | ^<br>6 | &<br>7 | \*<br>8 | (<br>9 | )<br>0 | <br>Del | <br>Bksp | +| <br>! | <br>@ | <br># | <br>\$ | <br>% | <br>^ | <br>& | <br>\* | <br>( | <br>) | Wrd<br>Del | Wrd<br>Bks | +| <br>Shift | Prnt<br>Scrn | <br>\| | \|<br>\ | <br>\_ | <br>- | <br>+ | <br>= | | <br>BL_ON | <br>BLSP | <br>Shift | +| | | | | **Lower** | Space | Bksp | | | Vol- | Vol+ | Play | + +### Raise + +| | | | | | | | | | | | | +| :----: | :-----: | :---: | :---: | :--------: | :-: | :----------: | :-----------: | :---------: | :-------: | :----------: | :----------: | +| <br>\` | \|<br>\ | | <br>[ | <br>] | | | <br>PgUp | <br>Home | <br>PgDn | | Prnt<br>Scrn | +| <br>\| | <br>\_ | <br>= | <br>( | <br>) | | | <br>Home | <br>Up | <br>End | | <br>Zoom + | +| <br>~ | <br>- | <br>+ | <br>{ | <br>} | | Prev<br>Word | <br>Left | <br>Down | <br>Right | Next<br>Word | <br>Zoom - | +| | | | | <br>Adjust | | Word<br>Bksp | <br>**Raise** | Word<br>Del | | | | + +### Adjust + +| | | | | | | | | | | | | +| :-------: | :---------: | :---------: | :---------: | :---------: | :----: | :-----: | :--------: | :--: | :--: | :-: | :-: | +| Reset | | | BL_ON | BL_OFF | | | | | | | DEL | +| <br>Caps | RGB<br>Togl | RGB<br>Mode | RGB<br>Brt- | RGB<br>Brt+ | | | Vol- | Vol+ | Play | | | +| | <br>Hue- | RGB<br>Hue+ | RGB<br>Sat- | RGB<br>Sat+ | | | Prev | Next | Mute | | | +| | | | | **Lower** | Space | Bksp | **Raise** | | | | | + +### Mouse + +| | | | | | | | | | | | | +| :-----: | :----: | :----: | :----------: | :---: | :---: | :------------: | :-----------: | :-------------: | :------------: | :-------------: | :-: | +| <br>ESC | | | | | | Scroll<br>Left | Scroll<br>up | Middle<br>Click | Scroll<br>Down | Scroll<br>Right | | +| Speed0 | Speed1 | Speed2 | | | | | Left<br>Click | Mouse<br>Up | Right<br>Click | | | +| Speed0 | Speed1 | Speed2 | | | | | Mouse<br>Left | Mouse<br>Down | Mouse<br>Right | | | +| | | | **Function** | Lower | Space | Bksp | **Raise** | | | | | + +### Numpad + +| | | | | | | | | | | | | +| :-: | :-: | :-: | :-: | :-: | :-: | :-----: | :-: | :-: | :-: | :-: | :-: | +| ESC | | | | | | Numlock | 7 | 8 | 9 | / | | +| | | | | | | | 4 | 5 | 6 | * | | +| | | | | | | | 1 | 2 | 3 | + | - | +| | | | | | | | 0 | . | , | | |
\ No newline at end of file diff --git a/keyboards/kprepublic/jj40/keymaps/brdlf/rules.mk b/keyboards/kprepublic/jj40/keymaps/brdlf/rules.mk new file mode 100644 index 0000000000..6c605daecf --- /dev/null +++ b/keyboards/kprepublic/jj40/keymaps/brdlf/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/kprepublic/jj40/keymaps/oscillope/keymap.c b/keyboards/kprepublic/jj40/keymaps/oscillope/keymap.c index 1a42261940..0d8adbffbc 100644 --- a/keyboards/kprepublic/jj40/keymaps/oscillope/keymap.c +++ b/keyboards/kprepublic/jj40/keymaps/oscillope/keymap.c @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Ins | | | () | [] | {} | Home | PgDn | PgUp | End | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * |RESET | Back | Fwd | | | | | | Mute | Vol- | Vol+ | | + * |QK_BOOT | Back | Fwd | | | | | | Mute | Vol- | Vol+ | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Lock | | | Prev | Stop | Play | Next | * `-----------------------------------------------------------------------------------' @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_planck_1x2uR( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \ - RESET, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \ + QK_BOOT, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \ _______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \ ), diff --git a/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h index 84c02dddd6..a4d3d37561 100644 --- a/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h +++ b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h @@ -34,8 +34,6 @@ // how long before oneshot times out #define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered - #define QMK_KEYS_PER_SCAN 4 - // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. #define COMBO_TERM 200 diff --git a/keyboards/kprepublic/jj40/keymaps/waples/keymap.c b/keyboards/kprepublic/jj40/keymaps/waples/keymap.c index 1c8d58f792..ae35e5925a 100644 --- a/keyboards/kprepublic/jj40/keymaps/waples/keymap.c +++ b/keyboards/kprepublic/jj40/keymaps/waples/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_DUAL] = LAYOUT_ortho_4x12( \ - RESET, _______, _______, _______, _______, QWERTY, DVORAK, _______, _______, RGB_HUD, RGB_TOG, RESET, \ + QK_BOOT, _______, _______, _______, _______, QWERTY, DVORAK, _______, _______, RGB_HUD, RGB_TOG, QK_BOOT, \ _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, RGB_HUI, RGB_MOD, _______, \ _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, RGB_SAD, RGB_VAD, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_VAI, _______ \ diff --git a/keyboards/kprepublic/jj4x4/config.h b/keyboards/kprepublic/jj4x4/config.h index f97dd7f1cb..d9691245a7 100644 --- a/keyboards/kprepublic/jj4x4/config.h +++ b/keyboards/kprepublic/jj4x4/config.h @@ -19,12 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x0044 // 4x4 -#define DEVICE_VER 0x0200 -#define MANUFACTURER KPrepublic -#define PRODUCT JJ4x4 - /* matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 4 diff --git a/keyboards/kprepublic/jj4x4/info.json b/keyboards/kprepublic/jj4x4/info.json index 9d07e297fc..d9b831d2a3 100644 --- a/keyboards/kprepublic/jj4x4/info.json +++ b/keyboards/kprepublic/jj4x4/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "JJ4x4", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x0044", + "device_version": "2.0.0" + }, "layouts": { "LAYOUT_ortho_4x4": { "layout": [ diff --git a/keyboards/kprepublic/jj50/config.h b/keyboards/kprepublic/jj50/config.h index 9c2d6e2417..70ecf2f20c 100644 --- a/keyboards/kprepublic/jj50/config.h +++ b/keyboards/kprepublic/jj50/config.h @@ -22,12 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x0050 -#define DEVICE_VER 0x0200 -#define MANUFACTURER KPrepublic -#define PRODUCT JJ50 - /* matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 12 diff --git a/keyboards/kprepublic/jj50/info.json b/keyboards/kprepublic/jj50/info.json index 5d84efe246..40c00718f2 100644 --- a/keyboards/kprepublic/jj50/info.json +++ b/keyboards/kprepublic/jj50/info.json @@ -1,7 +1,13 @@ { "keyboard_name": "JJ50", + "manufacturer": "KPrepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x0050", + "device_version": "2.0.0" + }, "layout_aliases": { "LAYOUT": "LAYOUT_ortho_5x12" }, diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c b/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c index e257649369..603bce7798 100644 --- a/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c +++ b/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c @@ -42,7 +42,7 @@ void keyboard_post_init_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _RAISE: rgblight_sethsv_noeeprom(170,255,255); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); @@ -126,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c index baedbb4dd2..7ea34220b3 100644 --- a/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c +++ b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c @@ -42,7 +42,7 @@ void keyboard_post_init_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _FUNC: rgblight_sethsv_noeeprom(170,255,255); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); @@ -126,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_META] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/kprepublic/jj50/keymaps/archetype/config.h b/keyboards/kprepublic/jj50/keymaps/archetype/config.h index a12e070b4f..17ce95a363 100644 --- a/keyboards/kprepublic/jj50/keymaps/archetype/config.h +++ b/keyboards/kprepublic/jj50/keymaps/archetype/config.h @@ -6,4 +6,4 @@ #define AUTO_SHIFT_TIMEOUT 150 #define NO_AUTO_SHIFT_ALPHA #define TAPPING_TERM 150 -//#define BOOTMAGIC_KEY_SALT KC_LCTL +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c b/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c index 82c615f135..ff59ef43e5 100644 --- a/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c +++ b/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c @@ -167,9 +167,18 @@ qk_tap_dance_action_t tap_dance_actions[] = { // Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT [TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset), // Layer Switcher ESC - [TD_ESC_LAYER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, layer_switcher, layer_switcher_reset, 100), + [TD_ESC_LAYER] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, layer_switcher, layer_switcher_reset), }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(TD_ESC_LAYER): + return 100; + default: + return TAPPING_TERM; + } +} + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/kprepublic/jj50/keymaps/yoonbae81/keymap.c b/keyboards/kprepublic/jj50/keymaps/yoonbae81/keymap.c index 571f93be52..adb3b727d2 100644 --- a/keyboards/kprepublic/jj50/keymaps/yoonbae81/keymap.c +++ b/keyboards/kprepublic/jj50/keymaps/yoonbae81/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_FN3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MRWD, KC_MFFD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |