From a84b175b6d0a60919127dab2a87ffd21147492f5 Mon Sep 17 00:00:00 2001 From: supjj <128263666+supjj@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:18:41 -0800 Subject: [PATCH] Add BM60hsrgb to vial (#601) * Create vial.json * Create config.h * Create rules.mk * Create keymap.c * Apply suggestions from code review Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --------- Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --- .../rev2/keymaps/vial/config.h | 82 ++++++++++ .../rev2/keymaps/vial/keymap.c | 35 ++++ .../rev2/keymaps/vial/rules.mk | 14 ++ .../rev2/keymaps/vial/vial.json | 149 ++++++++++++++++++ 4 files changed, 280 insertions(+) create mode 100644 keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/config.h create mode 100644 keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/keymap.c create mode 100644 keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/rules.mk create mode 100644 keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/vial.json diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/config.h new file mode 100644 index 00000000000..47a3013e7d9 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/config.h @@ -0,0 +1,82 @@ +/* Copyright 2021 bdtc123 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +// Vial settings +#define VIAL_KEYBOARD_UID {0x1E, 0x4C, 0xE6, 0x17, 0xCB, 0x4A, 0x21, 0x14} + +// unlock keys unlock using ESC and Q +#define VIAL_UNLOCK_COMBO_ROWS {0, 1} +#define VIAL_UNLOCK_COMBO_COLS {0, 1} + +// tweaks to firmware size +#define VIAL_TAP_DANCE_ENTRIES 4 +#define VIAL_COMBO_ENTRIES 2 +#define VIAL_KEY_OVERRIDE_ENTRIES 2 + +#define NO_ACTION_TAPPING +#define NO_ACTION_ONESHOT +#define VIALRGB_NO_DIRECT + +//prior to compiling commenting out the undef lighting animations will add them to the firmware, final size of the firmware will be affected + +#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_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +//#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#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_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_FRACTAL +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef ENABLE_RGB_MATRIX_PIXEL_RAIN + +//#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#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_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/keymap.c new file mode 100644 index 00000000000..dac3e07c7cf --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2021 bdtc123 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL + ), + [1] = 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, QK_BOOT, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/rules.mk b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/rules.mk new file mode 100644 index 00000000000..325dc744c5d --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/rules.mk @@ -0,0 +1,14 @@ +# Build Options +# change yes to no to disable +# +LTO_ENABLE = yes +VIA_ENABLE = yes +VIAL_ENABLE = yes + +COMBO_ENABLE = yes +TAP_DANCE_ENABLE = yes +QMK_SETTINGS = yes +KEY_OVERRIDE_ENABLE = yes + +MOUSEKEY_ENABLE = no # Mouse keys +VIALRGB_ENABLE = yes # Enable Vial GUI diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/vial.json b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/vial.json new file mode 100644 index 00000000000..33dcd7ca3c5 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/vial/vial.json @@ -0,0 +1,149 @@ +{ + "lighting": "vialrgb", + "matrix": { + "rows": 5, + "cols": 14 + }, + "layouts": { + "keymap": [ + [ + { + "c": "#777777" + }, + "0,0", + { + "c": "#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11", + "0,12", + { + "c": "#aaaaaa", + "w": 2 + }, + "0,13" + ], + [ + { + "w": 1.5 + }, + "1,0", + { + "c": "#cccccc" + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + { + "w": 1.5 + }, + "1,13" + ], + [ + { + "c": "#aaaaaa", + "w": 1.75 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + { + "c": "#777777", + "w": 2.25 + }, + "2,13" + ], + [ + { + "c": "#aaaaaa", + "w": 2.25 + }, + "3,0", + { + "c": "#cccccc" + }, + "3,1", + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + { + "c": "#aaaaaa", + "w": 2.75 + }, + "3,13" + ], + [ + { + "w": 1.25 + }, + "4,0", + { + "w": 1.25 + }, + "4,1", + { + "w": 1.25 + }, + "4,2", + { + "c": "#cccccc", + "w": 6.25 + }, + "4,5", + { + "c": "#aaaaaa", + "w": 1.25 + }, + "4,9", + { + "w": 1.25 + }, + "4,10", + { + "w": 1.25 + }, + "4,11", + { + "w": 1.25 + }, + "4,13" + ] + ] + } +}