aboutsummaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_led_matrix.c
blob: 217c9a2c28a6cf009cc52a77516d808ec5062e53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2024 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include "process_led_matrix.h"
#include "led_matrix.h"

bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
    if (record->event.pressed) {
        switch (keycode) {
            case QK_BACKLIGHT_ON:
                led_matrix_enable();
                return false;
            case QK_BACKLIGHT_OFF:
                led_matrix_disable();
                return false;
            case QK_BACKLIGHT_DOWN:
                led_matrix_decrease_val();
                return false;
            case QK_BACKLIGHT_UP:
                led_matrix_increase_val();
                return false;
            case QK_BACKLIGHT_TOGGLE:
                led_matrix_toggle();
                return false;
            case QK_BACKLIGHT_STEP:
                led_matrix_step();
                return false;
        }
    }

    return true;
}