Speaking of controls, in our game I collect inputs from different devices (keyboard, mouse, gamepad, touch), and have a bunch of functions which mimic Keyboard/Gamepad conditions and return 0/1 value:
One benefit of this approach is that these functions can be used in complex expressions, for example:
Functions.OnKeyPressed("Confirm") | (Functions.OnKeyPressed("Use") & Player.isFlying=0)