Auto detent mechanism