The difference in the way PageUp/Pagedown keys are handled by Terminal.app vs iTerm2.app

itermkeyboardterminal

I had an SOF question about the ipython REPL handling of scrolling https://stackoverflow.com/q/65385315/1056563

Cycle through ipython “history” with one keystroke per item even when multiple lines

I discovered there is a difference in how the Terminal.app handles of PageUp/PageDown:

This turns out to be specific to the macOS Terminal app handling of PageUp / PageDown. iTerm2 instead has the desired behavior of scrolling the history using those keystrokes.

What are the differences between how those keys are handled between these App's? Can the iTerm2 behavior be replicated in the Terminal.app ?

Best Answer

After messing around with different key combinations it seems that Shift-[PageUp/PageDn] in Terminal.app has the same effect in ipython as simply [PageUp/PageDn] in iTerm2. I'm still not sure how/where those settings live - maybe ~/.inputrc ?