1
0
Fork 0
forked from forks/qmk_firmware
qmk_firmware/keyboards/keebio/iris/rev8/rev8.c
Danny 6a61e2eeee
Add Iris Rev. 8 (#21392)
Co-authored-by: Duncan Sutherland <dunk2k_2000@hotmail.com>
2023-06-30 21:36:11 -04:00

37 lines
857 B
C

// 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