Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!lll-lcc!pyramid!prls!gordon From: gordon@prls.UUCP (Gordon Vickers) Newsgroups: comp.unix.questions Subject: Re: Defining function keys Message-ID: <21185@prls.UUCP> Date: 18 Apr 89 15:44:33 GMT References: <19157@adm.BRL.MIL> Reply-To: gordon@prls.UUCP (Gordon Vickers) Organization: Philips Research Labs, Sunnyvale, California Lines: 29 > In article <1869@umbc3.UMBC.EDU>, rostamia@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"? > YES! I've recently submitted a program that let's you quickly and very easily redefine function keys on any vt[23]xx . The program, keydef, allows you to maintain one or more files containing definitions for the function keys. I find having definition files based upon which application I want to run is very convenient. The files are created with your favorite editor in a very simply format. The program allows for mapping \r, \n, \t to 'return', 'newline', and 'tab'. It also allows mapping two charector sequences that begin with a carrot (^) into the appropriate control charector. As an additional aid, the program will allow redefining a single key straight from the command line. This is very helpful when the application allows shell escapes as in vi(1). It's real nice to escape from vi and program a key for something you'll need only for a particular session. I've recently summitted keydef to comp.sources.unix . If you don't see it posted within the next couple of weeks, drop me a line and I'll email it to those interested. Those interested may also wish to keep an eye on comp.sources.misc for the keydef posting since that may be a more appropriate place for it. Gordon Vickers 408/991-5370 (Sunnyvale,Ca); {mips|pyramid|philabs}!prls!gordon ------------------------------------------------------------------------------ Every extinction, whether animal, mineral, or vegetable, hastens our own demise.