Implement axis targets, axis -> button and axis -> relative axis mappings. (#1)

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-07-15 19:55:19 +00:00 committed by Anna Rose Wiggins
parent ff38db6596
commit e617a6eda6
25 changed files with 903 additions and 130 deletions

View file

@ -9,7 +9,7 @@ import (
)
const (
TimerCheckIntervalMs = 250
TimerCheckIntervalMs = 1
DeviceCheckIntervalMs = 1
)
@ -28,12 +28,12 @@ func eventWatcher(device *evdev.InputDevice, channel chan<- ChannelEvent) {
}
}
func timerWatcher(rule *mappingrules.MappingRuleAxisToButton, channel chan<- ChannelEvent) {
func timerWatcher(rule mappingrules.TimedEventEmitter, channel chan<- ChannelEvent) {
for {
event := rule.TimerEvent()
if event != nil {
channel <- ChannelEvent{
Device: rule.Output.Device,
Device: rule.GetOutputDevice(),
Event: event,
Type: ChannelEventTimer,
}