[wxPython-users] Capturing keydown events

Radu Adrian Ciora radu_ciora at yahoo.com
Mon Sep 24 06:03:59 PDT 2007


try pyHook
best,
Radu

----- Original Message ----
From: "Buran, Brad" <Brad_Buran at meei.harvard.edu>
To: Robin Dunn <robin at alldunn.com>; wxPython-users at lists.wxwidgets.org
Sent: Monday, September 24, 2007 1:41:15 PM
Subject: RE: [wxPython-users] Capturing keydown events

Hi Robin,

Thanks for the suggestion.  I tried that, but the FigureCanvasWxAgg does
not seem to accept "style" as a keyword.  Since this canvas is embedded
in a wx.Panel, would there be any way of preventing the canvas from
receiving focus and capturing user input at the panel level?  I think I
tried that once by using SetFocus() which did not seem to work either.  

Orest



> -----Original Message-----
> From: Robin Dunn [mailto:robin at alldunn.com] 
> Sent: Friday, September 21, 2007 2:47 PM
> To: wxPython-users at lists.wxwidgets.org
> Subject: Re: [wxPython-users] Capturing keydown events
> 
> Orest Kozyar wrote:
> 
> > I've tried subclassing FigureCanvasWxAgg and defining 
> key_press_event 
> > (which doesn't seem to work) and overriding _onKeyDown (which still 
> > does not capture the keys I need).  Something weird seems to be 
> > happening to these keys, and was wondering if anyone could help me?
> > 
> > I am able to detect the EVT_KEY_UP for these three keys.  
> Just not the 
> > key down ones.
> 
> Try using the wx.WANTS_CHARS style on the canvas too.
> 
> 
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org  Java give you jitters?  Relax with wxPython!
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org








      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20070924/297da345/attachment.htm


More information about the wxpython-users mailing list