1
0
Fork 0

Add Support for LPAD (#19852)

Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
Laneware 2023-03-19 03:33:20 +10:00 committed by GitHub
parent 7b9d471ba0
commit da52450152
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 156 additions and 0 deletions

18
keyboards/lpad/lpad.c Normal file
View file

@ -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