mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 16:02: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:
@@ -306,6 +306,15 @@ func (m *Manager) readAndUpdateCapsLockState(deviceIndex int) {
|
|||||||
return
|
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]
|
capsLockState := ledStates[ledCapslockKey]
|
||||||
m.updateCapsLockStateDirect(capsLockState)
|
m.updateCapsLockStateDirect(capsLockState)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user