How can I capture a key stroke immediately in linux? [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: What is equivalent to getch() & getche() in Linux? I'm a newbie in linux programming. :-) I just wonder if my program (using C language) can capture every single key stroke immediately in linux, and then decide whether to echo it or not and how to display it, just like telnet. for example, if a user strikes 'A', I want the program to display 'B', if he types 'B', 'C' is wanted, and so on. It sounds funny and