On Thu, Jun 21, 2012 at 8:12 AM, Andre Arpin <[email protected]> wrote: > -- Could this be tried on unix > -- Type an 'a'. Enable caps lock and type another 'a' > -- is the keycode 65 in both cases. > -- Note: There does not seem to be any way to find out if 'a' is capitalize. > -- You get a transition code for caps but you do not know > -- if its going up or down. > > frame = wx.wxFrame( wx.NULL, wx.wxID_ANY, "Testing") > > frame:Connect(wx.wxID_ANY, wx.wxEVT_CHAR_HOOK, > function(event) > print(event.KeyCode) > end) > > frame:Show()
This is normal, use wxEVT_CHAR to get the translated key. http://docs.wxwidgets.org/trunk/classwx_key_event.html "To summarize: you should handle wxEVT_CHAR if you need the translated key and wxEVT_KEY_DOWN if you only need the value of the key itself, independent of the current keyboard state." Regards, John ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ wxlua-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wxlua-users
