How to use arrow keys in c programming in code blocks?
Answers
Answered by
2
I'm writing a programm that's using getch() to scan for arrow keys. My code so far is:
switch(getch()) { case 65: // key up break; case 66: // key down break; case 67: // key right break; case 68: // key left break; }
Problem is that when I press 'A', 'B', 'C' or 'D'the code will also executed, because 65 is the decimal code for 'A', et
switch(getch()) { case 65: // key up break; case 66: // key down break; case 67: // key right break; case 68: // key left break; }
Problem is that when I press 'A', 'B', 'C' or 'D'the code will also executed, because 65 is the decimal code for 'A', et
Similar questions
Social Sciences,
7 months ago
Math,
7 months ago
Science,
7 months ago
Hindi,
1 year ago
Biology,
1 year ago