Unix Programming - reading character

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2004 > reading character





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author reading character
Daniel Schüle

2004-07-20, 8:56 pm

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
Barry Margolin

2004-07-20, 8:56 pm

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 ***
Fredrik Roubert

2004-07-21, 5: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/
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com