Defining function keys
Gary Piatt
garison at mirror.UUCP
Fri Apr 7 08:26:48 AEST 1989
In article <1869 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"? ~~~~~~
~~~~~~~
Good for you! In my own opinion, the only thing better than a DEC
vt220 is a Visual Technology v220 (because it has my name on it).
Personally, for this particular problem, I would stop trying to make
Unix do things it doesn't want to do and start making the vt220 do
things is *supposed* to do. Check your user's manual (if you don't
have one, just email to me and I'll look this up at home); there's
a command sequence there for programming the function keys. It's
something like:
ESC P kn X {string} ESC \
kn = the key number
X = the terminator character -- I don't remember
what it is (it's in the manual)
{string} = whatever you want programmed
Save a bunch of these in a file somewhere and cat the file to your
terminal during your .login. Then, when you want one of those
functions, press <SHIFT><f17> and the terminal does the rest.
Better yet, junk the DEC and tell your boss you want a Visual 220
{andd *don't* let them sell you a 215!); the keys can be programmed
locally and saved in non-volatile ROM.
-Garison-
PS: if you get the 220, go into Set-up and press <CTRL><SHIFT><?>
=>
=>--
=>Rouben Rostamian
=>Department of Mathematics e-mail:
=>University of Maryland Baltimore Counnty Rostamian at umbc2.bitnet
=>Baltimore, MD 21228 rostamia at umbc3.umbc.edu
More information about the Comp.unix.questions
mailing list