[Korn Shell] Fixing Home, End, pgup, pgdown, and delete keys - Programming On Unix
Users browsing this thread: 2 Guest(s)
|
|||
When I first started using Korn Shell I found out that my Home, End, pgup, pgdown, and delete keys didn't work like the would in other shells. I started getting really frustrated.
Korn Shell is compatible with bash as a programming language, and has all the interactive capabilities of csh and more. Today I will show you how to fix this problem. In your .kshrc, set a KEYBD trap to translate the escape sequences from the function keys into the bindings for the commands you want the key to invoke. Open up your .kshrc with vim, and add the following. Code: set -o emacs Now you're going to have to edit it. In vim, remove the '\e[1~', then press CONTROL-V, you'll go into visual mode, now press the Home Key. Next, you'll want to edit the '\001' in the same line. You do the same as above, press control-V and press 001. Do the same for the rest. And that's it. :D Tested in FreeBSD and Slackware. Note: I noticed that this causes some conflicts with vim in FreeBSD. To fix this do the following. Code: nmap <Press control-v and then home here> <esc>0 |
|||