Sometimes the Page Up, Page Down, Home, and End keys don't work properly in Terminal.
To get it to work, open Terminal.app, go to Terminal -> Preferences -> Keyboard, and enter the following escape key sequences -
Key | Escape Sequence |
---|---|
home | \033[1~ |
end | \033[4~ |
page up | \033[5~ |
page down | \033[6~ |
CategoryComputing.Mac.Shell