From 7e5dc1893d1c480d5a27200521969578b3aa185c Mon Sep 17 00:00:00 2001 From: Vino Rodrigues Date: Sat, 26 Oct 2024 02:13:12 +1100 Subject: [PATCH 1/2] Added BNK8 --- keyboards/binepad/bnk8/keymaps/via/keymap.c | 35 +++++++++++++++++++++ keyboards/binepad/bnk8/keymaps/via/rules.mk | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 keyboards/binepad/bnk8/keymaps/via/keymap.c create mode 100644 keyboards/binepad/bnk8/keymaps/via/rules.mk diff --git a/keyboards/binepad/bnk8/keymaps/via/keymap.c b/keyboards/binepad/bnk8/keymaps/via/keymap.c new file mode 100644 index 0000000000..121c6a8509 --- /dev/null +++ b/keyboards/binepad/bnk8/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +// Copyright 2024 Binepad (@binepad) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┐ + * │ 1 │ 2 │ K │ + * ├───┼───┼───┤ + * │ 3 │ 4 │ 5 │ + * ├───┼───┼───┤ + * │ 6 │ 7 │ 8 │ + * └───┴───┴───┘ + */ + [0] = LAYOUT_ortho_3x3( + KC_P1, KC_P2, KC_MUTE, + KC_P3, KC_P4, KC_P5, + KC_P6, KC_P7, LT(1, KC_P8) + ), + [1] = LAYOUT_ortho_3x3( + RGB_HUI, RGB_SAI, RGB_SPI, + RGB_HUD, RGB_SAD, RGB_SPD, + RGB_TOG, RGB_MOD, _______ + ) +}; + +#if defined(ENCODER_MAP_ENABLE) + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } +}; + +#endif diff --git a/keyboards/binepad/bnk8/keymaps/via/rules.mk b/keyboards/binepad/bnk8/keymaps/via/rules.mk new file mode 100644 index 0000000000..f1adcab005 --- /dev/null +++ b/keyboards/binepad/bnk8/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes From 5187fb1efa8ac031a280c72a2cf8d9f352b7f2ff Mon Sep 17 00:00:00 2001 From: Vino Rodrigues <366673+vinorodrigues@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:52:23 +1100 Subject: [PATCH 2/2] RGB_ -> RM_ keycodes after Nov'24 breaking changes --- keyboards/binepad/bnk8/keymaps/via/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/binepad/bnk8/keymaps/via/keymap.c b/keyboards/binepad/bnk8/keymaps/via/keymap.c index 121c6a8509..f72c5060d5 100644 --- a/keyboards/binepad/bnk8/keymaps/via/keymap.c +++ b/keyboards/binepad/bnk8/keymaps/via/keymap.c @@ -19,9 +19,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P6, KC_P7, LT(1, KC_P8) ), [1] = LAYOUT_ortho_3x3( - RGB_HUI, RGB_SAI, RGB_SPI, - RGB_HUD, RGB_SAD, RGB_SPD, - RGB_TOG, RGB_MOD, _______ + RM_HUEU, RM_SATU, RM_SPDU, + RM_HUED, RM_SATD, RM_SPDD, + RM_TOGG, RM_NEXT, _______ ) }; @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } + [1] = { ENCODER_CCW_CW(RM_VALD, RM_VALD) } }; #endif