123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /* My (demuredemeanor) sofle RGB conf
- * Based on Josef Adamcik's work
- */
- //Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via.
- #ifdef ENCODER_ENABLE
- void encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- if (clockwise) {
- if (shift_held) {
- tap_code(KC_BRIGHTNESS_UP);
- } else {
- tap_code(KC_VOLU);
- }
- } else {
- if (shift_held) {
- tap_code(KC_BRIGHTNESS_DOWN);
- } else {
- tap_code(KC_VOLD);
- }
- }
- } else if (index == 1) {
- if (clockwise) {
- if (shift_held) {
- tap_code(KC_PGDOWN);
- } else {
- tap_code(KC_DOWN);
- }
- } else {
- if (shift_held) {
- tap_code(KC_PGUP);
- } else {
- tap_code(KC_UP);
- }
- }
- }
- }
- #endif
|