Use of AcceleratorTable?

You can use the recipe for "Using Multi-key Shortcuts" to implement
global "accelerator keys" bound to a menu, or not! "addHotkey" is the
method you are really looking for..

    http://wiki.wxpython.org/index.cgi/Using_20Multi_2dkey_20Shortcuts

- Josiah

···

Michael Hipp <Michael@Hipp.com> wrote:

I understand the use of Accelerator keys when they're done as a shortcut
for a menu item or button.

But what about the case where they are "stand alone" (i.e. not
replicating the functionality of a menu or button). What do you bind
them to? What Id do you use?

And what window item are they best Set on (frame, notebook, panel, etc.)?

Or perhaps my question should be: "Is there somewhere some great demo
code for the use of Accelerator keys?"

One can use the wxWidgets/wxPython standard Accelerator mechanism as
provided by Robin, but the recipe I provided offers a unified mechanism
for handling hotkeys for menus and non-menus. It has the option of
allowing for emacs-style keybindings, but one doesn't necessarily have
to use that functionality.

- Josiah

···

Michael Hipp <Michael@Hipp.com> wrote:

Thanks, I think.

I don't comprehend that recipe at all. The 'addHotKey' routine appears
to be doing nothing more than building an Amway dictionary. Where is the
line that actually maps a keystroke to an action?

But I take it this recipe doesn't use Accelerator keys at all? Does that
mean that Accelerator keys cannot exist outside of being a replication
of a menu or button? Tell me it ain't so.