Subject: Re: Keyboard doesn't work correctly
To: yo _ <exhausted01@hotmail.com>
From: Christian Hattemer <chris@heaven.riednet.wh.tu-darmstadt.de>
List: port-i386
Date: 01/05/2003 23:07:48
Hello yo,

On 05-Jan-03, you wrote:

> Thanks to you all for super easy solution. For some reason my term was being 
> set automatically to vt100, i just added export TERM line to /etc/profile. I 
> was wondering if any of you have that line in your login scripts, or if bash 
> (or whatever shell you use) detected vt220 automatically. 

Detecting the terminal type is not the job of the shell. tset does this.
I have this in my profile:

setopt noglob
eval `tset -Q -s -m 'network:?xterm'`
unsetopt noglob

This will detect if you use the console, xterm, Telnet, or whatever and set
the terminal type accordingly.
I think there's also something about this at www.netbsd.org, but at the
moment I can't remember where.

> Also, Christian 
> how did you get the delete key to work as it really should, i kind of want 
> to set that correctly too.

You have two options:

* You can put a wsconsctl line in your startup scripts, this is described
here (plus some useful background):
http://mail-index.netbsd.org/port-i386/2002/09/03/0009.html 

* You can change the kernel. If not already done, get the kernel source and
extract it. See the guide on www.netbsd.org on how to do this and how to
compile the kernel afterwards. Edit /sys/dev/pckbc/wskbdmap_mfii.c and
change KS_Delete to KS_BackSpace in keycode 14 (the line with KC(14), this
is line 64 in the 1.6 source). After that compile and install the kernel and
check your stty command according to the above mentioned link.

Now you should have a backspace key that sends ^H and a delete key that
sends ^?.



Regarding your question why dmesg says vt100 in

wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)

This is normal and no problem, it's there because it's configured this way
in /etc/wscons.conf, see the man page wsconf.conf(5) for details.

Bye, Chris

-- 
          __
         /// Amiga 4000T 040/40                    /~\ The ASCII
    __  ///                                        \ / Ribbon Campaign
    \\\///   Team AMIGA                             X  against HTML
     \XX/                                          / \ E-Mail