diff options
| author | Christian Meissl <meissl.christian@gmail.com> | 2024-01-26 15:13:54 +0100 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-01-28 23:43:08 +0400 |
| commit | 597ea62d179e51e45cbdd99085795567322ff2f7 (patch) | |
| tree | 2501c0f1534c7cbed80460376a0a80f179d573c2 /src/input.rs | |
| parent | 51243a0a505a533057e7326fbbae882420f0d363 (diff) | |
| download | niri-597ea62d179e51e45cbdd99085795567322ff2f7.tar.gz niri-597ea62d179e51e45cbdd99085795567322ff2f7.tar.bz2 niri-597ea62d179e51e45cbdd99085795567322ff2f7.zip | |
input: update keyboard led state
Diffstat (limited to 'src/input.rs')
| -rw-r--r-- | src/input.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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 } => { |
