Xref: utzoo comp.unix.questions:23827 comp.unix.ultrix:3981 comp.unix.wizards:22908 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!emory!emcard!dekalb!douglas From: douglas@dekalb.UUCP (Douglas B. Jones) Newsgroups: comp.unix.questions,comp.unix.ultrix,comp.unix.wizards Subject: Re: Hotkey program -- help needed Keywords: tty stuff Message-ID: <1018@dekalb.UUCP> Date: 17 Jul 90 15:42:07 GMT References: <2101@wheaton.UUCP> Reply-To: douglas@dekalb.UUCP (Douglas B. Jones) Organization: DeKalb College, Clarkston GA Lines: 40 In article <2101@wheaton.UUCP> dwright@wheaton.UUCP (David Wright) writes: >comp.lang.c >Keywords: tty stuff >I am trying to write a hotkey program in C that will be integrated into a menu >program on our system (Ultrix 3.0). It should allow users to type a certain >key (e.g. ^A) inside of VI or ELM or RN. They will then be presented with >a help menu. [Description of 3 methods omitted] >David Wright >dwright@wheaton.uucp Under BRL 4.2 there was a "hot key" (default ^T) that would print the current load averages up. I believe you could change the hot key to what ever character you wanted. If memory serves correctly, this was in the tty driver. This being the case, then you could put this in your tty driver. When ever the hot key is hit, then a routine could be called and your system wide menu program could be executed. This is a crude outline and might require a lot of work. For one, once you update the tty structure (header file) with the new element, *.hotkey, you then have to recompile everything that deals with that structure. This means kernal, library, system utilities, and local program recomps. I'm not sure if the BRL load average hot key could be turned off or not. If not, then it would be nice to set that element to a "null" value that would say this action is turned off. If memory serves correctly, the hot key would even work in raw mode. I think I am remembering wrong. Some other method might be better considering that DEC does not guarentee that the sources they send you (if you get them) will actually rebuild the current binary you have. So, buyer be ware. Cheers, Douglas -- Doulas B. Jones douglas@dekalb Academic Computer Center or gatech!dekalb!douglas DeKalb College 555 N. Indian Creek Drive/Clarkston, Ga. 30021 (404) 299-4233