Path: utzoo!utgpu!water!watmath!clyde!rutgers!iuvax!bsu-cs!cfchiesa From: cfchiesa@bsu-cs.UUCP (Christopher F. Chiesa) Newsgroups: comp.os.vms Subject: Re: DEFINE/KEY Summary: Not in DCL... Keywords: Define/key/terminate Message-ID: <1773@bsu-cs.UUCP> Date: 4 Jan 88 04:24:42 GMT References: <676@umbc3.UMD.EDU> Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 54 In article <676@umbc3.UMD.EDU>, rostamia@umbc3.UMD.EDU (Dr. Rouben Rostamian ) writes: > > 1. Does anyone know how to define the up-arrow and down-arow keys in > DCL? > > 2. Does anyone know how to define some of the typing keys in DCL? > For example, something equivalent to the silly definition > $ define/key/terminate pf1 "show users" > with the typing key "A", for instance, substituted for pf1. > > 3. Does anyone know how to use INQUIRE or READ to enter only one > character with one keystroke, without having to press Return? Your three questions are all really aspects of the same thing. If you could perform (3) in DCL, you could write a command procedure to perform selected commands at the press of whatever key you wished, effectively implementing (1) and/or (2). Personally I'd avoid (2), unless you were absolutely certain you'd never want to type, say, the letter "A", for any purpose OTHER than to invoke your defined command! How would DCL know whether you were typing the defined key "A" meaning "show users," as opposed to a letter "A" that happened to appear as part of some other command? On the face of it (I haven't medi- tated on it or anything) this seems like an unwise thing to do. However, as far as I know, there is currently no way to perform any of these functions in DCL; in one sense, it just comes down to what the folks at DEC choose to include in DCL's input-handling capabilities. ALL computer keyboard input is based on reading characters one at a time and storing them someplace in memory; in DCL and other line-input environments, however, this takes place "internally," and there don't seem to be any "hooks" provided for the DCL user to access this input mode directly. It CAN be accessed from a VMS programming language, by use of the $QIO system service or (for example) an easier-to-use SMG$ get-single-character routine. Programs which allow you to "define keys" simply read individual characters this way and do their own processing. In DCL, READ and INQUIRE perform strictly line-oriented input; character-by- character input is hidden from us, and the RETURN character is required to terminate line input. DEFINE/KEY acts at an intermediate level, allowing us to specify SOME alternative input processing, but flexibility is limited, and ultimately NONE of these commands supports character-level terminal input. In my job at BSU's "computing services help desk," I've encountered this question many times, and it seems strange to me that character-level input ISN'T available in DCL. It seems as though it should be an almost ridiculously simple modification to VMS, one which ought not adversely affect compatibility with previous versions. I'd be interested in hearing DEC's rationale, if anyone familiar with it would care to respond. Chris Chiesa Senior, CS Dept. Ball State University Muncie, IN