Fix combo rules and add some example config.

This commit is contained in:
Anna Rose Wiggins 2025-07-02 14:53:52 -04:00
parent 428749a519
commit a5b59bf39e
6 changed files with 93 additions and 6 deletions

View file

@ -21,6 +21,7 @@ func makeSimpleRule(ruleConfig RuleConfig, pDevs map[string]*evdev.InputDevice,
return &mappingrules.SimpleMappingRule{
Input: input,
Output: output,
Name: ruleConfig.Name,
}, nil
}
@ -42,6 +43,7 @@ func makeComboRule(ruleConfig RuleConfig, pDevs map[string]*evdev.InputDevice, v
return &mappingrules.ComboMappingRule{
Inputs: inputs,
Output: output,
Name: ruleConfig.Name,
}, nil
}
@ -61,6 +63,7 @@ func makeRuleTarget(targetConfig RuleTargetConfig, devs map[string]*evdev.InputD
}
ruleTarget.Type = eventType
ruleTarget.Code = eventCode
ruleTarget.Inverted = targetConfig.Inverted
return ruleTarget, nil
}