I am on ncurses.I am working on a program that starts a timer when I press enter. I use this code:
while(( ch = wgetch(w)) != 'q' )
{
switch( ch ) {
...
case ENTER: /*timer is expected to start by a function*/
}
However, I need to hold down the Enter key to make the timer start. What I would like is to simply press the Enter key to start the timer. How can I solve this? I have the timer function. Thanks in advance.