Keyboard inputs

I have noticed a problem with panda windows.

I run my applications in a panda window.My application is controlled by keyboard inputs.The inputs all work fine.

But when i switch to some other window and then come back to the panda window(the window in which panda is running something) , the keyboard inputs stop functioning, but the app is running. Its just the keyboard inputs that it is unable to take.

I am running panda 1.1 on debian unstable using KDE. Is this a known issue and how can i fix this?

Does the window manager have anything to do with this?

Sometimes, resizing the window may make the keyboard inputs work on refocus, but this is not always the case and i am not sure if resizing windows is what is solving the problem.

[color=green]I don’t know if this would help or not but when I was working in java if you didn’t put the line:

setFocusable(true);

[color=green]Then you would have to click anywhere in the applet for the keyboard inputs. You could try a line similar to that, or try clicking in the panda applet after you clicked on it once.

I have the same problem on Linux (Ubuntu breezy, metacity window manager). Maybe a 1.1 bug?

I’ve noticed this odd behavior too. It’s certainly a 1.1 bug. I haven’t had a chance to investigate more closely yet.

David

David,

Can you please have a closer look and suggest a workaround or fix.

-Suman

[color=green]Have you tried to use Command Prompt? We are using command Prompt, and we don’t seem to have this problem. Or you can try to use wordpad for your coding. I’m not sure if this will help or not, but using command prompt and wordpad works just fine for us.

OK, I’ve taken a closer look, and now I think I’m going crazy. I can’t reproduce the problem at all, although I thought I had seen it before.

I do remember a problem we used to have, where the ALT key would get “stuck” when you pressed ALT-tab to switch to a different window. When you ALT-tabbed back in, or clicked on the Panda window to resume focus, Panda would still believe the ALT key was held down, so whenever you pressed the “a” key (for instance) it would generate the event “alt-a”. This condition could be cleared by pressing and releasing the ALT key within the Panda window.

Could something like this be what’s causing you trouble? Try the following command:


base.toggleVerbose()

Then watch the events that it generates when you press keys, both before and after you switch to another window. Does it still generate the same event names when you come back?

David

For all of you linux guys… try “shading” your application (means only the application bar/headline is visible) and unshade it then. I have had some issues with other software (Java) that showed the same behavior. After shading/unshading everything is fine again… Minimizing didn’t do the job. Uh, for those interested in how to shade: I am not sure if its a feature of WMaker, but AFAIK it can be done there. I am not using no other window managers, so I can’t tell there…

Just a shot into the dark…

Regards, Bigfoot29

I tried this already, but somehow it only works sometimes not always.
However, i have found a solution just now.

If you are running KDE, once you start your panda application, set the window mode to shade. Once you set this on you can switch windows by using other mechanisms.

After you get back your application window it will work smoothly.