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
|
@ -36,7 +36,7 @@ func (target *RuleTargetButton) CreateEvent(value int32, _ *string) *evdev.Input
|
|||
}
|
||||
}
|
||||
|
||||
func (target *RuleTargetButton) MatchEvent(device *evdev.InputDevice, event *evdev.InputEvent) bool {
|
||||
func (target *RuleTargetButton) MatchEvent(device RuleTargetDevice, event *evdev.InputEvent) bool {
|
||||
return device == target.Device &&
|
||||
event.Type == evdev.EV_KEY &&
|
||||
event.Code == target.Button
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue