Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!pyrdc!pyrnj!mirror!garison From: garison@mirror.UUCP (Gary Piatt) Newsgroups: comp.unix.questions Subject: Re: Defining function keys Summary: a better way. Keywords: vt220, function keys Message-ID: <25120@mirror.UUCP> Date: 6 Apr 89 22:26:48 GMT References: <1869@umbc3.UMBC.EDU> Reply-To: garison@prism.TMC.COM (Gary Piatt) Organization: Very little Lines: 40 In article <1869@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 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 => =>-- =>Rouben Rostamian =>Department of Mathematics e-mail: =>University of Maryland Baltimore Counnty Rostamian@umbc2.bitnet =>Baltimore, MD 21228 rostamia@umbc3.umbc.edu