A foot pedal with a treadle that pivots up and down to vary its pitch, and/or side to side to vary its yaw. The pivot range of motion is divided into a plurality of zones, each zone configured to correspond to a respective virtual switch. When the treadle is pivoted into one of the zones, the corresponding virtual switch is activated. The virtual switch controls an operatively coupled device such as a handpiece used in a surgical procedure.