Basic hat support. (#20)

Reviewed-on: #20
Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com>
Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
Anna Rose Wiggins 2025-09-15 17:55:55 +00:00 committed by Anna Rose Wiggins
parent 62befa045a
commit 5e005478f1
12 changed files with 151 additions and 13 deletions

View file

@ -49,6 +49,8 @@ func NewRule(config configparser.RuleConfig, pDevs map[string]Device, vDevs map[
newRule, err = NewMappingRuleAxisToRelaxis(config.Config.(configparser.RuleConfigAxisToRelaxis), pDevs, vDevs, base)
case configparser.RuleTypeModeSelect:
newRule, err = NewMappingRuleModeSelect(config.Config.(configparser.RuleConfigModeSelect), pDevs, modes, base)
case configparser.RuleTypeHat:
newRule, err = NewMappingRuleHat(config.Config.(configparser.RuleConfigHat), pDevs, vDevs, base)
default:
// Shouldn't actually be possible to get here...
err = fmt.Errorf("bad rule type '%s' for rule '%s'", config.Type, config.Name)