newton@cit-vax.Caltech.Edu (Mike Newton) (02/21/90)
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 <sys/ioctl.h>
#include <sys/fcntl.h>
#include <stdio.h>
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.