aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-01-21 22:23:58 +0000
committerQMK Bot <hello@qmk.fm>2021-01-21 22:23:58 +0000
commite4ff5eb3eb655028f682de4d3f61a10830fd12bb (patch)
tree5e018a3a54986f0a740fb8766f211b55d161ef72
parentaa73ba7a678287b610dec05053507bfb95fc2472 (diff)
parent71d8e72b804d43d39b996c71e85aa3434de0573a (diff)
downloadqmk_firmware-e4ff5eb3eb655028f682de4d3f61a10830fd12bb.tar.gz
qmk_firmware-e4ff5eb3eb655028f682de4d3f61a10830fd12bb.zip
Merge remote-tracking branch 'origin/master' into develop
-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 6ef7a06ea..b86f88a23 100644
--- a/keyboards/keebio/bdn9/keymaps/via/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/via/keymap.c
@@ -1,5 +1,11 @@
1#include QMK_KEYBOARD_H 1#include QMK_KEYBOARD_H
2 2
3enum encoder_names {
4 _LEFT,
5 _RIGHT,
6 _MIDDLE,
7};
8
3enum layer_names { 9enum layer_names {
4 _ZERO, 10 _ZERO,
5 _ONE, 11 _ONE,
@@ -36,17 +42,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36}; 42};
37 43
38void encoder_update_user(uint8_t index, bool clockwise) { 44void encoder_update_user(uint8_t index, bool clockwise) {
39 if (index == 0) { 45 if (index == _LEFT) {
40 if (clockwise) { 46 if (clockwise) {
41 tap_code(KC_VOLU); 47 tap_code(KC_VOLU);
42 } else { 48 } else {
43 tap_code(KC_VOLD); 49 tap_code(KC_VOLD);
44 } 50 }
45 } else if (index == 1) { 51 }
52 else if (index == _MIDDLE) {
53 if (clockwise) {
54 tap_code(KC_DOWN);
55 } else {
56 tap_code(KC_UP);
57 }
58 }
59 else if (index == _RIGHT) {
46 if (clockwise) { 60 if (clockwise) {
47 tap_code(KC_WH_U); 61 tap_code(KC_PGDN);
48 } else { 62 } else {
49 tap_code(KC_WH_D); 63 tap_code(KC_PGUP);
50 } 64 }
51 } 65 }
52} 66}