Binding Key presses and mouse clicks

Ability to bind key presses or mouse clicks to state machines or data binds

Ability to track the amounts of clicks or button presses for an action to happen. Eg "press X 4 times to activate"