problem with reading keyboard on Windows 7

Archives Forums/Blitz3D Bug Reports/problem with reading keyboard on Windows 7

cyberyoyo(Posted 2013) [#1]
I do all my B3D devellopment on windows XP, but yesterday I tried the compiled program on my mother's Win7 laptop.
There doesn't seem to be any graphical problems but it seems that the program has a lot of trouble readiong the keyboard. The key presses don't seem to be detected , or if they are it happens several seconds after they have been pressed.

I know it could be a problem with my mother's computer, but her keyboard seems to be working fine otherwise. So did anybody else encounter keyboard problems with windows 7?


Kryzon(Posted 2013) [#2]
Have you tried running it in Compatibility Mode for XP?


cyberyoyo(Posted 2013) [#3]
no, but I'll try that, I have to go to my mom's house, every time lol


cyberyoyo(Posted 2013) [#4]
OK I managed to fix it by just inserting a wait cycle in my main loop
delay 5

pheww, what a relief, it works perfectly now


xlsior(Posted 2013) [#5]
Stupid question, but how do you look for keypresses?

I'd recommend checking for your keypresses once in your loop and set a variable when it's set/unset, rather than checking each and every once of them 'realtime' scattered throughout our routines -- especially if you check certain keys/keycombinations more than once.

(Your loop typically runs 60 times a second anyway, so it's unnoticable to the user)


cyberyoyo(Posted 2013) [#6]
yeah that's what I do
Oh and sorry for posting this in bug report, I don't think that was the correct place