The small program below demonstrates the strange behavior of the "p" key when I attach a menu event to Page-Up. When I run the program any other key produces EVT_CHAR but the letter p produces EVT_MENU. This is Python 2.3.4, wxPython 2.5.2.8, Windows XP-SP2.
Am I doing this wrong? Or is this a bug?
Thanks
gb
'''Is this a bug?'''
import wx
class myApp(wx.App):
def OnInit(self):
self.frame = wx.Frame(None, -1, 'bug?')
self.frame.Bind(wx.EVT_CHAR, self.OnChar)
self.frame.Bind(wx.EVT_MENU, self.OnMenu)
al = [
#(wx.ACCEL_NORMAL, wx.WXK_PAGEDOWN, wx.NewId()),
(wx.ACCEL_NORMAL, wx.WXK_PAGEUP, wx.NewId()),
]
self.frame.SetAcceleratorTable(wx.AcceleratorTable(al))
self.frame.Show(True)
return True
def OnChar(self, event):
print 'char'
def OnMenu(self, event):
print 'menu'
app = myApp(0)
app.MainLoop()