[comp.sys.att] the shform program

rlw@ttardis.UUCP (Ron Wilson) (01/05/90)

Since not all terminals have a line feed key (ie: \n), I would
like to be able to have the shform program (and the associated
form() and menu() functions accept return (ie: \r) as an
alternative to line feed, aka Enter (ie: \n).

Is there any way to do this?

(I've tried modifying the kmap.* files in /usr/lib/ua, but
this didn't work)

Thanks in advance.

- Ron Wilson
rlw@ttardis
sharkey!cfctech!ttardis!rlw
uunet!edsews.eds.com!rel!ttardis!rlw

bamford@cbnewsd.ATT.COM (harold.e.bamford) (01/06/90)

In article <2413@ttardis.UUCP> rlw@ttardis.UUCP (Ron Wilson) writes:
>Since not all terminals have a line feed key (ie: \n), I would
>like to be able to have the shform program (and the associated
>form() and menu() functions accept return (ie: \r) as an
>alternative to line feed, aka Enter (ie: \n).

Not a good idea as \r and \n have different meanings in shform.  I
suggest that you just use ^J (control J) instead of linefeed.

x
x
x
x
x

john@banzai.PCC.COM (John Canning) (01/08/90)

>In article <2413@ttardis.UUCP> rlw@ttardis.UUCP (Ron Wilson) writes:
>Since not all terminals have a line feed key (ie: \n), I would
>like to be able to have the shform program (and the associated
>form() and menu() functions accept return (ie: \r) as an
>alternative to line feed, aka Enter (ie: \n).
>

The easiest way to make this happen is to edit the key map file.
The key map file is defined in /etc/termcap as KM=/some/path/name.

For example, the UnixPC's entry reads KM=/usr/lib/ua/kmap.s4

We have the exact problem that Ron describes with the 605 terminals.
The Enter key is out of the way, and defaults to sending a carriage
return, rather than a line feed.  To make things happy, we added
this line to the key map file:

	Enter		\r

If you want the return key on the Unix PC to work the same way as the
enter key does, you can add the same line to the file /usr/lib/ua/kmap.s4.

Enjoy.

John Canning					...uunet!uvm-gen!banzai!john
The People's Computer Company			...attmail!banzai!john
Williston, Vermont				john@banzai.pcc.com
802-864-0747