Fix for PageUp/PageDown

Works in midnight commander and nano this way, not sure if proper fix