Implement Axis targets.

This commit is contained in:
Anna Rose Wiggins 2025-07-10 13:06:24 -04:00
parent ff38db6596
commit 2f7e11e8a2
6 changed files with 79 additions and 35 deletions

View file

@ -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 {