I'm writing a program in C++ under Linux that needs to wait for user to press a key. Considering the key pressed the program will go accordingly. So I must be able to recover the key code from a variable afterwards.
My bad.... without the Enter, of course. Actually is a small tree menu, with 4-5 options, and enter after every key is not too professional. It would be fantastic if you would also sugest some site/doc/manual where these specs are available. What is free on the net is extremely shallow. No info on how to use keyboard, mouse, soundcard or any other periferal in C. If you would be so kind to point me in the right direction, I will highly appreciate.
It works, I can use it for my purpose. It would be great if you wold also tell me where I can get some details/explanations (like the functions and variables used in this code), other than termios docs feeded by google. It would be nice for me to understand what I'm using :)
I wrote this code several years ago, so I don't remember my sources other than the man pages and linux kernel source. (Hence why I kept the code.) Sorry.