I found out a method of detecting arrow keys in one thread i found. It's that after getting the ascii value from arrow keys of 224, there is another value in the buffer, so all i havta do is run getch() again and i'll get the different values for different arrow keys.
But i read in some threads that:
left arrow = 'K'
up arrow = 'H'
down arrow = 'P'
right arrow = 'M'
Whys that? It doesn't even work for me.
These K, H, P and M are scan codes of the arrow keys, getch () gives a scan code. These codes work for most keyboards and not for all (scan codes depend on keyboard), but this is the sipmplest possibility to get console input without having to press ENTER. The other possibility is to use Windows API function, but getch () is certainly much easier to use for newbies..
Is there an ANSII-conform way to get return-codes without having to press carriage-return (Enter)?
Probably not, ANSI c seems to be a standard from the time when monitors wrote one line in a second.
>Is there an ANSII-conform way to get return-codes without having to press carriage-return
Thanks, I thought to have heard that it would exit.