1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-08 06:25:37 -05:00

evdev: enhance keyboard detection for capslock

This commit is contained in:
bbedward
2025-11-14 23:22:06 -05:00
parent 89a2b5c00b
commit b4dbd0b69c

View File

@@ -145,9 +145,18 @@ func isKeyboard(device EvdevDevice) bool {
return true
case strings.Contains(name, "input") && strings.Contains(name, "key"):
return true
default:
}
keyStates, err := device.State(evKeyType)
if err != nil {
return false
}
hasKeyA := len(keyStates) > 30
hasKeyZ := len(keyStates) > 44
hasEnter := len(keyStates) > 28
return hasKeyA && hasKeyZ && hasEnter && len(keyStates) > 100
}
func (m *Manager) watchForNewKeyboards() {