Here are relevant portions of a strace of an svgalib program which tried
to use the mouse (I ran it with /dev/mouse -> /dev/kmouse):
open("/dev/mouse", O_RDWR) = 6
fcntl(6, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
ioctl(6, TCGETS, 0xbffff858) = -1 ENOIOCTLCMD (errno 515)
ioctl(6, SNDCTL_TMR_CONTINUE, {B9600 -opost -isig -icanon -echo ...}) = -1
ENOIOCTLCMD (errno 515)
write(6, "*n", 2) = 2
select(1, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
ioctl(6, SNDCTL_TMR_CONTINUE, {B1200 -opost -isig -icanon -echo ...}) = -1
ENOIOCTLCMD (errno 515)
ioctl(6, TCGETS, 0xbffff84c) = -1 ENOIOCTLCMD (errno 515)
ioctl(6, SNDCTL_TMR_CONTINUE, {B4800 -opost -isig -icanon -echo ...}) = -1
ENOIOCTLCMD (errno 515)
write(6, "*n", 2) = 2
select(1, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
ioctl(6, SNDCTL_TMR_CONTINUE, {B1200 -opost -isig -icanon -echo ...}) = -1
ENOIOCTLCMD (errno 515)
ioctl(6, TCGETS, 0xbffff840) = -1 ENOIOCTLCMD (errno 515)
ioctl(6, SNDCTL_TMR_CONTINUE, {B2400 -opost -isig -icanon -echo ...}) = -1
ENOIOCTLCMD (errno 515)
write(6, "*n", 2) = 2
select(1, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
ioctl(6, SNDCTL_TMR_CONTINUE, {B1200 -opost -isig -icanon -echo ...}) = -1
ENOIOCTLCMD (errno 515)
ioctl(6, TCGETS, 0xbffff858) = -1 ENOIOCTLCMD (errno 515)
ioctl(6, SNDCTL_TMR_CONTINUE, {B1200 -opost -isig -icanon -echo ...}) = -1
ENOIOCTLCMD (errno 515)
write(6, "*n", 2) = 2
select(1, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
ioctl(6, SNDCTL_TMR_CONTINUE, {B1200 -opost -isig -icanon -echo ...}) = -1
ENOIOCTLCMD (errno 515)
write(6, "Q", 1) = 1
read(6, "", 1) = 0
select(1, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
read(0, 0xbffff3b3, 1) = -1 EAGAIN (Try again)
select(7, [6], NULL, NULL, {0, 1}) = 1 (in [6], left {0, 10000})
read(6, "", 1) = 0
select(1, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
read(0, 0xbffff3b3, 1) = -1 EAGAIN (Try again)
select(7, [6], NULL, NULL, {0, 1}) = 1 (in [6], left {0, 10000})
...
-- Aaron Ucko (ucko@vax1.rockhurst.edu; finger for PGP public key) | httyp!
"That's right," he said. "We're philosophers. We think, therefore we am."
-- Terry Pratchett, _Small Gods_ | Geek Code 3.1 [for explanation, finger
hayden@mankato.msus.edu]: GCS/M/S/C d- s: a18 C++(+++)>++++ UL++>++++ P++
L++>+++++ E- W(-) N++(+) o+ K- w--- O M@ V-(--) PS++(+++) PE- Y(+) PGP(+) t(+)
!5 X-- R(-) tv-@ b++(+++) DI+ !D-- G++(+++) e->+++++(*) h!>+ r-(--)>+++ y?