I'm using an accelerator table to
handle lots of key board events like:
wx.WXK_F1
wx.WXK_TAB
wx.WXK_DOWN
wx.WXK_UP
wx.WXK_PAGEDOWN
wx.WXK_PAGEUP
wx.WXK_ESCAPE
in lots of different frames.
All of which work fine on Kubuntu and Fedora.
But ESCAPE does nothing on WinXP.
Does escape have some special meaning on Win
which is overriding me?
···
---------------------------------------------------------------------------------
Another subject.
GetKeyCode does not work for an event called by an accelerator
table. How could I see which key was pressed?
Thanks
def onaltx(event):
print 'altx'
k = event.GetKeyCode()
print k
accel_tbl = wx.AcceleratorTable([
(wx.ACCEL_NORMAL,wx.WXK_F3,902),
(wx.ACCEL_ALT, ord('X'), 901),
(wx.ACCEL_NORMAL,wx.WXK_ESCAPE,903),
])
f.SetAcceleratorTable(accel_tbl)
Traceback (most recent call last):
File "./wintest.py", line 53, in onaltx
k = event.GetKeyCode()
AttributeError: 'CommandEvent' object has no attribute 'GetKeyCode'