diff options
author | Danny <nooges@users.noreply.github.com> | 2020-06-09 22:32:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 22:32:46 -0400 |
commit | 184c362324171a77e108fe29058fa51c438d04b4 (patch) | |
tree | 8fcd9671b5a1e5bbfa513f0eb0599ed5ee9afab7 /keyboards/keebio/bdn9/keymaps/default/keymap.c | |
parent | 1d1c0503b669abcf8c059a5962e6819b1376a885 (diff) | |
download | qmk_firmware-184c362324171a77e108fe29058fa51c438d04b4.tar.gz qmk_firmware-184c362324171a77e108fe29058fa51c438d04b4.zip |
Add BDN9 rev2 (#9017)
Diffstat (limited to 'keyboards/keebio/bdn9/keymaps/default/keymap.c')
-rw-r--r-- | keyboards/keebio/bdn9/keymaps/default/keymap.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c index c700019dc0..a88617caaa 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 { |