From 597ea62d179e51e45cbdd99085795567322ff2f7 Mon Sep 17 00:00:00 2001 From: Christian Meissl Date: Fri, 26 Jan 2024 15:13:54 +0100 Subject: input: update keyboard led state --- src/input.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index 23ba6958..b9b91545 100644 --- a/src/input.rs +++ b/src/input.rs @@ -127,6 +127,17 @@ impl State { } } + if device.has_capability(input::DeviceCapability::Keyboard) { + if let Some(led_state) = self + .niri + .seat + .get_keyboard() + .map(|keyboard| keyboard.led_state()) + { + device.led_update(led_state.into()); + } + } + apply_libinput_settings(&self.niri.config.borrow().input, device); } InputEvent::DeviceRemoved { device } => { -- cgit