How would I do that? What libraries would I have to use? I want to do this without having a global keyboard hook. Maybe see the state for each key every half a second? Can anyone give me an example? Thanks.
How would I do that? What libraries would I have to use? I want to do this without having a global keyboard hook. Maybe see the state for each key every half a second? Can anyone give me an example? Thanks.
portable libraries like pdcurses or non portable libraries like conio provide keyboard handles. windows.h does too, i think.
Can you give me an example? :S
With ncurses:
or something like that. Been a while since I last used the pdcurses library. The define should probably be differently named.Code:int ch;
ch = getch();
if (ch == LEFT_SHIFT) printw("Pressed");