1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

evdev: improve capslock detection for no led device (#923)

* evdev: improve capslock detection for no led device

* style: fmt
This commit is contained in:
Yuxiang Qiu
2025-12-08 16:16:43 +00:00
committed by GitHub
parent ddb74b598d
commit cd580090dc

View File

@@ -306,6 +306,15 @@ func (m *Manager) readAndUpdateCapsLockState(deviceIndex int) {
return
}
if len(ledStates) == 0 {
log.Debug("No LED state available (empty map)")
// This means the device either:
// - doesn't support LED reporting at all, or
// - the kernel returned an empty state
return
}
capsLockState := ledStates[ledCapslockKey]
m.updateCapsLockStateDirect(capsLockState)
}