nanogui: kbd_pipe.c
Subject:
kbd_pipe.c
From:
"Shiro Ninomiya" ####@####.####
Date:
24 Jul 2002 17:15:13 -0000
Message-Id: <015a01c23334$8b8c2a10$c28cdfd0@shiro>
Hi,
I was using "kbd_pipe.c" to get keyboard events, and I found it works
sometimes but it doesn't sometimes.
Actually, there was an initialization problem in "soft_Read" function.
cc = read(kbd_fd, buf, 1); /* this is NON BLOCKING read */
This can't initialize upper 8bits of *buf, so I added the next line
*buf=0;
Then it always works.
Shiro Ninomiya