I’m trying to get a wxpython app running on Ubuntu. It was developed on Mac OSX, and runs perfectly fine there.
My problem is that wx.Frame and GLCanvas don’t seem to receive keyboard events on Ubuntu.
Here’s some example code that exhibits the problem:
Whether wx.Frames are able to catch key events is not defined by wx and therefore implementation dependent. The fact that it may work on some platforms is basically just a happy coincidence. I'm not sure about the GLCanvas class, but I would expect it to be able to if it has the focus. You may want to double check where the focus is at by doing something like "print wx.Window.FindFocus()" from a timer or something.
···
On 10/1/12 1:22 PM, Dane Larsen wrote:
Hi all,
I'm trying to get a wxpython app running on Ubuntu. It was developed on
Mac OSX, and runs perfectly fine there.
My problem is that wx.Frame and GLCanvas don't seem to receive keyboard
events on Ubuntu.
Here's some example code that exhibits the problem:
The motionEvent works just fine, but keyEvent is never called.
Is this a bug in wxwidgets or wxpython, or am I just doing something wrong?
I'm relatively new to the wx world, so it's entirely possible I've just
missed something obvious.
The motionEvent works just fine, but keyEvent is never called.
Is this a bug in wxwidgets or wxpython, or am I just doing something wrong?
I’m relatively new to the wx world, so it’s entirely possible I’ve just
missed something obvious.
Whether wx.Frames are able to catch key events is not defined by wx and
therefore implementation dependent. The fact that it may work on some
platforms is basically just a happy coincidence. I’m not sure about the
GLCanvas class, but I would expect it to be able to if it has the focus.
You may want to double check where the focus is at by doing something
like “print wx.Window.FindFocus()” from a timer or something.