aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/keebio/bdn9/keymaps/default
diff options
context:
space:
mode:
authorGravatar Danny <nooges@users.noreply.github.com>2020-06-09 22:32:46 -0400
committerGravatar GitHub <noreply@github.com>2020-06-09 22:32:46 -0400
commit184c362324171a77e108fe29058fa51c438d04b4 (patch)
tree8fcd9671b5a1e5bbfa513f0eb0599ed5ee9afab7 /keyboards/keebio/bdn9/keymaps/default
parent1d1c0503b669abcf8c059a5962e6819b1376a885 (diff)
downloadqmk_firmware-184c362324171a77e108fe29058fa51c438d04b4.tar.gz
Add BDN9 rev2 (#9017)
Diffstat (limited to 'keyboards/keebio/bdn9/keymaps/default')
-rw-r--r--keyboards/keebio/bdn9/keymaps/default/config.h5
-rw-r--r--keyboards/keebio/bdn9/keymaps/default/keymap.c17
2 files changed, 20 insertions, 2 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/default/config.h b/keyboards/keebio/bdn9/keymaps/default/config.h
new file mode 100644
index 000000000..e09fba923
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/default/config.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#ifdef RGB_MATRIX_ENABLE
+# define RGB_MATRIX_KEYPRESSES
+#endif
diff --git a/keyboards/keebio/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c
index c700019dc..a88617caa 100644
--- a/keyboards/keebio/bdn9/keymaps/default/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/default/keymap.c
@@ -15,6 +15,12 @@
*/
#include QMK_KEYBOARD_H
+enum encoder_names {
+ _LEFT,
+ _RIGHT,
+ _MIDDLE,
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
| Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up |
@@ -40,14 +46,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
+ if (index == _LEFT) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
- else if (index == 1) {
+ else if (index == _MIDDLE) {
+ if (clockwise) {
+ tap_code(KC_DOWN);
+ } else {
+ tap_code(KC_UP);
+ }
+ }
+ else if (index == _RIGHT) {
if (clockwise) {
tap_code(KC_PGDN);
} else {