4

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.

3

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
  • 1
    Perfect! For scrolling the terminal windows I prefer shift+pageup/down. – Desmond Nov 29 '12 at 12:05
0

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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