From: Andre A. <ar...@ki...> - 2012-06-20 12:49:03
|
Milind Gupta <milind.gupta@...> writes: > > > Thanks John for the quick reply. I changed the connect statement to : > > frame:Connect(ID_FRAME, wx.wxEVT_CHAR_HOOK, CharKeyEvent) > > > That seems to be catching all keys except the alphabets and numbers. How do I catch those? Also how do I catch key combinations like Ctrl-X? > > Thanks, > Milind > > Try this --------------------- frame = wx.wxFrame( wx.NULL, wx.wxID_ANY, "Testing") frame:Show(true) frame:Connect(wx.wxID_ANY, wx.wxEVT_CHAR, function(event) print(event, event.KeyCode) end) --------------------- Seems to work. Andre |