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 ?

1 Answer 1


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 ?

  • Terminal.app (and iTerm) couldn't care less about the contents of your inputrc file, that's for shells that use readline. What's happening is that whatever keystrokes the shell you're using expects for this function are being sent by iTerm, and not by Terminal. Look at what iTerm is sending for PgUp/PgDown, configure Terminal.app to use the same. Commented Dec 30, 2020 at 20:49
  • @MarcWilson Seems a useful explanation - feel free to make an answer on it Commented Dec 30, 2020 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .