sometimes, not always, happens to pass from a Panda3D window to another and then to return in, and loose the keyboard controls bind with self.accept in a DirectObject - it’s just me cause I’m in Kubuntu Linux or somebody else is experiencing this same issue?
I don’t think your OS is the problem. I’m also using Kubuntu Linux on one of my development machines and have not yet had the issues you have described. I don’t happen to know anymore then that, though. >_<
Have any of the code that you can show us that you’re getting this error on?
Also, try removing code to get to a point where that doesn’t happen, then slowly add things back in till you figure out what might be causing it. That is of course, assuming that it’s the code and not something else. If it’s something else grabbing the keyboard input/window, etc then I don’t know. =/
i experienced input-focus trouble with the mousebuttons (mouse itself worked only buttons didnt) here on ubuntu8.04, but only while running pstats. the rest of the time its working just fine.
thankyou ppl for the Bolt-ing reply (the one who says this is not a cool community - as I read around this forum - is clearly cheating)
by the way thanks to your hints (Kijaro I know that thing to isolate the code parts but I’m too lazy and old to remember it ) I’d found the source of the issue: now I could replicate it everytime switching from a window to another with ALT+TAB.
It would be nice if you guys try this @ home just to sweep doubts.
I’ve been (again) in this manual page and… I guess I could say gotcha
Using the messanger.toggleVerbose() function I’d found:
(all display modules loaded.)
[color=green]>>>>>here I clicked ALT+TAB
:09-02-2008 15:20:54 Messenger(debug): sent event: window-event sentArgs: [<libpanda.GraphicsWindow object at 0x84d5ba8>]
[color=green]>>>>>ALT+TAB again to return to the Panda
:09-02-2008 15:20:56 Messenger(debug): sent event: window-event sentArgs: [<libpanda.GraphicsWindow object at 0x84d5bc0>]
[color=green]>>>>>here I clicked ESCAPE
:09-02-2008 15:20:58 Messenger(debug): sent event: alt-escape sentArgs: 
:09-02-2008 15:20:58 Messenger(debug): sent event: time-escape sentArgs: [12.141627]
:09-02-2008 15:20:58 Messenger(debug): sent event: escape-up sentArgs: 
as you can see in the first line of this last bunch of three there is an alt- that should haven’t been there. Playing with the keyboard pressing ALT+ESCAPE and then ESCAPE the app will then exit correctly.
what to learn from that? bind always the -up events, use the messenger.toggleVerbose() and read (carefully) the panda3d online manual!
This is an old ‘bug’, if you searched the forums you would have definitely found lots of threads about it.
The problem is once you type alt-tab, at the moment the window loses focus the alt key is still pressed. After the window lost focus you release the alt, but Panda can’t catch that anymore. Once you set the focus back onto the panda window, Panda doesn’t know whether you actually have the alt key still pressed or not.
To fix this, you can after you switched focus back to the panda window press the Alt key once. Another solution could be to remove the alt modifier key entirely. (search the forums on how to do this)
thankyou pro-soft, this was perfectly clear and binding the up event is the best and less demanding solution for my needs. I guess that sometimes the P3D devs will fix this cleaning the buffer losing the window focus but, after all, is not a big issue if one knows it.