Hotkey program -- help needed

Douglas B. Jones douglas at dekalb.UUCP
Wed Jul 18 01:42:07 AEST 1990


In article <2101 at wheaton.UUCP> dwright at 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 at 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 at dekalb
Academic Computer Center		or	gatech!dekalb!douglas
DeKalb College
555 N. Indian Creek Drive/Clarkston, Ga. 30021  (404) 299-4233



More information about the Comp.unix.wizards mailing list