Code cleanup and refactoring.

This commit is contained in:
Anna Rose Wiggins 2025-08-09 12:32:17 -04:00
parent 4b4930ebdc
commit a876dabe6e
3 changed files with 19 additions and 25 deletions

View file

@ -14,7 +14,7 @@ import (
// This would speed up rule matching by only checking relevant rules for a given input event.
// We could take this further and make it a map[<struct of *inputdevice, type, and code>][]rule
// For very large rule-bases this may be helpful for staying performant.
func (parser *ConfigParser) BuildRules(pInputDevs map[string]*evdev.InputDevice, vInputDevs map[string]*evdev.InputDevice) []mappingrules.MappingRule {
func (parser *ConfigParser) InitRules(pInputDevs map[string]*evdev.InputDevice, vInputDevs map[string]*evdev.InputDevice) []mappingrules.MappingRule {
rules := make([]mappingrules.MappingRule, 0)
modes := parser.GetModes()