Hi,
How can i know if the user is holding onto a particular key? THis is important in many games i know.
thnx
Hi,
How can i know if the user is holding onto a particular key? THis is important in many games i know.
thnx
You have to modify your keyboard handler, or write another one.
Yoshi
I don't know what a keyboard handler is, and where it is located, and how to modify it.
Is there any other way though?
i have used the bioskey() function to detect which key was pressed.
though it may be compiler/os specific and is maybe outdated.
its in bios.h in my compiler
-
Are you writing this in the console or an actual Win32 application?? This would probably help people understand a little more and your problem.
im not sure, ask someone else here but getch may work, unless its an overly complex game or something
Hi,
I didn't mean just a key press, i want to know if the user kept holding onto the key...
For DevC++ it would be kbhit() to see when a single key is being press, but I have no idea about when a key is being hold down on. You could do a search on it here and see if any results come up.
Try GetAsyncKeyState() (windows API function).
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.