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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user