*BSD News Article 62186


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.bhp.com.au!mel.dit.csiro.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!gatech!newsfeed.pitt.edu!bb3.andrew.cmu.edu!andrew.cmu.edu!alexw+
From: "Alex R.N. Wetmore" <alexw+@andrew.cmu.edu>
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: AZERTY keyboard
Date: Thu, 15 Feb 1996 23:02:59 -0500
Organization: Fifth yr. senior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
Lines: 58
Message-ID: <ol907n600iV7AAllck@andrew.cmu.edu>
References: <4fskrt$ebm@rc1.vub.ac.be>
NNTP-Posting-Host: po7.andrew.cmu.edu
In-Reply-To: <4fskrt$ebm@rc1.vub.ac.be>


In article <4fskrt$ebm@rc1.vub.ac.be> you wrote:
: How would one redefine the keyboard so that an AZERTY
: can be used instead of QWERTY?  I would like to swap
: keyboards *without* using X.
: (I now it exists on Linux...)

Which platform are you running on?  rememeber, NetBSD is on many 
platforms.

Assuming its NetBSD if you use the pcvt device driver instead of 
pccons (vt0 instead of pc0 in your config file) you can use the
kcon command to remap the keyboard.  Source for kcon is in 
/sys/arch/i386/isa/pcvt/Util if it isn't built already.

Using pcvt is a good idea anyway, you end up with vt200 support,
virtual consoles, and other goodies.  If you're turned off by the
default color mappings (like bold is white on blue) you can replace
the table sgr_tab_color[] in /sys/arch/i386/isa/pcvt/pcvt_hdr.h 
with this one:
u_char sgr_tab_color[16] = {
/*00*/  (BG_BLACK     | FG_LIGHTGREY),             /* normal               */
/*01*/  (BG_BLACK     | FG_CYAN),                  /* bold                 */
/*02*/  (BG_BLACK     | FG_MAGENTA),               /* underline            */
/*03*/  (BG_BLACK     | FG_BROWN),                 /* bold+underline       */
/*04*/  (BG_BLACK     | FG_LIGHTGREY | FG_BLINK),  /* blink                */
/*05*/  (BG_BLACK     | FG_CYAN      | FG_BLINK),  /* bold+blink           */
/*06*/  (BG_BLACK     | FG_MAGENTA   | FG_BLINK),  /* underline+blink      */
/*07*/  (BG_BLACK     | FG_BROWN     | FG_BLINK),  /* bold+underline+blink */
/*08*/  (BG_LIGHTGREY | FG_BLACK),                 /* invers               */
/*09*/  (BG_LIGHTGREY | FG_CYAN),                  /* bold+invers          */
/*10*/  (BG_LIGHTGREY | FG_MAGENTA),               /* underline+invers     */
/*11*/  (BG_LIGHTGREY | FG_BROWN),                 /* bold+underline+invers*/
/*12*/  (BG_LIGHTGREY | FG_BLACK      | FG_BLINK), /* blink+invers         */
/*13*/  (BG_LIGHTGREY | FG_CYAN       | FG_BLINK), /* bold+blink+invers    */
/*14*/  (BG_LIGHTGREY | FG_MAGENTA    | FG_BLINK), /* underline+blink+invers*/
/*15*/  (BG_LIGHTGREY | FG_BROWN      | FG_BLINK)  /*bold+underl+blink+invers*/
};

I also use the following code in my /etc/rc.local to make the colors
even slightly more normal by remapping the VGA palette registers:

echo -n "setting console parameters:"

sconparams1="-pblack:0,0,0 -plightgrey:40,40,40"
sconparams2="-pcyan:63,63,63 -pmagenta:0,50,63 -pbrown:0,63,63"
for i in ttyv4 ttyv3 ttyv2 ttyv1 ttyv0
do
	echo -n " $i"
	scon -d /dev/$i $sconparams1 $sconparams2
	num=`echo $i | sed 's/ttyv//g'`
done
scon -t 600

echo '.'

alex