mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-15 06:10:53 +00:00
23 lines
488 B
C
23 lines
488 B
C
|
// Copyright 2023 QMK Contributors (@qmk)
|
||
|
// 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;
|
||
|
}
|
||
|
switch (index) {
|
||
|
case 0:
|
||
|
if (clockwise) {
|
||
|
tap_code(KC_VOLU);
|
||
|
} else {
|
||
|
tap_code(KC_VOLD);
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
#endif
|