Split input queue out of input events code.