Subject: Re: keyboard after exiting X
To: Bob Lantz <lantz@Stanford.EDU>
From: Michael L. Hitch <mhitch@lightning.msu.montana.edu>
List: port-pmax
Date: 11/08/1999 11:46:26
On Thu, 12 Aug 1999, Bob Lantz wrote:

> Happens to me as well. I think it's a known problem, and I'm unaware of
> any fixes for it, unfortunately.
> 
> On Fri, 13 Aug 1999 static@mail.velenje.cx wrote:
> 
> > strange problem- after I quit X, my keyboard doesn't work right- if I type
> > in "root", it comes out with extra characters, like "rorort", depending on
> > how fast I type. Is this a widely known problem I'm unaware of (I got this
> > dec for free a few days ago, I'd never used one before), or is it a
> > problem that only I'm having? In any case, does anyone know how to fix it?
> > 
> > Thanks in advance,
> > Claudio

  I have just committed a fix that should reset the keyboard to a known
state when the X server closes the framebuffer.  It appears to be working
for me.

  Here's the patch, which should work OK for 1.4 and 1.4.1 (and possibly
earlier versions).

Index: fb_usrreq.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/pmax/dev/fb_usrreq.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- fb_usrreq.c	1999/07/25 22:50:28	1.16
+++ fb_usrreq.c	1999/11/08 18:41:32	1.17
@@ -68,6 +68,13 @@
 		fi->fi_driver->fbd_initcmap(fi);
 
 	genDeconfigMouse();
+
+	/*
+	 * Reset the keyboard - we don't know what the X server (or whatever
+	 * was using the framebuffer) did to the keyboard.  The X11R6 server
+	 * changes the keyboard state, and doesn't reset it.
+	 */
+	KBDReset(fbtty->kbddev, fbtty->KBDPutc);
 
 	bzero((caddr_t)fi->fi_pixels, fi->fi_pixelsize);
 	(*fi->fi_driver->fbd_poscursor)

--
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA