How to input the arrow keys when debugging
Posted: Wed Apr 09, 2014 10:08 am
Hello everyone !
I have a C program to identify the keyboard input.
But when debugging, the debugger can not get input from the arrow keys.
CodeLite version : 5.4 (from the CodeLite apt repositories)
OS : debian wheezy
gcc version : 4.7.2
gdb version : 7.4.1
Here is a test source.
I insert a breakpoint to watch the input value, but I cannot input the arrow keys when debugging.
thanks a lot for help.
I have a C program to identify the keyboard input.
But when debugging, the debugger can not get input from the arrow keys.
CodeLite version : 5.4 (from the CodeLite apt repositories)
OS : debian wheezy
gcc version : 4.7.2
gdb version : 7.4.1
Here is a test source.
Code: Select all
#include <stdio.h>
int main(int argc, char **argv)
{
int ch;
while (1)
{
ch = getchar();
printf("ch = %d\n" , ch); // insert a breakpoint here!
if (ch == 'q')
{
break;
}
}
return 0;
}
thanks a lot for help.