From 1b72007fba60927203520d460c5a2875ec2d1565 Mon Sep 17 00:00:00 2001 From: Thiago Hiromi <83295+thiromi@users.noreply.github.com> Date: Sun, 10 Mar 2024 23:12:52 +0100 Subject: [PATCH] Add vial support to bm43a (#677) * Add vial support to bm43a * Add missing pragme * Remove README --- .../kprepublic/bm43a/keymaps/vial/config.h | 9 +++++ .../kprepublic/bm43a/keymaps/vial/keymap.c | 33 +++++++++++++++++++ .../kprepublic/bm43a/keymaps/vial/rules.mk | 6 ++++ .../kprepublic/bm43a/keymaps/vial/vial.json | 14 ++++++++ 4 files changed, 62 insertions(+) create mode 100644 keyboards/kprepublic/bm43a/keymaps/vial/config.h create mode 100644 keyboards/kprepublic/bm43a/keymaps/vial/keymap.c create mode 100644 keyboards/kprepublic/bm43a/keymaps/vial/rules.mk create mode 100644 keyboards/kprepublic/bm43a/keymaps/vial/vial.json diff --git a/keyboards/kprepublic/bm43a/keymaps/vial/config.h b/keyboards/kprepublic/bm43a/keymaps/vial/config.h new file mode 100644 index 0000000000..72d87c77c4 --- /dev/null +++ b/keyboards/kprepublic/bm43a/keymaps/vial/config.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +// Vial support +#define VIAL_KEYBOARD_UID {0x82, 0x52, 0x01, 0x59, 0xF8, 0x6D, 0xE9, 0x4E} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 3, 0, 3 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 0, 11, 11 } diff --git a/keyboards/kprepublic/bm43a/keymaps/vial/keymap.c b/keyboards/kprepublic/bm43a/keymaps/vial/keymap.c new file mode 100644 index 0000000000..e51156fd05 --- /dev/null +++ b/keyboards/kprepublic/bm43a/keymaps/vial/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 mechmerlin + * + * 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( + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_DOWN, BL_UP, BL_STEP, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + diff --git a/keyboards/kprepublic/bm43a/keymaps/vial/rules.mk b/keyboards/kprepublic/bm43a/keymaps/vial/rules.mk new file mode 100644 index 0000000000..dd0969d993 --- /dev/null +++ b/keyboards/kprepublic/bm43a/keymaps/vial/rules.mk @@ -0,0 +1,6 @@ +LTO_ENABLE = yes +VIA_ENABLE = yes +VIAL_ENABLE = yes + +COMBO_ENABLE = no +KEY_OVERRIDE_ENABLE = no diff --git a/keyboards/kprepublic/bm43a/keymaps/vial/vial.json b/keyboards/kprepublic/bm43a/keymaps/vial/vial.json new file mode 100644 index 0000000000..02793812ff --- /dev/null +++ b/keyboards/kprepublic/bm43a/keymaps/vial/vial.json @@ -0,0 +1,14 @@ +{ + "matrix": { + "rows": 4, + "cols": 12 + }, + "layouts": { + "keymap": [ + ["0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11"], + [{"w":1.25},"1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9",{"w":1.75},"1,11"], + [{"w":2},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,11"], + ["3,0","3,1","3,2",{"w":2.75},"3,3",{"w":2.25},"3,5","3,7","3,8","3,9","3,11"] + ] + } +}