Capturing keydown events

try pyHook
best,
Radu

···

----- Original Message ----
From: “Buran, Brad” Brad_Buran@meei.harvard.edu
To: Robin Dunn robin@alldunn.com; wxPython-users@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@alldunn.com]
Sent: Friday, September 21, 2007 2:47 PM
To: wxPython-users@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@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org


Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.