linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Detecting keyboard event (input) for non X application
@ 2000-05-26 13:46 Alain Birtz
  0 siblings, 0 replies; 2+ messages in thread
From: Alain Birtz @ 2000-05-26 13:46 UTC (permalink / raw)
  To: linuxppc-dev


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 http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: Detecting keyboard event (input) for non X application
@ 2000-05-26 14:09 kd
  0 siblings, 0 replies; 2+ messages in thread
From: kd @ 2000-05-26 14:09 UTC (permalink / raw)
  To: abz; +Cc: linuxppc-dev


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

K.D.

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 http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-05-26 14:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-26 13:46 Detecting keyboard event (input) for non X application Alain Birtz
  -- strict thread matches above, loose matches on Subject: below --
2000-05-26 14:09 kd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).