Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!brutus.cs.uiuc.edu!jarthur!elroy.jpl.nasa.gov!cit-vax!newton From: newton@cit-vax.Caltech.Edu (Mike Newton) Newsgroups: comp.sys.m88k Subject: DG 88k AViiON keyboard fix Message-ID: <13920@cit-vax.Caltech.Edu> Date: 21 Feb 90 06:38:36 GMT Reply-To: newton@cit-vax.UUCP (Mike Newton) Organization: California Institute of Technology Lines: 49 Several people asked for this, so... This will reset the keyboard on the DG AViiON's (at least under X). To use: hit 'Ctrl' until you can type alphabetic characters in a shell window then run this program... Note: I am typing this in by hand from another system... please pardon any typos: - mike ps: what is happening: the kbd state gets lost and it start transmitting IBM class 2 scan codes instead of type 3. ---------------------------------------------------------------- /* reset kbd to reasonable state, if possible */ /* Copyright, Jan, 1990 Mike Newton */ /* may be freely given away */ #include #include #include main () { int kbd_fd; /* kbd file descriptor */ if ( (kbd_fd = open ("/dev/kbd", O_RDONLY, 0777)) < 0 ) fprintf(stderr, "Couldnt open keyboard\n"); else { if ( ioctl(kbd_fd, KBD_RESET, 0) ) fprintf(stderr,"Couldnt reset keyboard\n"); #ifdef VOLUME if (ioctl(kbd_fd, KBD_TONE_LOW) ) fprintf( stderr, "Couldnt lower the damn volume\n") #endif } } ---------------------------------------------------------------- -- newton@csvax.caltech.edu Beach Bums Anonymous, Pasadena President Caltech 256-80 (Hilo -- it's not just another rainy day!) Pasadena CA 91125 Life's a beach. Then you graduate. -- newton@csvax.caltech.edu Beach Bums Anonymous, Pasadena President Caltech 256-80 (Hilo -- it's not just another rainy day!) Pasadena CA 91125 Life's a beach. Then you graduate.