Defining function keys

Alex Crain alex at wolf.umbc.edu
Thu Apr 6 04:52:32 AEST 1989


In article <1869 at umbc3.UMBC.EDU>, rostamia at umbc3.UMBC.EDU (Rouben Rostamian) writes:
		Is there a way to define function keys to execute
> certain commands in UNIX?  For example, can one press f17 (I have
> a vt220) to execute "/bin/ps -w -u smith"?  

	Well, sort of. Normally, the UNIX tty driver will not send a command
to the shell until the RETURN key is pressed. THis behaviour is configurable,
but the result is generally accompanied by a system slowdown.

	You can however, bind command to escape sequences using the csh 
alias feature. for example the above could be accomplished with:

	alias "[31~"	'ps -w -u smith'

and then be executed with the sequence:

	<F17><Ret>

					:alex
Alex Crain
Systems Programmer			alex at umbc3.umbc.edu
Univ Md Baltimore County		umbc3.umbc.edu!nerwin!alex



More information about the Comp.unix.questions mailing list