Hello.
I'm writing a small game for fun and I'm having a problem with the function keys, specifically F1-F4.
When I press any other function key, the character returns as "^Q" or "^R", but for some reason those 4 keys (F1-F4) return things like "^[[11~". Even when I do something like:Code:#include <curses.h> void input() { int choice; choice = getch(); printw("%c\n", choice); refresh(); }
it doesn't work. But, If I use any of the other function keys, it works. Is this a hardware problem on my side, or am I just doing something wrong? It's not just for ncurses either, it happens regardless.Code:if(choice == KEY_F(1)) // or F2,F3,F3 { ... }
I'm on linux, if that's of any help.



LinkBack URL
About LinkBacks


