summaryrefslogtreecommitdiffstats
path: root/keyboards/anavi/macropad10/macropad10.c
blob: bebefd0da9e76c3c94b0f4ac5fa66ac2dec76bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2022 Leon Anavi <leon@anavi.org>
// SPDX-License-Identifier: GPL-2.0-or-later
#include "encoder.h"

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
    if (!encoder_update_user(index, clockwise)) { return false; }
    if (clockwise) {
        tap_code(KC_VOLU);
    } else {
        tap_code(KC_VOLD);
    }
    return true;
}
#endif