added more keypress detection - move to top and bottom