forked from mirror/qmk_firmware
Refactor keyboard/keymap use of deprecated isLeftHand (#25891)
This commit is contained in:
@@ -9,12 +9,11 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
void led_update_ports(led_t led_state) {
|
||||
// Only update if left half
|
||||
if (isLeftHand && led_update_user(led_state)) {
|
||||
if (is_keyboard_left()) {
|
||||
gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
|
||||
@@ -9,12 +9,11 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
void led_update_ports(led_t led_state) {
|
||||
// Only update if left half
|
||||
if (isLeftHand && led_update_user(led_state)) {
|
||||
if (is_keyboard_left()) {
|
||||
gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
@@ -22,12 +22,11 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
void led_update_ports(led_t led_state) {
|
||||
// Only update if left half
|
||||
if (led_update_user(led_state) && isLeftHand) {
|
||||
if (is_keyboard_left()) {
|
||||
gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
@@ -17,14 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "quantum.h"
|
||||
#include "split_util.h"
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (!led_update_user(led_state)) { return false; }
|
||||
#ifdef LED_CAPS_LOCK_PIN
|
||||
void led_update_ports(led_t led_state) {
|
||||
// Only update if left half
|
||||
if (isLeftHand && led_update_user(led_state)) {
|
||||
if (is_keyboard_left()) {
|
||||
gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user