The invention relates to a detent mechanism for controlling translation between two components in a longitudinal direction, the detent mechanism comprising a resilient beam on one of the components and a rhomboid ramp member on the other component, the resilient beam being essentially straight when relaxed and having a first beam head and arranged to interact in a ramped engagement with respectively one of two ramps, each ramp on one longitudinal side of the rhomboid ramp member in such a manner that application of a translative force between the components in one longitudinal direction with the first beam head engaged to one of the ramps in a first state deflects the resilient beam in one transversal direction when a predetermined value of the translative force, at least depending on the resilience of the resilient beam, is overcome so as to allow the first beam head to travel along one transversal side of the rhomboid ramp member on continued relative translation of the components, wherein the resilient beam is allowed to relax when the first beam head has reached the other one of the ramps in a second state, wherein application of a translative force between the components in the other longitudinal direction with the first beam head engaged to the other one of the ramps deflects the resilient beam in the other transversal direction when a predetermined value of the translative force, at least depending on the resilience of the resilient beam, is overcome so as to allow the first beam head to travel along the other transversal side of the rhomboid ramp member on continued relative translation of the components.