Edit this page

fix Terminal.app so you can scroll

This page is about how to fix the stupid terminal that comes with Mac OS 10.x so that the page up and page down keys actually work.

By default they scroll the terminal up and down (like shift-page-up on in xterm). With older versions of Terminal.app this is hard-coded and not possible to fix short of updating the OS. (If you know what version this fix starts to work in please edit this page and stick it here.) With newer versions (it gets updated when you update the OS) you can remap keys.

BUT... you can't just enter the escape sequences... pressing escape does not put an escape char in the box. You can use some command line stuff to get it into the clipboard, and then paste it into the key binding preferences.

Here's how:

open up the "window settings" for terminal.app and go to the keyboard settings.

open the setting for page up. set it to "send string to shell"

now open a terminal window and do the following:

$ set echo_style=both

$ echo -en "\e[5~" | pbcopy

leave it open. we'll need it again in a minute.

now go back to the key binding window and paste into the string field.

close that and open the key binding window for page down.

back in the terminal window where you did the echo_style thing:

$ echo -en "\e[6~" | pbcopy

and then paste into the string field in the key binding window for page down.

save as defaults, and close the preferences window.

Edit this page · home ·