crichardson332 / homebrew-crich_brews

Homebrew tap
0 stars 0 forks source link

GUI not receiving keystrokes. #6

Open jharrison opened 5 years ago

jharrison commented 5 years ago

When I run a mission on Ubuntu, the GUI window pops up in front, with focus, and when I press a key (e.g., Spacebar), SCRIMMAGE receives it and responds accordingly. By comparison, when I run a mission on a Mac, the GUI window comes up without gaining focus, so keystrokes go to the console. Clicking the window header is enough to give it focus, but it still doesn't get keystrokes. I can right-click and zoom in/out and it still doesn't get keystrokes. As far as I can tell, I have to left-click the display area before it gets keystrokes. This often changes the view in ways I don't want.

Do you know of a way to mitigate this annoyance?

crichardson332 commented 5 years ago

I've looked into this before, and I'm not aware of a solution to it (see here).

jharrison commented 5 years ago

Can we talk a little more about this? The status quo is almost unusable. It's not just that I have to click inside the window before it will register keypresses. It's that when I click it, it dramatically alters the camera view, which I carefully set up in the mission xml.

  <camera focal_point="0,0,0" mode="free" pos="0,-14000,14000" show_fps="false" />

This gives me a view like this: image

Then after I left click somewhere inside the window... image

So now I need to either click-and-drag, click-and-drag, click-and-drag, trying to straighten out my camera, or just watch the mission run from the upside down. Surely we can do better than this!

jharrison commented 5 years ago

The GUI help says I can press the 'r' key to reset the view, but when I do, it just seems to reset the zoom. If it went back to the view I specified in the mission file (which is what I would expect anyway), that would mitigate this problem.

crichardson332 commented 5 years ago

Yes, unfortunately I've had to deal with this problem as well. I set up a bird's eye view in my sims and when I click to activate the window, it spins around dramatically. It's very frustrating, but in all my google searches about this issue I haven't found any help at all. I have found that clicking in the window very fast after starting scrimmage seems to mitigate the issue most times. I know that's a terrible solution, but it's something at least.

We could definitely refactor the "r" button to reset to the view on startup, rather than a hard-coded default. I'll open up a ticket in scrimmage to get that done.