From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,1cbf04154c414e1f X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-03-20 21:53:43 PST Path: gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!cs.utexas.edu!uunet!nwnexus!carver.wa.com!kappenman From: kappenman@carver.wa.com (Brett A. Kappenman) Newsgroups: comp.sys.dec Subject: Re: VT320 - define function keys ? Message-ID: <1994Mar20.215343.167@carver.wa.com> Date: 20 Mar 94 21:53:43 PST References: <1994Mar19.173339@itek.norut.no> Organization: Carver Corporation, Lynnwood, WA In article <1994Mar19.173339@itek.norut.no>, torstein@itek.norut.no (Torstein Meyer) writes: > > Could someone please leave me a note on defining function keys on a DEC VT320 terminal; escape sequences, limitations, features, which keys, tricks, pitfalls, alternatives ..... > Would shure be nice utilizing this feature .. > -- > Torstein Meyer (Sys.Cons.) +47 77680150 (fax:77682420) > NORUT IT AS, NORUT-gruppen AS, N-9005 Tromsoe, Norway > torstein.meyer@itek.norut.no > C=no;A=;P=uninett;O=norut;OU=itek;CN=torstein.meyer I believe this program came from Kevin Bates who write the columns DCL Dialogue for DEC professional (they haven't change the name yet ;-). This allows you to program the "shifted function" keys from DCL. There may be other ways. ----Program begin---- $! UDK.COM defines shifted functions keys F6...F14, $! HELP, DO, F17...F20 $! Input parameters not on command line $! Key Name: $ IF P1 .EQS. "" THEN INQUIRE P1 "_Key " $! Text String: $ IF P2 .EQS. "" THEN INQUIRE P2 "_Text " $! Terminate with return $ IF P3 .EQS. "" THEN INQUIRE P3 "_? " $! Check key an determine key number $! for download sequence $ KEYS="F6/F7/F8/F9/F10//F11/F12/F13/F14//HELP/DO//F17/F18/F19/F20" $ KEY=0 $LOOP1: $ IF P1 .EQS. F$ELEMENT(KEY,"/",KEYS) THEN GOTO GOOD_KEY $ KEY = KEY + 1 $ IF KEY .LT. 18 THEN GOTO LOOP1 $ WRITE SYS$OUTPUT "Unrecognized key." $ EXIT $GOOD_KEY: $ KEY=F$STRING(KEY+17) $! Generate hex representatiion of each character $! in the text string $ HEX = "" $ CHAR = 0 $LOOP2: $ HEX=HEX+F$FAO("!XB",F$CVUI(CHAR*8,8,P2)) $ CHAR=CHAR+1 $ IF CHAR .LT. F$LENGTH(P2) THEN GOTO LOOP2 $! Add optional carriage retrun (default) $ IF P3 .EQS. "" .OR. P3 THEN HEX=HEX+"0D" $! Create control characters and define the key $ DCS[0,8]=%X90 $ ST[0,8]=%X9C $ WRITE SYS$OUTPUT DCS+"1;1|"+KEY+"/"+HEX+ST $ EXIT $! Examples: $! $ UDK == "@DB$COM:UDK" $! $ USK F10 "Anytown, Anystate 99999-9999" y $! $! Define to be EXIT $! $! $ EM[0,8] = %x19 $! $ UDK $! _Key : F6 $! _Text : 'EM'EXIT $! _ : y ----Program end---- ------------------------------------+--------------------------------------- The opinions expressed are entirely | Brett Kappenman, Systems Manager my own and not necessarily those of | Carver Corporation, Lynnwood, WA, USA the management. | kappenman@carver.wa.com ------------------------------------+---------------------------------------