Flushkeys anomaly
BlitzPlus Forums/BlitzPlus Programming/Flushkeys anomaly
| ||
Flushkeys doesn't seem to clear out cursor keys. I basically have some code that calls Flushkeys, then a Wwhile loop that breaks out with GetKey() <> 0. If you are holding a key down, like space, when you go into the loop, it won't exit due to the earlier flushkeys, which is correct BUT, and here's the crunch, if you hold down a cursor key, GetKeys() will immediately exit with a total non ASCII value of 63232 to 63235! Anyone know how to prevent this (apart from testing the result of GetKeys before breaking out?) |
| ||
After testing how GetKey() operates, it may be a good idea to only enter the conditional loop when GetKey()=0. Just a thought. |
| ||
Good idea thanks. In the end I grabbed the key in the loop and compared it with cursor key values and ingored them. Bit lame though. As GetKey says it only returns ASCII values it shouldn't really return cursor keys OR flushkeys should clear them out. I wonder if I should post this in bugs or if there is a reason for this behaviour? |
| ||
Yeah, does seem a little strange. Perhaps just an oversight :) |