Answer the question
In order to leave comments, you need to log in
C++ under Linux: how to handle keyboard keystrokes?
Actually, subject. It is necessary to read the clicks on the keyboard arrows, and when the button is pressed and released, perform some actions (in my case, change the x, y coordinates). Compiler gcc, purely console application.
Something like this:
code = считать_код_клавиши();
switch ( code )
{
case 75: x--; break;
case 77: x++; break;
case 72: y--; break;
case 80: y++; break;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question