Add the control of threshold distance with up & down keys