improve cursor move in mode change and done button