Move dispatching input to a superclass.