Add logic for pageup and pagedown button.