summaryrefslogtreecommitdiffstats
path: root/keyboards/binepad/bnr1/keymaps/default
diff options
context:
space:
mode:
authorVino Rodrigues <366673+vinorodrigues@users.noreply.github.com>2022-10-27 06:39:17 +1100
committerGitHub <noreply@github.com>2022-10-26 12:39:17 -0700
commite59475992e984e3384f48205e2f90855bc4661bf (patch)
treeef563da1d51f60b96fdcbd0a05d106ef688e7bfa /keyboards/binepad/bnr1/keymaps/default
parente485261e53517931d205cb8542446e36e7246f26 (diff)
[Keyboard] Add Binepad BNR1 rotary encoder (#18809)
Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'keyboards/binepad/bnr1/keymaps/default')
-rw-r--r--keyboards/binepad/bnr1/keymaps/default/keymap.c28
-rw-r--r--keyboards/binepad/bnr1/keymaps/default/rules.mk6
2 files changed, 34 insertions, 0 deletions
diff --git a/keyboards/binepad/bnr1/keymaps/default/keymap.c b/keyboards/binepad/bnr1/keymaps/default/keymap.c
new file mode 100644
index 0000000000..974005afaa
--- /dev/null
+++ b/keyboards/binepad/bnr1/keymaps/default/keymap.c
@@ -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
diff --git a/keyboards/binepad/bnr1/keymaps/default/rules.mk b/keyboards/binepad/bnr1/keymaps/default/rules.mk
new file mode 100644
index 0000000000..7f80bd39c6
--- /dev/null
+++ b/keyboards/binepad/bnr1/keymaps/default/rules.mk
@@ -0,0 +1,6 @@
+# Copyright 2022 Binepad (@binpad)
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+LTO_ENABLE = yes
+
+ENCODER_MAP_ENABLE = yes