A method for operating an optical motion sensing device comprising a light source and a photodetector device, said method comprising the steps of: a) illuminating a surface portion with radiation by means of the light source; b) detecting radiation patterns reflected from the illuminated surface portion by means of the photodetector device; c) extracting motion features from the detected radiation patterns by comparing light intensity between pixels of said photodetector device by means of comparators (315; 401), each of these comparators receiving at its first and second inputs respectively first and second voltage values (V1, \/2), which respectively correspond to two light intensities respectively measured on a first pixel and on a second pixel, and outputting at its outpout (Vs) an edge data depending on the comparison between these first and second voltage values, this edge data being descriptive of a light intensity difference between the first and second pixels and including a positive edge defined as a condition wherein the light intensity of the first pixel is less than the light intensity, of the second pixel and a negative edge defined as a condition wherein the light intensity of the first pixel is greater than the light intensity of the second pixel; d) detecting and measuring displacement with respect to the illuminated surface portion based on said extracted motion features; e) determining whether the optical motion sensing device is moving or at rest by e1) outputting motion reports that are each representative of a magnitude of the detected displacement, and e2) comparing the magnitude of the detested displacement with a displacement threshold; characterized in that said comparators have each a determined hysteresis voltage between their first and second inputs, this determined hysteresis voltage being adjustable; and in that this method comprises the following further step of f) adjusting said determined hysteresis voltage of all said comparators between at least a low hysteresis value (VLhyst; K1) and a high hysteresis value (VHhyst; K2) in function of the state of the optical motion sensing device determined in step e), the low hysteresis value and the high hysteresis value being respectively for a state of the optical motion sensing device wherein it is moving and a state tof this optical motion sensing device wherein it is at test. a) illuminating a surface portion with radiation by means of the light source; b) detecting radiation patterns reflected from the illuminated surface portion by means of the photodetector device; c) extracting motion features from the detected radiation patterns by comparing light intensity between pixels of said photodetector device by means of comparators (315; 401), each of these comparators receiving at its first and second inputs respectively first and second voltage values (V1, \/2), which respectively correspond to two light intensities respectively measured on a first pixel and on a second pixel, and outputting at its outpout (Vs) an edge data depending on the comparison between these first and second voltage values, this edge data being descriptive of a light intensity difference between the first and second pixels and including a positive edge defined as a condition wherein the light intensity of the first pixel is less than the light intensity, of the second pixel and a negative edge defined as a condition wherein the light intensity of the first pixel is greater than the light intensity of the second pixel; d) detecting and measuring displacement with respect to the illuminated surface portion based on said extracted motion features; e) determining whether the optical motion sensing device is moving or at rest by e1) outputting motion reports that are each representative of a magnitude of the detected displacement, and e2) comparing the magnitude of the detested displacement with a displacement threshold; characterized in that said comparators have each a determined hysteresis voltage between their first and second inputs, this determined hysteresis voltage being adjustable; and in that this method comprises the following further step of e1) outputting motion reports that are each representative of a magnitude of the detected displacement, and e2) comparing the magnitude of the detested displacement with a displacement threshold; f) adjusting said determined hysteresis voltage of all said comparators between at least a low hysteresis value (VLhyst; K1) and a high hysteresis value (VHhyst; K2) in function of the state of the optical motion sensing device determined in step e), the low hysteresis value and the high hysteresis value being respectively for a state of the optical motion sensing device wherein it is moving and a state tof this optical motion sensing device wherein it is at test.