diff options
author | QMK Bot <hello@qmk.fm> | 2023-07-01 01:36:50 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2023-07-01 01:36:50 +0000 |
commit | 2b4a93a38523311af88830ddc6a04d5446ed5386 (patch) | |
tree | edd23babdaf3c795c73573c76b740e923fbaabd8 /keyboards/keebio/iris/rev8/rev8.c | |
parent | 66a169388de0370f5050eabaf80e97cf2373c606 (diff) | |
parent | 6a61e2eeeec0827dfbe8226ef528143f35ab2457 (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/keebio/iris/rev8/rev8.c')
-rw-r--r-- | keyboards/keebio/iris/rev8/rev8.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/keyboards/keebio/iris/rev8/rev8.c b/keyboards/keebio/iris/rev8/rev8.c new file mode 100644 index 0000000000..a6f0ac00a0 --- /dev/null +++ b/keyboards/keebio/iris/rev8/rev8.c @@ -0,0 +1,36 @@ +// Copyright 2023 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 2) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 3) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + return false; +} +#endif |