Add a new parameter to the bindKey method to specify inputOptions. I have a case where more than one piece of information was needed in a call to sendInput, which is easy to achieve by directly calling it in an event handler but to bind that to a keypress meant manually repeating lots of the code already in KeyboardControls class.
This implementation allows for either the data to be passed, or a callback which allows for more generic handling.
Have kept the movement:true inputOption as I am unaware if that is actually needed internally but this could be a good time to remove that is somebody who knows more than me knows if it is needed.
Add a new parameter to the bindKey method to specify inputOptions. I have a case where more than one piece of information was needed in a call to sendInput, which is easy to achieve by directly calling it in an event handler but to bind that to a keypress meant manually repeating lots of the code already in KeyboardControls class.
This implementation allows for either the data to be passed, or a callback which allows for more generic handling.
Have kept the movement:true inputOption as I am unaware if that is actually needed internally but this could be a good time to remove that is somebody who knows more than me knows if it is needed.