summaryrefslogtreecommitdiff
path: root/keyboards/keebio/bdn9/keymaps
diff options
context:
space:
mode:
authorDanny <nooges@users.noreply.github.com>2021-01-21 17:23:27 -0500
committerGitHub <noreply@github.com>2021-01-21 17:23:27 -0500
commit71d8e72b804d43d39b996c71e85aa3434de0573a (patch)
tree5c2d03cdf7a7e9f22eb0ee94c11e5913f108e2b9 /keyboards/keebio/bdn9/keymaps
parentc03ad0f80208cb1764379aa184821750d1527aa7 (diff)
Add 3rd encoder to VIA keymap (#11580)
Diffstat (limited to 'keyboards/keebio/bdn9/keymaps')
-rw-r--r--keyboards/keebio/bdn9/keymaps/via/keymap.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/via/keymap.c b/keyboards/keebio/bdn9/keymaps/via/keymap.c
index 6ef7a06eaf..b86f88a232 100644
--- a/keyboards/keebio/bdn9/keymaps/via/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/via/keymap.c
@@ -1,5 +1,11 @@
#include QMK_KEYBOARD_H
+enum encoder_names {
+ _LEFT,
+ _RIGHT,
+ _MIDDLE,
+};
+
enum layer_names {
_ZERO,
_ONE,
@@ -36,17 +42,25 @@ 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_WH_U);
+ tap_code(KC_PGDN);
} else {
- tap_code(KC_WH_D);
+ tap_code(KC_PGUP);
}
}
}