Ok. My Terminal.app escapade has a bit gone out of hand so I decided to make a new post with all settings I changed.
Open your Terminal.app preferences and set it to xterm (xterm-color doesn't work very well in most places).
Open the window settings and delete all Settings for page up / down, home, end and delete (with all modifier variations).
Now set it up like this:
Home: \033[~1
End: \033[~4
Shift + Home: scroll to start of buffer
Shift + End: scroll to end of buffer
Delete: \033[~3
Page Up: \033[~5
Page Down: \033[~6
Shift + Page Up: scroll to previous page in buffer
Shift + Page Down: scroll to next page in buffer
To get a nice behaviour on the shell now edit your ~/.inputrc like this:
# Be 8 bit clean.
set input-meta on
set output-meta on
set convert-meta off
# allow the use of the Home/End keys
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# allow the use of the Delete/Insert keys
"\e[3~": delete-char
"\e[2~": quoted-insert
# mappings for "page up" and "page down"
# to step to the beginning/end of the history
"\e[5~": beginning-of-history
"\e[6~": end-of-history
At last to get Shift+Page working with screen add the following lines to your ~/.screenrc:
termcapinfo xterm ti@:te@
defscrollback 1 #Will be handled localy
I learned a lot from
this article but it was a bit imprecise concerning to the page up / down buttons and didn't provide the screenrc options. That's why I decided to make a new post.
Update:
To remove the scrollbar while not losing the buffer in your Terminal.app edit the following lines in your .term or .plist file:
<key>Scrollbar</key>
<string>NO</string>