diff options
Diffstat (limited to 'keyboards/lpad/lpad.c')
-rw-r--r-- | keyboards/lpad/lpad.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/keyboards/lpad/lpad.c b/keyboards/lpad/lpad.c new file mode 100644 index 0000000000..214dd2e390 --- /dev/null +++ b/keyboards/lpad/lpad.c @@ -0,0 +1,18 @@ +// Copyright 2023 Laneware Peripherals +// 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) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return true; +} +#endif |