mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-07 08:04:16 -04:00
[Keyboard] Add Binepad BNR1 rotary encoder (#18809)
Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
parent
6527669f23
commit
473b74e757
3 changed files with 46 additions and 0 deletions
11
keyboards/binepad/bnr1/keymaps/via/config.h
Normal file
11
keyboards/binepad/bnr1/keymaps/via/config.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* Copyright 2022 Binepad (@binpad) */
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#pragma once
|
||||
|
||||
#define TAPPING_TERM 175
|
||||
|
||||
#ifdef DYNAMIC_KEYMAP_LAYER_COUNT
|
||||
#undef DYNAMIC_KEYMAP_LAYER_COUNT
|
||||
#endif
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 2
|
28
keyboards/binepad/bnr1/keymaps/via/keymap.c
Normal file
28
keyboards/binepad/bnr1/keymaps/via/keymap.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* Copyright 2022 Binepad (@binpad) */
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum {
|
||||
_L0,
|
||||
_L1
|
||||
} keyboard_layers;
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_L0] = LAYOUT_ortho_1x1(
|
||||
LT(_L1, KC_MUTE)
|
||||
),
|
||||
|
||||
[_L1] = LAYOUT_ortho_1x1(
|
||||
_______
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[_L0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_L1] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP) }
|
||||
};
|
||||
|
||||
#endif
|
7
keyboards/binepad/bnr1/keymaps/via/rules.mk
Normal file
7
keyboards/binepad/bnr1/keymaps/via/rules.mk
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright 2022 Binepad (@binpad)
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
LTO_ENABLE = yes
|
||||
VIA_ENABLE = yes
|
||||
|
||||
ENCODER_MAP_ENABLE = yes
|
Loading…
Add table
Add a link
Reference in a new issue