diff options
author | Laneware <68452738+Laneware@users.noreply.github.com> | 2023-03-19 03:33:20 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-18 11:33:20 -0600 |
commit | da52450152f9f16aa1144bc616f0e84681d009cf (patch) | |
tree | fa3378bb2a0d16eab8423f05381f91c2a32be460 /keyboards/lpad/lpad.c | |
parent | 7b9d471ba0ec0da3d4127940979247ae2f7fcfec (diff) |
Add Support for LPAD (#19852)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
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 |