They are asking the same thing, in the context of linux(which is essentially a unix clone). Check:
http://www.experts-exchang
Main Topics
Browse All Topicshow can i display single character from keyboard entry immediately without entering the carriage return key, the UNIX workstation that i am using does not provide getch() but only getchar() (which requires a carriage return to be entered before displaying the keyboard entry)
how can i also read extended ASCII code, ie, 'up' arrow is being pressed ?
all codes be written in C
advance thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
They are asking the same thing, in the context of linux(which is essentially a unix clone). Check:
http://www.experts-exchang
Try following code, this works:-
char readkey(int *isfunc)
{
char temp;
temp=getchar();
if (temp==0)
{
*isfunct=0;
temp=getchar();
}
return(temp);
}
use this function as-is in your program. If the program wants to know which key has been hit , just say:-
What_key=readkey(function_
now process what_key. If it is up arrow or down arrow or some function key them `function_key' will be set to zero or else will have a trash value.
Hope this helps
nadt
Business Accounts
Answer for Membership
by: curriPosted on 2000-02-29 at 11:41:01ID: 2570194
There is NO portable, standard way to do this in C (since it is highly system dependant). However, most unix systems have ways to do that (they are not necessarily simple though :). The best solution for me has been using the 'curses' library. Type 'man curses' or 'man ncurses' to get help on it.