Fix led indicator getting turned off when turning caps lock/numlock on/off

This commit is contained in:
dec05eba
2025-11-20 21:50:20 +01:00
parent b875f96885
commit 5a13bd2491
2 changed files with 83 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <sys/types.h>
#include <vector>
#include <mglpp/system/Clock.hpp>
namespace gsr {
@@ -17,11 +18,16 @@ namespace gsr {
private:
bool run_gsr_global_hotkeys_set_leds(bool enabled);
void update_led(bool new_state);
void update_led_with_active_status();
void check_led_status_outdated();
private:
pid_t gsr_global_hotkeys_pid = -1;
bool led_indicator_on = false;
bool led_enabled = false;
bool perform_blink = false;
mgl::Clock blink_timer;
std::vector<int> led_brightness_files;
mgl::Clock read_led_brightness_timer;
};
}