Forum Topic - The kbhit() function...:
   
The kbhit() function...  
Hi,

What is QNX6 equivalent of the kbhit() function ?

Regards,
Jacek
RE: The kbhit() function...  
http://www.qnx.com/developers/docs/6.4.0/neutrino/lib_ref/t/tcischars.ht
ml

Chris

-----Original Message-----
From: Jacek Rudnicki [mailto:community-noreply@qnx.com] 
Sent: Thursday, April 30, 2009 5:50 AM
To: ostech-core_os
Subject: The kbhit() function...

Hi,

What is QNX6 equivalent of the kbhit() function ?

Regards,
Jacek

_______________________________________________
OSTech
http://community.qnx.com/sf/go/post28416
Re: RE: The kbhit() function...  
Is there any example which is showing how to detect "key pressed" events and then how to analyse them?

Regards,
Jacek
Re: RE: The kbhit() function...  
Thank's, the tcischars() function works fine.

One more question, how to detect console name
on which appliaction is started ?

Re: RE: The kbhit() function...  
> One more question, how to detect console name
> on which appliaction is started ?

"/dev/tty" should be magically redirected to your console (implementation-wise an open of this device becomes an openfd 
of the controlling terminal of the session leader), so could just open() this.

$ echo "my console" >/dev/tty
my console
Re: RE: The kbhit() function...  
> "/dev/tty" should be magically redirected to your console

Yes indeed, it works also for pseudo-terminal devices created by the devc-pty driver (ttyp0,...).

Thank you,
Jacek