Open IceSentry opened 4 years ago
The actions are currently defined in https://github.com/clubcapra/capra_web_ui/blob/master/src/renderer/utils/InputSystem/index.ts
Consider maybe putting this somewhere that isn't the utils
folder.
The actions will still need to be defined in the code by a programmer, but the bindings could be loaded from a redux store indexed by the action name as a key. Once this store is in place it should be pretty easy to create a config page to show and modify the store. It could be a table similar to what is done for the cameras and the graphs.
Each row should have the action name in a dropdown and a dropdown for the binding type. Once the binding type is selected. Choose the best way to display each type. For example, a keyboard binding could simply take a string as an input with a checkbox for the onKeyDown while a gamepad button binding could use a dropdown with all the buttons listed.
The new input system is configurable in code, but a user can't change the code.