Rename interface.

This commit is contained in:
Anna Rose Wiggins 2025-07-18 19:08:47 -04:00
parent 3bfcdc830f
commit bad104a794
11 changed files with 27 additions and 27 deletions

View file

@ -23,7 +23,7 @@ func NewMappingRuleButtonCombo(
}
}
func (rule *MappingRuleButtonCombo) MatchEvent(device RuleTargetDevice, event *evdev.InputEvent, mode *string) (*evdev.InputDevice, *evdev.InputEvent) {
func (rule *MappingRuleButtonCombo) MatchEvent(device Device, event *evdev.InputEvent, mode *string) (*evdev.InputDevice, *evdev.InputEvent) {
if !rule.MappingRuleBase.modeCheck(mode) {
return nil, nil
}
@ -53,10 +53,10 @@ func (rule *MappingRuleButtonCombo) MatchEvent(device RuleTargetDevice, event *e
targetState := len(rule.Inputs)
if oldState == targetState-1 && rule.State == targetState {
return rule.Output.Device, rule.Output.CreateEvent(1, mode)
return rule.Output.Device.(*evdev.InputDevice), rule.Output.CreateEvent(1, mode)
}
if oldState == targetState && rule.State == targetState-1 {
return rule.Output.Device, rule.Output.CreateEvent(0, mode)
return rule.Output.Device.(*evdev.InputDevice), rule.Output.CreateEvent(0, mode)
}
return nil, nil
}