Implement Axis targets.
This commit is contained in:
parent
ff38db6596
commit
2f7e11e8a2
6 changed files with 79 additions and 35 deletions
|
@ -9,13 +9,13 @@ type RuleTargetButton struct {
|
|||
Inverted bool
|
||||
}
|
||||
|
||||
func NewRuleTargetButton(device_name string, device *evdev.InputDevice, code evdev.EvCode, inverted bool) *RuleTargetButton {
|
||||
func NewRuleTargetButton(device_name string, device *evdev.InputDevice, code evdev.EvCode, inverted bool) (*RuleTargetButton, error) {
|
||||
return &RuleTargetButton{
|
||||
DeviceName: device_name,
|
||||
Device: device,
|
||||
Button: code,
|
||||
Inverted: inverted,
|
||||
}
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (target *RuleTargetButton) NormalizeValue(value int32) int32 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue