bzar
A Commando
Background
Pyra uses a daemon process for turning raw input events from several input devices into a virtual keyboard, gamepad and a mouse. The daemon is an instance of FunKeyMonkey running the pyrainput plugin. The plugin is configured by /etc/pyrainput.cfg that can set stuff like what the nubs should do (mouse move, scroll, analog stick, click modes...) and such. There are also exportMouse, exportKeypad and exportGamepad flags for disabling sending specific types of events. Currently the main user-facing way of interacting with pyrainput is the pyrainputctl script, that modifies /etc/pyrainput.cfg and then signals the pyrainput daemon to reload the config using SIGUSR1.
Problem
As different use cases have emerged, a few issues have surfaced:
RFC
I'm considering adding the following features to pyrainput (in some time frame, I only have a few hours a week to hobby code nowadays)
Multivalue support would incur a slight latency cost in handling the events, though I'm not sure if it would ever be noticable.
This all would require some thought into what the default profiles should be and such. As my progress on implementing any of this is slow (help appreciated! the codebase is relatively simple modernish C++), I thought it could be helpful to crowdsource some thoughts before inflicting this on you people. The earlier we get this stuff sorted, the less people need to change their workflows and packages later on to accommodate the new ways of doing stuff.
Pyra uses a daemon process for turning raw input events from several input devices into a virtual keyboard, gamepad and a mouse. The daemon is an instance of FunKeyMonkey running the pyrainput plugin. The plugin is configured by /etc/pyrainput.cfg that can set stuff like what the nubs should do (mouse move, scroll, analog stick, click modes...) and such. There are also exportMouse, exportKeypad and exportGamepad flags for disabling sending specific types of events. Currently the main user-facing way of interacting with pyrainput is the pyrainputctl script, that modifies /etc/pyrainput.cfg and then signals the pyrainput daemon to reload the config using SIGUSR1.
Problem
As different use cases have emerged, a few issues have surfaced:
- Sometimes packages require specific input modes (like having the nubs in analog stick mode instead of a mouse). It's very unergonomic to require the user to change the mode beforehand using pyrainputctl and equally bad to have the package call pyrainputctl (requires sudo, hard to revert to previous state afterwards)
- There are cases where a key should do multiple things, like a nub act as both an analog stick and a mouse. Currently this is not configurable as each configuration key only takes a single value, so it would need to be hard coded and controlled with the exportX values, meaning no swapping nubs to your liking and such.
- If the inputs are in some wonky state (like all exportX values are false), it's kinda hard to get back to a safe state without resorting to SSHing into the device
RFC
I'm considering adding the following features to pyrainput (in some time frame, I only have a few hours a week to hobby code nowadays)
- Multivalue support to pyrainput configuration
- Configuration file loading with key combos
- Configuration injection through a /var/run/pyrainput pipe to pyrainput
Multivalue support would incur a slight latency cost in handling the events, though I'm not sure if it would ever be noticable.
This all would require some thought into what the default profiles should be and such. As my progress on implementing any of this is slow (help appreciated! the codebase is relatively simple modernish C++), I thought it could be helpful to crowdsource some thoughts before inflicting this on you people. The earlier we get this stuff sorted, the less people need to change their workflows and packages later on to accommodate the new ways of doing stuff.