updates selection on space key pressed