Conversation
cc917f7 to
db07126
Compare
db07126 to
829aad2
Compare
|
Neat |
|
Question: Why did you decide to make the event scripting feature required and not optional instead? As an enhancement, if the feature is intended to be included by default, I think it would be a plus to allow it be disabled when compiling Input Plumber. |
We can make this feature optional via a compilation flag. It does not need to be required. |
|
Aside from a rebase, what is this waiting on? |
This change needs better error handling to include. I'm still not completely sure that this feature will be useful enough to maintain. I think this was an interesting experiment, but I'm not sure if the extra complexity is worth it. |
This change adds Lua scripting support for custom input routing. Users can now write Lua scripts to add custom input routing and translation logic that can be executed on every input event in the input pipeline.
Whenever a new composite device is initialized, each composite device instantiates its own Lua runtime instance and will load any lua scripts from the following directories:
/etc/inputplumber/scripts.d/usr/share/inputplumber/scriptsEach script should return a lua table containing function(s) that will get executed by the composite device at certain stages of the input processing pipeline. This can allow users to easily implement their own custom input routing logic.
It can also be used as a pretty nice debugging tool. For example, this script will print whenever certain input events are emitted:
Fixes #238