Add check for up and down arrow.