Use of function keys for common comands at the ksh prompt.

Augustine Cano afc at shibaya.lonestar.org
Mon Feb 18 10:57:21 AEST 1991


I would like to use my function keys (F1-F8) to save keystrokes.
My keyboard generates "ESC O c-j" for F1-F8 respectively.  The ideal
solution is of course to have a separate ksh function that responds
to the escape sequence of each individual function key, whose content
would execute the desired command(s).  The problem is that ksh doesn't
like the leading escape.  This makes sense since ESC is used in the vi
editing mode.

Is there a way to use the escape sequences generated by the function keys
as function names?  Alternatively, is there another way to accomplish
the same thimg? (at the ksh level, of course; I know the keyboard driver
could be modified, but this is not an option.)  Other programs use
the function keys for other purposes, so these definitions should only
work at the ksh prompt.

Any solutions/hints would be most welcome.  I'll summarize e-mail responses.
Thanks

-- 
Augustine Cano		INTERNET: afc at shibaya.lonestar.org
			UUCP:     ...!{ernest,egsner}!shibaya!afc



More information about the Comp.unix.shell mailing list