1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/docs/ksh/functions/keybind.txt
Jon Trulson c9b8687604 Squashed 'cde/programs/dtksh/ksh93/' content from commit 66e1d4464
git-subtree-dir: cde/programs/dtksh/ksh93
git-subtree-split: 66e1d44642
2021-06-26 14:53:01 -06:00

14 lines
282 B
Text

typeset -A Keytable
trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD
function keybind # key action
{
typeset key=$(print -f "%q" "$2")
case $# in
2) Keytable[$1]='.sh.edchar=${.sh.edmode}'"$key"
;;
1) unset Keytable[$1]
;;
*) print -u2 "Usage: $0 key [action]"
;;
esac
}