refactor shared input handling into Task::Inputable.