I had problems trying to capture key events, but wxAcceleratorTable worked
for me on some buttons on a MDIChildFrame, so I think it should work for
you.
Have you tried it yet?
--Bruce
···
-----Original Message-----
From: H. Wade Minter [mailto:minter@lunenburg.org]
Sent: Friday, November 22, 2002 1:45 PM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] Binding keys to an application
Apologies for the flood of questions as I work my way through wxPython.
In the app I'm porting from Perl/Tk, I've got several keys bound to do
certain things. I've got keys such as Escape, Ctrl-P, Ctrl-Escape, and
such that will start and stop activities. Then I've also got keys like
F1-F12 that will read the values stored in a checkbox field, and do stuff
based on the setting of the checkbox.
I'm trying to implement this stuff in wxPython. I've seen a couple of
different ways that may or may not work, so I figured I'd ask here.
One way is the wxAcceleratorTable, but that appears to have the limitation
that it can only do stuff that is defined on a menu, which would negate my
F1-F12 situation above.
The other way is through wxKeyEvents, like EVT_KEY_DOWN, EVT_CHAR, and so
forth. But from old google articles, it looks like that's not the best
way to do it.
So, given what I'm trying to do, what's the best way to do it?
Thanks,
Wade
--
If you have a VCR or MP3 player, you need to read these links:
http://www.digitalconsumer.org/
http://digitalspeech.org/
http://www.libertyboard.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org