handle pageup/pagedown keys
handle home/end keys