Detecting keyboard event (input) for non X application

kd at kd at
Sat May 27 00:09:04 EST 2000

What about using poll() with timeout and then read() to get the keyboard


Alain Birtz wrote:

Within an infinite loop, how to know if there is a keyboard input ?
Is there something similar to XNextEvent for non X application ?

getchar do not work since it stop and wait for the next keyboard event.
What I need is a function that I can call periodically to know if there
is a keyboard input.

** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list