Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am on a Macbook Pro with mac os x 10.8.2

I have set:

page up: \033[5~
page down: \033[6~

in terminal keyboard settings (pressing esc to get \033).

My ~/.xinputrc is:

# Be 8 bit clean.

set input-meta on
set output-meta on
set convert-meta off

# Auto completion options
set show-all-if-ambiguous on
set completion-ignore-case on

# Keybindings
"\e[1~": beginning-of-line       # Home key
"\e[4~": end-of-line             # End key
"\e[5~": history-search-backward # Page Up
"\e[6~": history-search-forward  # Page Down
"\e[3~": delete-char             # Delete key
"\e[5C": forward-word            # Ctrl+right
"\e[5D": backward-word           # Ctrl+left

I am just following a guide found on internet (actually there are a lot of guide really similar): http://macimproved.wordpress.com/2010/01/04/fix-page-updown-home-end-in-terminal/

Unfortunately, the only (terrific) result is that when I press page up (fn + up arrow) just a "~" is printed in the terminal.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I got it to work by just saving the commands to ~/.inputrc. .xinputrc is only used by X applications.

Don't you need page up and page down to scroll Terminal windows though? I've assigned the history-search commands to ⌥↑ and ⌥↓.

"\e\e[A": history-search-backward
"\e\e[B": history-search-forward
share|improve this answer
    
Perfect! For scrolling the terminal windows I prefer shift+pageup/down. –  Desmond Nov 29 '12 at 12:05

Check out iTerm2 (http://www.iterm2.com/) it does all the normal keyboard bindings you would expect in a linux/unix terminal. Also supports multiple split panes in both horizonatal and vertical at the same time.


share|improve this answer
    
Thank you. I will install it asap. –  Desmond Nov 29 '12 at 12:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.