Keybindings in Mac OS X 10.4's

I use PINE as my email client.

Why are you living in the late 1970s?” you ask.

But I’ll refrain from answering that question for now. And I’ll even refrain from correcting you in that PINE wasn’t available until 1989.

And, so, in fighting the ongoing war against email, I tend to spend a lot of my day interacting with Mac OS X’s I SSH into one of our Fedora Core Linux servers and run PINE there.

The default keybindings used by leave a bit to be desired, however – particularly when editing in a visual editor such as PINE’s PICO. Home, End, Page-Up, and Page-Down – as is typical on Mac – all modify the viewport, but not the location of the cursor. And, coming from using X-Window on Linux for the last twelve years, I’m a bit frustrated when pressing Home whisks me to the beginning of the buffer, rather than the beginning of the current line I’m editing.

It’s actually pretty easy to modify the keybindings – go to Terminal / Window Settings / Keyboard – but you need to know the right escape sequences.

Here’s what I find useful to replace:

Key Escape Sequence
End \033[4~
Home \033[1~
Page-Down \033[6~
Page-Up \033[5~

Page-Up / Page-Down Before: Page-Up / Page-Down After:
Keybindings, before Keybindings, after

Much better.

Steve Mokris is a developer at Kosada, Inc.