Page 1 of 1

Bug: Only movement keys work on game start

Posted: 2014-09-28, 16:11
by SoulRider
This bug has been in ever since I have been working with Cafu engine, but now I am using my slower laptop, the process is extended, this leads me to believe the problem is related to an update or think issue.


After pressing fire to spawn, the only keys that work are the movement keys. for a random period of time, but noticably longer on laptop, than it was on my much more powerful desktop, I can not jump, select a weapon, or press tab to bring up the scoreboard. All I can do is run around, mouselook and keyboard look work, but none of the other keys do.

Then after an non-constant period of time, suddenly I can use the keys. I can jump, select weapons and bring up the scoreboard (which still doesn't disappear by the way).


Unknown. I have had a look, and I thought it might be due to the position in main loop of initalizing the keys, but I put the scoreboard key in with the movement keys, and it is still affected by the issue. This has been in vanilla cafu since I began testing before the component system was implemented. Is it possible that there is a better key management solution out there? Form what i've seen WXwidgets has a fair few problems.

Re: Bug: Only movement keys work on game start

Posted: 2014-09-29, 16:17
by Carsten
Hi SoulRider,

thanks for the report. I can reproduce this here, but only if I use the left mouse button to spawn. If I press "R" instead, I can use the SPACE key for jumping immediately.

I will have a deeper look into this later today (or maybe tomorrow, as I have to finish fixing something else in CaWE first). I don't think it's a problem with wxWidgets though (which usually works reliable and well), but probably rather one of the 2D GUIs that is consuming our key events...

Re: Bug: Only movement keys work on game start

Posted: 2014-09-30, 14:52
by Carsten
Still working on it, but the problem does not occur if:
  • "R" is pressed to respawn,
  • the mouse is moved before the LMB (left mouse button) is pressed to respawn,
  • the LMB is pressed once more after a problematic respawn.

Re: Bug: Only movement keys work on game start

Posted: 2014-10-01, 11:34
by Carsten
Ok, I've just committed a fix.

Please let me know if it works as expected.