Sensor module, comprising: - a plurality of optical emitters (5a, 5b) that are configured to emit light beams (9a, 9b) in the direction of a detection space; - a plurality of optical sensors that are configured to sense light of the light beams (9a, 9b) which is scattered by a command element used by a user to perform a gesture intended to trigger the execution of a command; and - a contact surface that is at least partially transparent to the light of the light beams (9a, 9b), which surface is placed upstream of the optical sensors; wherein: - some of the optical emitters are configured to emit short-range light beams the light of which scattered by the command element M is captured by the optical sensors; - the sensor module includes an interface with a control unit configured to determine the position of the command element for executing the gesture with respect to a preset distal distance with respect to the contact surface defining a press frontier, and to interpret gestures detected in proximal positions with respect to said press frontier by sensing the light of the short-range light beams with the optical sensors as presses or presses slid over the contact surface; - some of the optical emitters are configured to emit long-range light beams the light of which scattered by the object used by the user to perform the gesture is captured by the optical sensors beyond the preset distance defining the press frontier; - and in that the control unit is configured to interpret gestures detected in distal positions with respect to said press frontier by sensing the light of the long-range light beams with the optical sensors as distal gestures; and the sensor module being characterized in that the control unit is furthermore configured to introduce a latency time between the detection of a gesture and the execution of the associated command so that if the command element is detected in a proximal position with respect to the press frontier, the commands corresponding to gestures that have been detected but not yet taken into account are then not executed. - a plurality of optical emitters (5a, 5b) that are configured to emit light beams (9a, 9b) in the direction of a detection space; - a plurality of optical sensors that are configured to sense light of the light beams (9a, 9b) which is scattered by a command element used by a user to perform a gesture intended to trigger the execution of a command; and - a contact surface that is at least partially transparent to the light of the light beams (9a, 9b), which surface is placed upstream of the optical sensors; - some of the optical emitters are configured to emit short-range light beams the light of which scattered by the command element M is captured by the optical sensors; - the sensor module includes an interface with a control unit configured to determine the position of the command element for executing the gesture with respect to a preset distal distance with respect to the contact surface defining a press frontier, and to interpret gestures detected in proximal positions with respect to said press frontier by sensing the light of the short-range light beams with the optical sensors as presses or presses slid over the contact surface; - some of the optical emitters are configured to emit long-range light beams the light of which scattered by the object used by the user to perform the gesture is captured by the optical sensors beyond the preset distance defining the press frontier; - and in that the control unit is configured to interpret gestures detected in distal positions with respect to said press frontier by sensing the light of the long-range light beams with the optical sensors as distal gestures;