Terminal Function Key Escape Codes :: Phil! Gold - http://aperiodic.net/phil/archives/Geekery/term-function-keys...
I recently had the pleasure of trying to figure out a friend's terminal woes. His function keys weren't behaving properly. It turns out that his terminal was sending escape codes that differed from the terminfo definition his terminal was using. I set out to find what the correct solution was. These are my results. (Note that I use Debian GNU/Linux. Some of this may be Debian-specific.) ‎- Скажи это моей лошади