Re: [wxlua-users] Key events

2012-06-23 Thread Andre Arpin
-- try this read the code look at which events are pass which are not -- note the casting to make connectKeyUpEvent work -- click on the various elements and type to see which one gets the events -- I will be gone for a while frm = wx.wxFrame( wx.NULL, wx.wxID_ANY, Testing) pnl = wx.wxPanel(frm,

Re: [wxlua-users] Key events

2012-06-21 Thread Milind Gupta
Thank you Andre and John for your replies. I haven't tried the code Andre gave. I am looking to catch keys other than accelerator keys. I want to have keys assigned dynamically at run time to certain lua scripts and then catch those keys to execute the scripts. So is this a wxWidgets issue or this

Re: [wxlua-users] Key events

2012-06-21 Thread Andre Arpin
-- 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.

Re: [wxlua-users] Key events

2012-06-21 Thread John Labenski
On Thu, Jun 21, 2012 at 8:12 AM, Andre Arpin ar...@kingston.net 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

Re: [wxlua-users] Key events

2012-06-21 Thread Milind Gupta
I was trying out some of the codes in veryminimal example and I notice another strange thing. The program crashes as soon as I take my mouse pointer over the frame. I have attached the code. Its the same as in the examples though. Has anyone seen this before? Other examples just run fine. I am not

Re: [wxlua-users] Key events

2012-06-21 Thread Milind Gupta
I see if the panel and frame both have key press events associated I can catch all keys. So now if I can associate the key press event with all my sub windows in the frame it should work. I tried the Recursive technique they have here: http://wiki.wxwidgets.org/Catching_key_events_globally using

Re: [wxlua-users] Key events

2012-06-20 Thread Andre Arpin
try this notice the panel does not pas wxEVT_KEY_DOWN I do not know why. wxEVT_CHAR is gone why??? frame = wx.wxFrame( wx.NULL, wx.wxID_ANY, Testing) panel = wx.wxPanel(frame, wx.wxID_ANY) frame:Show(true) panel:Connect(wx.wxID_ANY, wx.wxEVT_CHAR, function(event) print('char',

Re: [wxlua-users] Key events

2012-06-20 Thread Andre Arpin
-- Try this frame = wx.wxFrame( wx.NULL, wx.wxID_ANY, Testing) panel = wx.wxPanel(frame, wx.wxID_ANY) cal = wx.wxCalendarCtrl(panel,wx.wxID_ANY, wx.wxDefaultDateTime, wx.wxDefaultPosition, wx.wxDefaultSize) frame:Show() frame:Connect(wx.wxID_ANY, wx.wxEVT_CHAR_HOOK, function(event)

Re: [wxlua-users] Key events

2012-06-20 Thread Andre Arpin
Andre Arpin arpin@... writes: I do not think you can decide if the status of the caps lock key. Andre -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat

Re: [wxlua-users] Key events

2012-06-20 Thread John Labenski
On Wed, Jun 20, 2012 at 8:48 AM, Andre Arpin ar...@kingston.net wrote: 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

[wxlua-users] Key events

2012-06-19 Thread Milind Gupta
Hi, I am trying to associate key events with a frame but it doesn't seem to be working. I am doing this: frame:Connect(ID_FRAME, wx.wxEVT_CHAR, CharKeyEvent) and then I have function CharKeyEvent(event) print(Caught Keypress) end But I never key the Caught Keypress display. Is there

Re: [wxlua-users] Key events

2012-06-19 Thread John Labenski
On Tue, Jun 19, 2012 at 2:11 PM, Milind Gupta milind.gu...@gmail.com wrote: Hi,         I am trying to associate key events with a frame but it doesn't seem to be working. I am doing this: frame:Connect(ID_FRAME, wx.wxEVT_CHAR, CharKeyEvent) You probably can't focus the frame if you have a

Re: [wxlua-users] Key events

2012-06-19 Thread Milind Gupta
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 On Tue,