Article View: comp.unix.sysv286
Article #92Speed up your Microport 2.4/286 or 3.0/386 keyboard
From: John Plocher
Date: Sat, 26 Jan 1991 22:03
Date: Sat, 26 Jan 1991 22:03
54 lines
1685 bytes
1685 bytes
/*
** I found this little gem while cleaning out some old disk space
**
** It is known to work on Microport's SysV 3.0 (and 3.0e) versions
** of V/386 and on the 2.4 version of V/AT for the 286.
**
** It is a simple demo of the typomatic ioctl for the console driver.
**
** It sets the repeat speed/threshold for the keyboard
**
**
** This code is released completely into the public domain
**
** John Plocher, January, 1991
*/
#include <sys/kd_info.h>
#define SNL(s) s,strlen( s )
void usage();
main( argc, argv )
int argc;
char *argv[];
{
int rate, result;
if ( argc != 2 ) {
usage( argv[0] );
exit( 1 );
}
rate = *argv[1] - '0';
if ( rate < 0 || 9 < rate ) {
usage( argv[0] );
exit( 1 );
}
result = ioctl( 0, KDSETTYPO, rate );
if ( result == -1 ) {
write( 2, SNL( "ioctl( 0, KDSETTYPO, rate ) failed\n" ) );
exit( 1 );
}
return 0;
}
void usage( s )
char *s;
{
write( 2, SNL( "usage: " ) );
write( 2, SNL( s ) );
write( 2, SNL( " rate\n" ) );
write( 2, SNL( " rate must be [0-9]\n" ) );
}
Technical Details
Message-ID:
<6677@exodus.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!usc!apple!netcom!amdcad!sun!exodus!twobits.Eng.Sun.COM!plocherShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!usc!apple!netcom!amdcad!sun!exodus!twobits.Eng.Sun.COM!plocher From: plocher@twobits.Eng.Sun.COM (John Plocher) Newsgroups: comp.unix.sysv286,comp.unix.sysv386 Subject: Speed up your Microport 2.4/286 or 3.0/386 keyboard Summary: Source Keywords: typomatic ioctl for kd driver Message-ID: <6677@exodus.Eng.Sun.COM> Date: 26 Jan 91 22:03:25 GMT Sender: news@exodus.Eng.Sun.COM Followup-To: comp.unix.sysv286 Lines: 54