Implement config generator for AxisToButton. Use RuleTargetDevice interface more broadly.
This commit is contained in:
parent
e93187b8a5
commit
ed2627e113
9 changed files with 28 additions and 16 deletions
|
@ -17,7 +17,7 @@ func NewMappingRuleAxis(base MappingRuleBase, input *RuleTargetAxis, output *Rul
|
|||
}
|
||||
}
|
||||
|
||||
func (rule *MappingRuleAxis) MatchEvent(device *evdev.InputDevice, event *evdev.InputEvent, mode *string) (*evdev.InputDevice, *evdev.InputEvent) {
|
||||
func (rule *MappingRuleAxis) MatchEvent(device RuleTargetDevice, event *evdev.InputEvent, mode *string) (*evdev.InputDevice, *evdev.InputEvent) {
|
||||
if !rule.MappingRuleBase.modeCheck(mode) ||
|
||||
!rule.Input.MatchEvent(device, event) {
|
||||
return nil, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue