Change behavior of <Enter> depending on cursor position