How can i get scan code of arrows keys on keyboard
Hi fellows,
I want to make a snake game in C using gcc compiler. I would like to know how can we get scan codes of arrows and functional keys which we are pressing? I borlandc compiler we can get scan codes using getch() function. but there is no such function in gcc compiler definitly there will some approach in gcc compiler for get scan codes. Please help me... Asif Software Engineer. |
Such things are beyond the responsibilities of the compiler. You need to look to other libraries to do this, such as ncurses, or the standard C library.
I believe getch() is part of ncurses, so look at that. |
It doesn't have to do with gcc. getchar() should work fine under borland or gcc. Make sure your libraries are installed correctly.
|
All times are GMT -5. The time now is 02:54 PM. |