Implemented generic input handling