Keyboard events / input
Blitz3D Forums/Blitz3D Programming/Keyboard events / input
| ||
I an new-ish to Blitz3d (just bought after the 30 run limit) Can anyonw point me to a reliable method to catch mouse/keyboard events that are time based, such as double tap a key? KeyHit just returns the amount since the last fluskeys... I need to track many different keys through a single cycle of my main game loop and I don't want to flushkeys and risk losing the user's input. Thanks BulletMagnet |
| ||
You can uses keydown, with it, you can check if there is more one key is pressed . . . |
| ||
Thanks for the reply. I know that KeyDown() reports the number of keypress events. I guess I was worried that if there were, for example, 4 hits between when I checked it last... then I would not know if those were 2 double-clicks, 4 individual clicks, etc. But I think that I just answered my own question. If my main game loop runs fast enough I should be able to consider it a double-click if there is more than 1 returned. Thanks, BulletMagnet |
| ||
Bullet, There should be no way that a user can hit two keyhits before your game look executes for the second time... usually there is VERY little time in between and in fact you would be lucky to get 1 keyhit in 125 millisecs.. thats 4 per second! Skully |