1. A light-based touch surface for an electronic device, comprising: a housing that exposes an upper surface of an encased component that enables user input to an electronic device; a plurality of infra-red light emitting diodes (LEDs), situated inside said housing below the upper surface of the encased component, for generating light beams; at least one LED selector, fastened on said housing and connected with said LEDs, for controllably selecting and deselecting one or more of said LEDs; a plurality of photodiode (PD) receivers, situated inside said housing below the upper surface of the encased component, for generating output currents in accordance with received light beam intensities; at least one PD selector, fastened on said housing and connected with said PD receivers, for controllably selecting and deselecting one or more of said PD receivers; a first lens, fastened on said housing and in contact with the upper surface of the encased component, for projecting and distributing light beams generated by said LEDs above and across the upper surface at a plurality of heights above the upper surface; a second lens, fastened on said housing and in contact with the upper surface of the encased component, for collecting and directing the light beams projected and distributed by said first lens onto said PD receivers; and a controller, fastened on said housing and coupled with said at least one LED selector, with said at least one PD selector and with said PD receivers, (i) for controlling said at least one LED selector, (ii) for controlling said at least one PD selector, and (iii) for detecting position of an object by measuring light intensities at various heights above the upper surface of the encased component, based on the resulting output currents of said PD receivers.