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:
#!/usr/bin/env python
import wx
class Frame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, title="", size=(200,100))
self.Bind(wx.EVT_CHAR, self.keyEvent)
self.Bind(wx.EVT_MOTION, self.motionEvent)
self.SetFocus()
self.Show(True)
def keyEvent(self, event):
print "Key event"
def motionEvent(self, event):
print "Motion event"
app = wx.App(False)
frame = Frame(None)
app.MainLoop()
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.
Thanks,
Dane Larsen