I´m trying to write a program that can handle different keypresses. I´ve downloaded an ASCII table so I know what value each key has http://www.asciitable.com.
If I understand it right there is two different versions of ASCII tabel, one "usual" (0-127) and one extended (0-255). Im using the getch() function and it works well on "alfabetic"(visible) character but when I retreive a value from leftarrow I get a negative value (-32). Is it possible (apperntly it is) to get a negative value?? But what is more strange is that I get the same value for left/right/up/down arrow (-32).
Simple code
Shouldn´t each key return a different value???Code:int main() { char ch; ch = getch(); printf(" %d", ch); return 0; }