Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am working on a console based application in UNIX using C++. The need of the project is that on pressing the ESC key, one should move to the previous menu,ie. key based operation for ESC Key.

How can i implement the same.....Some light on the same would help me a lot...

Thanks in advance!!!
Posted

1 solution

You may have a look at the ncurses[^] library. If that can't be used you can implement a kbhit function that checks if a key has been pressed and use the getch function from my answer to your previous question to read the pressed key. Examples for the kbhit function with Linux can be found when searching for 'linux kbhit'.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900