I'm making a console game in C++ and whenever I hold down a key it gets delayed before it repeats itself. I attached a keyboard hook to my console but I can't find a way to get around repeat delay. I've also tried making an invisible window with it's own message loop but I have to SetFocus() the invisible window to make it receive inputs.
Is there a way to attach a message loop to a console?
Can I use a keyboard hook to get around repeat delay?
I think I have to use bit 7 in the KBDLLHOOKSTRUCT to check if the key is pressed or not and act accordingly but I don't know how to do it. Some sample code would be greatly appreciated.
P.S. Yes, I've googled my problem and none of it seems to work. I've seen another question on this topic in gamedev.net but he uses a message loop along with WindowProc and I think it's a GUI window not console.