reading character
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > reading character




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    reading character  
Daniel Schüle


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-21-04 01:56 AM

Hi Ng

i was wondering whether it's possible to achive the following
i want my application to control sound volume with '>' '<'
characters .. but i don't want the user to press return after
pressing one of them

i tried getchar() but it blocks waiting for return
does anybody have a hint for me?

regards

Daniel





[ Post a follow-up to this message ]



    Re: reading character  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-21-04 01:56 AM

In article <cdkds5$m9d$1@news2.rz.uni-karlsruhe.de>,
Daniel Schule <uval@rz.uni-karlsruhe.de> wrote:

> Hi Ng
>
> i was wondering whether it's possible to achive the following
> i want my application to control sound volume with '>' '<'
> characters .. but i don't want the user to press return after
> pressing one of them
>
> i tried getchar() but it blocks waiting for return
> does anybody have a hint for me?

man termios

and look for the section on non-canonical input processing.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***





[ Post a follow-up to this message ]



    Re: reading character  
Fredrik Roubert


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-21-04 10:58 PM

On Wed, 21 Jul 2004 02:38:14 +0200, Daniel Schüle wrote:

> i tried getchar() but it blocks waiting for return
> does anybody have a hint for me?

http://www.erlenstar.demon.co.uk/unix/faq_4.html#SEC49

Cheers // Fredrik Roubert

--
Möllevångsvägen 6c  |  +46 46 188127
SE-222 40 Lund      |  http://www.df.lth.se/~roubert/





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:04 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register