1j01 / tracky-mouse

Mouse control via head tracking, as a cross platform desktop app and JS library. eViacam alternative.
https://trackymouse.js.org/
MIT License
25 stars 4 forks source link

Action binding system and profiles #51

Open 1j01 opened 5 months ago

1j01 commented 5 months ago

Create a system to bind (map) input gestures to output actions.

Inputs and outputs can be discrete or continuous.

Inputs (Gestures):

Outputs (Actions):

I've inconsistently described some things that can be discrete or continuous as separate (squint/blink) or the same input. Probably it makes sense to just have continuous inputs that you can adjust the threshold of, or use as a continuous output. When using as a continuous output, it might make sense to provide a range mapping.

But basically, I want to design the binding system to be fairly open-ended, supporting different UI for different inputs/outputs, e.g. "dwell" may require multiple thresholds, and "run command" uniquely requires a text input.

How should inputs that can be discrete or continuous be mapped to an output? If mapped to a continuous output, they don't need the threshold (or may benefit from a range mapping instead), so it would be weird if the threshold was made part of the input. I guess it needs to be part of the binding itself.

Side note: it would be nice if profiles could inherit from each other. Otherwise, it would be very finicky maintaining threshold values duplicated across different profiles used as operational modes. Also, it should be an error to configure a profile to switch to itself.

First I need to implement:

Related: