From: kappenman@carver.wa.com (Brett A. Kappenman)
Subject: Re: VT320 - define function keys ?
Date: 20 Mar 94 21:53:43 PST [thread overview]
Message-ID: <1994Mar20.215343.167@carver.wa.com> (raw)
In-Reply-To: 1994Mar19.173339@itek.norut.no
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 "_<CR>? "
$! 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 <SHIFT/F6> to be <CTRL/Y>EXIT<CR>
$!
$! $ EM[0,8] = %x19
$! $ UDK
$! _Key : F6
$! _Text : 'EM'EXIT
$! _<CR> : 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
------------------------------------+---------------------------------------
prev parent reply other threads:[~1994-03-21 5:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-03-19 17:33 VT320 - define function keys ? Torstein Meyer
1994-03-21 5:53 ` Brett A. Kappenman [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox