ISC /dev/kdmouse "FIFO" problem
Checkpoint Technologies
ckp at grebyn.com
Tue Mar 19 07:42:39 AEST 1991
I have a small problem with /dev/kdmouse: there appears to be a 4-byte
buffer in between the mouse messages (or whatever generates them) and my
task, which is trying to read them. Since mouse messages are 3 bytes
long, receiving a single message is unreliable.
It's like this: I'll begin reading from /dev/kdmouse. I press a mouse
button *very* *carefully*, making sure the mouse doesn't also move.
This generates a single message indicating button down, but my program
receives nothing. When I release the button, I get the button-press
message, but not the button-release message. I press it again, and I get
the button-release message. Then I release it again, and I get a
button-press *and* a button-release.
My program has tried this several different ways, both a loop reading 1
character 3 times, and a single read for 3 characters.
I know one commercial X server (Xdgis) which could not solve this
problem and resorted to polling the mouse using ioctl(MOUSEIOCREAD).
This is unacceptable. I also know that ISC'x own X server works just
right. So there's some majik to incant that I don't know, it appears.
I'd like to know. Could some kind soul enlighten me? Thanks all.
--
First comes the logo: C H E C K P O I N T T E C H N O L O G I E S / /
ckp at grebyn.com \\ / /
Then, the disclaimer: All expressed opinions are, indeed, opinions. \ / o
Now for the witty part: I'm pink, therefore, I'm spam! \/
More information about the Comp.unix.sysv386
mailing list