[comp.protocols.tcp-ip.ibmpc] NCSA Telnet 2.3b15 keyboard arrow woes

PKLAMMER@CUDNVR.DENVER.COLORADO.EDU (Pete Klammer 303/556-3915) (05/31/91)

Help!  I can't get my arrow keys to work.  MS-KERMIT gets it right, why can't
TELNET do it?  

I have a Zenith-158 (2-speed XT clone), with a Northgate Omnikey/102 
aftermarket keyboard (CTRL on the home row, where god intended it to be).

With NUMLOCK 'ON', the MS-KERMIT SCANCHECK program reports the same
scancodes for the the arrow keys as the numeric keypad keys, but the
subtle distinction seems to be that 'second byte' from BIOS, which is
NULL in the case of the grey arrow key, and an ASCII digit character
in the case of the numeric keypad (e.g., '8').

Every machination of the TELNET.KEY file I have tried fails to
recognize the distinction between the grey arrow keys and the numeric
keypad: either they are both numeric (and I don't have any arrows at
all, i.e., grey uparrow produces an '8') or they are both arrows
(i.e., keypad 8 is never 8, is always uparrow).  Any ideas?

--poko "Eesti vabaks=Free Estonia!" Pete Klammer (303)556-3915 FAX(303)556-4822
CU-Denver Computing Services, AHEC Box#169   ///       PKLAMMER@CUDENVER.bitnet
1200 Larimer St, NC2506, Denver CO 80204  ///    {uucp}!boulder!copper!pklammer
P.O. Box 173364, Denver CO 80217-3364  ///  pklammer@cudnvr.Denver.Colorado.EDU

PKLAMMER@CUDNVR.DENVER.COLORADO.EDU (Pete Klammer 303/556-3915) (06/01/91)

It's working now... My problems arose from confusion between
TELNET.KEY, a required file of fixed name from the same path as
TELBIN.EXE is run from, and the KEYFILE= command in CONFIG.TEL, which
may augment, but not replace, the TELNET.KEY file.  I had pointed
KEYFILE= to my own TELKEY.SET file, and as I edited that, things
weren't changing as I expected.

TELNET complains if TELNET.KEY is not found, but it does not seem to
care if the KEYFILE= file is not found.  I have commented off the
KEYFILE= line, and my TELNET.KEY file now looks like this:
================================================================
; keyboard mapping for NCSA Telnet -- Omnikey/102 on Z158 (f1-f10 on the left)
;	DO NOT REMOVE FROM DIRECTORY TELBIN IS LOCATED IN!!
;	Emulates a vt100 keyboard

; Definitions for vt100 cursor keys
set key \328	\Kuparr		; grey up arrow for vt100 uparrow
set key \336	\Kdnarr		; grey down arrow for vt100 downarrow
set key \331	\Klfarr		; grey left arrow for vt100 leftarrow
set key \333	\Krtarr		; grey right arrow for vt100 rightarrow

; Definitions for vt100 keypad keys
;  unshifted f1-f10 emulate "left half" of VT100 application keypad
set key \315	\Kpf1		; F1 = vt100 function key 1
set key \316	\Kpf2		; F2 = vt100 function key 2
set key \317	\Kkp7		; map 7 on keypad to vt100 keypad 7
set key \318	\Kkp8		; map 8 on keypad to vt100 keypad 8
set key \319	\Kkp4		; map 4 on keypad to vt100 keypad 4
set key \320	\Kkp5		; map 5 on keypad to vt100 keypad 5
set key \321	\Kkp1		; map 1 on keypad to vt100 keypad 1
set key \322	\Kkp2		; map 2 on keypad to vt100 keypad 2
set key \323	\Kkp0		; map 0 on keypad to vt100 keypad 0
set key \324	\Kkp0		; map 0 on keypad to vt100 keypad 0
;  Shifted F1-F10 emulate "right half" of VT100 application keypad
set key \852	\Kpf3		; F3 = vt100 function key 3
set key \853	\Kpf4		; F4 = vt100 function key 4
set key \854	\Kkp9		; map 9 on keypad to vt100 keypad 9
set key \855	\Kkpminus	; map - on keypad to vt100 keypad -
set key \856	\Kkp6		; map 6 on keypad to vt100 keypad 6
set key \857	\Kkpcoma	; map + on keypad to vt100 keypad ,
set key \858	\Kkp3		; map 3 on keypad to vt100 keypad 3
set key \859	\Kkpenter	; map enter on keypad to vt100 keypad enter
set key \860	\Kkpdot		; map . on keypad to vt100 keypad .
set key \861	\Kkpenter	; map enter on keypad to vt100 keypad enter
;  digits are digits
set key \839	7
set key \840	8
set key \841	9
set key \843	4
set key \844	5
set key \845	6
set key \847	1
set key \848	2
set key \849	3
set key \850	0
set key \851	.

