[comp.os.vms] How to access function keys from programs?

mick@auspyr.UUCP (06/02/88)

I'm trying to understand how VMS permits use of function keys from within
user written processes, but all I've found so far is the DEFINE/KEY
command in the users guide.  Maybe someone can point me to the right manual
(DEC seems to have hundreds; we have only half a dozen!) with the info I
need and/or elucidate here.  I'm writing in C but examples in any language
will be fine.  I'm also using RMS calls directly, as the SMG routines
do not have sufficient features for me.

Ideally I would like access to the function keys on a vt220 keyboard (or
similar), as f1 thru f20.  The docu so far indicates that I need to
SET TERM/NOLINE_EDIT to enable f7 thru 16.

Which system routine can I call to do this from my program, and then
reset it upon termination?

In the light of some recent postings I am adding the following (sigh).
I will be happy to RTFM if someone tells me which FM to read.

Thanks in advance to those who want to help.
-- 
-------------------------------------------------------------------------
Michael Andrew        Sr. Systems Engineer    Austec, Inc.  San Jose CA.
mick@aussjo.UUCP  or amdahl!auspyr!mick       (408) 279 5533

RAD@VAX02.AMS.COM (RichDeJordy@KL.SRI.COM:info-vax-RELAY@KL.SRI.COM, (06/24/88)

Mike,

	It depends how far down you want to go!  

	The best manuals to read on this stuff are either the introductory
	sections of the system services manual, or the I/O user's guide
	(providing these still is such a beast).

	I just wrote a macro routine that uses $QIOW to read any single 
	key stroke and return it's ascii value.  (Actually that's not true.)

	It reads any single key or any function key and returns it's
	ascii value or a negative number of the key (for which I have 
	a chart) number... i.e. KP0 returns -40, KP1 returns -41.

	To simulate a single escape, escape is pressed twice, and a bad 
	escape sequence returns -50 (the error code) Key ranges are from
	1 -1 to -13, -17 to -21, -23 to -26, -28, -29, -31 to -49 and -50
	for an error code.

	this can be called as a function from higher level languages or
	in macro itself.  

	I can send it to you if you are interested.

Rich DeJordy
Systems Programmer
American Mathematical Society
201 Charles Street
Providence, RI 02140
(401) 272-9500
x295
-------