Basic hat support. #20

Merged
anna merged 5 commits from hats into main 2025-09-15 17:55:55 +00:00
2 changed files with 5 additions and 0 deletions
Showing only changes of commit 42a1759961 - Show all commits

View file

@ -54,6 +54,10 @@ func (dc *RuleConfig) UnmarshalYAML(unmarshal func(data interface{}) error) erro
config := RuleConfigModeSelect{}
err = unmarshal(&config)
dc.Config = config
case RuleTypeHat:
config := RuleConfigHat{}
err = unmarshal(&config)
dc.Config = config
}
return err

View file

@ -18,6 +18,7 @@ const (
RuleTypeAxisToButton RuleType = "axis-to-button"
RuleTypeAxisToRelaxis RuleType = "axis-to-relaxis"
RuleTypeModeSelect RuleType = "mode-select"
RuleTypeHat RuleType = "hat"
)
var (