Chapter 12. Adding Key Bindings
All applications have actions that are more often initiated from the keyboard than from a toolbar or menu. Power-users especially expect quick access to common actions using the keyboard. The Workbench includes an extremely flexible framework to manage actions and key bindings. This includes having locale- or function-grouped key binding configurations and key bindings that apply to only certain parts of the application.
You can add key bindings for all Hyperbola actions since there aren't that many. In general, however, you have to carefully select the actions to bind to key sequences. One rule of thumb comes from the observation that toolbars also contain frequently used actions. As such, consider providing key bindings for all of your toolbar items. Note also that actions often show up in various menus, so you can show their related key sequences there.
In this chapter, we show you how to:
Define key bindings for all the Hyperbola application's actions. Show key bindings in menus. Add key bindings for the reused Quit and About Workbench actions. Use key binding configurations to scope bindings. Add the Keys preference page to Hyperbola.
 |