1. An input device comprising: an input surface aligned with a plane; an optical sensor oriented toward the input surface, the optical sensor having an optical axis parallel to the plane and configured to detect an inplane aspect of a motion along the input surface and orthogonal to the optical axis, a vertical aspect of the motion towards or away from the input surface, and a looming aspect of the motion along the input surface and parallel to the optical axis; and one or more processors configured to process the vertical aspect of the motion and the looming aspect of the motion without processing the inplane aspect of the motion if the detected vertical or looming aspect of the motion exceeds a threshold amount.