Setting a keyboard handler, to trigger an event from inside a TextCtrl

Switched over to working with python 3.4, and while have got a window inheriting from wx.Dialog popping up, inside it, I want to try catch arrow key keystrokes when the user is focused on a wx.TextCtrl.

Trying to bind wx.EVT_KEY_UP, or wx.EVT_KEY_DOWN events to that text control, etc. doesn’t seem to be triggering the event handler, etc., and while in past at times used a sort of keyboard event handler, it doesn’t want to work with wx under python 3.4?

Is this possible/feasible/doable?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
“Roger Wilco wants to welcome you…to the space janitor’s closet…”

Ok, and then, figured out what seems to be related - if use Dialog to handle binding then does nothing, although that’s what generally use for binding things like button events, but, the following code, invoking the .Bind method of the TextCtrl itself handles it alright, and then I just used the Event.GetKeyCode to match it against wx.WXK_UP, etc.:

self.txtInfo.Bind(wx.EVT_KEY_DOWN, self.handleKeys)

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
“Roger Wilco wants to welcome you…to the space janitor’s closet…”

···

----- Original Message -----

From:
Jacob Kruger

To: wxpython-users@googlegroups.com

Sent: Saturday, January 24, 2015 6:45 AM

Subject: [wxPython-users] Setting a keyboard handler, to trigger an event from inside a TextCtrl

Switched over to working with python 3.4, and while have got a window inheriting from wx.Dialog popping up, inside it, I want to try catch arrow key keystrokes when the user is focused on a wx.TextCtrl.

Trying to bind wx.EVT_KEY_UP, or wx.EVT_KEY_DOWN events to that text control, etc. doesn’t seem to be triggering the event handler, etc., and while in past at times used a sort of keyboard event handler, it doesn’t want to work with wx under python 3.4?

Is this possible/feasible/doable?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
“Roger Wilco wants to welcome you…to the space janitor’s closet…”


You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.