Add latched rules.
This commit is contained in:
parent
a078dcb193
commit
f5283f33ca
5 changed files with 91 additions and 35 deletions
|
@ -7,21 +7,32 @@ type MappingRule interface {
|
|||
OutputName() string
|
||||
}
|
||||
|
||||
type MappingRuleBase struct {
|
||||
Output RuleTarget
|
||||
}
|
||||
|
||||
// A Simple Mapping Rule can map a button to a button or an axis to an axis.
|
||||
type SimpleMappingRule struct {
|
||||
MappingRuleBase
|
||||
Input RuleTarget
|
||||
Output RuleTarget
|
||||
Name string
|
||||
}
|
||||
|
||||
// A Combo Mapping Rule can require multiple physical button presses for a single output button
|
||||
type ComboMappingRule struct {
|
||||
MappingRuleBase
|
||||
Inputs []RuleTarget
|
||||
Output RuleTarget
|
||||
Name string
|
||||
State int
|
||||
}
|
||||
|
||||
type LatchedMappingRule struct {
|
||||
MappingRuleBase
|
||||
Input RuleTarget
|
||||
Name string
|
||||
State bool
|
||||
}
|
||||
|
||||
type RuleTarget struct {
|
||||
DeviceName string
|
||||
Device *evdev.InputDevice
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue