The switch has a printed circuit (1) with a laser diode (2) emitting a laser beam (7)and a photodetector (3). The circuit has an annular zone (8) located on a path of the laser beam and equipped with holograms generated by a computer constituting coding basic cells to carryout spatial coding of relative position of the circuit. The beam is diffracted by the holograms to constitute a binary optical code directly and instantaneously transformed into a binary electronic code, where the holograms are formed on a side of a sheet material whose another side is covered with an adhesive material.