5

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.

2 Answers 2

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
2
  • 1
    Perfect! For scrolling the terminal windows I prefer shift+pageup/down.
    – Desmond
    Nov 29, 2012 at 12:05
  • Does not work. It is supposed to search using the letters that are already typed. E.g. cd then history-search is supposed to show the last command that started with cd .
    – Soerendip
    Oct 29, 2023 at 8:54
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.


0

You must log in to answer this question.

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