Files
cdesktop/docs/ksh/functions/emacs_keybind.txt
Jon Trulson 97ef0077f0 Squashed 'cde/programs/dtksh/ksh93/' content from commit b16c91f01
git-subtree-dir: cde/programs/dtksh/ksh93
git-subtree-split: b16c91f0120895eaae2618e821cac5b4eda27ac2
2022-08-27 13:53:17 -06:00

13 lines
362 B
Plaintext

typeset -A Keytable
trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD
function emacs_keybind
{
keybind $'\E[A' $'\020' # Up key
keybind $'\E[B' $'\016' # Down key
keybind $'\E[C' $'\06' # Right key
keybind $'\E[D' $'\02' # Left key
keybind $'\E[H' $'\01' # Home key
keybind $'\E[Y' $'\05' # End key
keybind $'\t' $'\E\E' # Tab for command-line completion
}