; Other keys on keypad
set key \311	*		; keypad * sends *
set key \330	-		; keypad - sends -
set key \334	+		; keypad + sends +

; Leftovers
set key \271	\9		; Tab = ctrl-i
================================================================

This is still basic, since I haven't turned on any fancy CTRL+ or ALT+
things for EMACS or whatever, but I have arrows and digits, and I'm happy!

--poko "Eesti vabaks=Free Estonia!" Pete Klammer (303)556-3915 FAX(303)556-4822
CU-Denver Computing Services, AHEC Box#169   ///       PKLAMMER@CUDENVER.bitnet
1200 Larimer St, NC2506, Denver CO 80204  ///    {uucp}!boulder!copper!pklammer
P.O. Box 173364, Denver CO 80217-3364  ///  pklammer@cudnvr.Denver.Colorado.EDU

CASERTA@JHUVM.BITNET (Rich Caserta) (06/06/91)

On Fri, 31 May 91 10:48:00 MST Pete Klammer 303/556-3915 said:
>It's working now... My problems arose from confusion between
>TELNET.KEY, a required file of fixed name from the same path as
>TELBIN.EXE is run from, and the KEYFILE= command in CONFIG.TEL, which
>may augment, but not replace, the TELNET.KEY file.  I had pointed
>KEYFILE= to my own TELKEY.SET file, and as I edited that, things
>weren't changing as I expected.
>
>TELNET complains if TELNET.KEY is not found, but it does not seem to
>care if the KEYFILE= file is not found.
[ ... stuff deleted ...]
>This is still basic, since I haven't turned on any fancy CTRL+ or ALT+
>things for EMACS or whatever, but I have arrows and digits, and I'm happy!

I have a related question: What if you want to REPLACE key mappings depending
on the host you want to Telnet to?   For example, what if you want, function
keys mapped to send one set of codes to an IBM mainframe, AND LATER, want them
mapped differently to send other codes to a VAX running WordPerfect?

Do you just have different keyfiles for each host with the changed codes,
or do you need to make "alternate" TELNET.KEY files that are used for
each particular host?  In other words, is the "KEYFILE=" parameter used
only to "augment" what's in TELNET.KEY, or will new entries for the same
key in a "KEYFILE=" file "replace" what was done in TELNET.KEY?

Or, maybe it's possible to have a very stripped down TELNET.KEY, and put
the varying key mapping info into the "KEYFILE=" files...?...  How do
others do it?

-----------------------
Rich Caserta
Homewood Academic Computing/Johns Hopkins University
CASERTA@JHUVM.HCF.JHU.EDU (or JHUVM.BITNET)

paul@k9.hawkesbury.uws.EDU.AU (Paul Hardaker) (06/06/91)

CASERTA@JHUVM.BITNET (Rich Caserta) writes:

>On Fri, 31 May 91 10:48:00 MST Pete Klammer 303/556-3915 said:
>>It's working now... My problems arose from confusion between
>>TELNET.KEY, a required file of fixed name from the same path as
>>TELBIN.EXE is run from, and the KEYFILE= command in CONFIG.TEL, which
>>may augment, but not replace, the TELNET.KEY file.  I had pointed
>>KEYFILE= to my own TELKEY.SET file, and as I edited that, things
>>weren't changing as I expected.
>>
>>TELNET complains if TELNET.KEY is not found, but it does not seem to
>>care if the KEYFILE= file is not found.
>[ ... stuff deleted ...]
>>This is still basic, since I haven't turned on any fancy CTRL+ or ALT+
>>things for EMACS or whatever, but I have arrows and digits, and I'm happy!

>I have a related question: What if you want to REPLACE key mappings depending
>on the host you want to Telnet to?   For example, what if you want, function
>keys mapped to send one set of codes to an IBM mainframe, AND LATER, want them
>mapped differently to send other codes to a VAX running WordPerfect?

Not sure about NCSA Telnet, but CUTCP (Clarkson Uni version of NCSA Telnet)
allows the addition of the 'keyfile=' to each of your host definition lines
in CONFIG.TEL. Eg,

name=host1 ; hostip=w.x.y.z ; keyfile=host1.key
name=host2 ; hostip=a.b.c.d ; keyfile=host2.key

and so on.

You could try this with NCSA Telnet, otherwise, try using CUTCP.

Paul Hardaker