Thursday, July 30, 2009

Does anyone know how to keybind in c programming?JUst something very simple and basic please.?

Does anyone know how to keybind in c programming?Just something very simple and basic please.

Does anyone know how to keybind in c programming?JUst something very simple and basic please.?
keybind isn't actually word in the english language, do you mean do something if a key is pressed?





char c = getch();





if (c == 'a')


{


printf("you pressed a\n");


}








If you mean while other programs have the focus, you'll need to intercept the input using the win32 API, which is quite complicated and requires hooks and callbacks into the windows input system.

peacock plant

No comments:

Post a Comment