A surgical system for an eye, the system comprising: a laser having an output surface, the output surface comprising a first sensing element; and a patient interface having a first end and a second end, the first end of the patient interface configured to couple to the laser, the second end configured to couple to the eye, the patient interface comprising: an interface lens having a first surface and a second surface, the first surface of the interface lens configured to contact the eye; and a second sensing element coupled to the second surface of the interface lens, the laser operable to couple the output surface with the second surface of the interface lens; the system further comprising a detector coupled to the plurality of capacitive electrodes, the detector configured to: determine when at least one of the plurality of capacitive electrodes couples to the second surface of the interface lens; and determine a capacitance change between the plurality of capacitive electrodes, the capacitance change indicating a relative position of the output surface of the laser with the second surface of the interface lens, wherein the first sensing element comprises a plurality of capacitive electrodes, wherein the second sensing element comprises a dielectric.