Creating an input manager?

Thank you for the insanely helpful post!

I’m starting to understand a bit better, but I’m still fuzzy in a couple of areas because of my inexperience with Lua and Defold.

How would you achieve this behavior with a Lua module? Would you instantiate a global of the Lua module in the input manager, update its values, and then read them from the player scripts during update() or something?

And also, if you clear the input state information every update, how do you guarantee it happens after all of the player scripts are done using it? The picture you posted says final() is called if a component is to be deleted.