Next: The Plug-ins Editor, Previous: GPS Themes, Up: Customizing and Extending GPS

### 16.3 The Key Manager Dialog

The key manager is accessible through the menu `Edit->Key Shortcuts`. This dialog provides an easy way to associate key shortcuts with actions. These actions are either predefined in GPS, or defined in your own customization files, as documented in Customizing through XML and Python files. It also provides an easy way to redefine the menu shortcuts.

Actions are referenced by their name, and are grouped into categories. These categories indicate when the action applies. For instance, the indentation command only applies in source editors, whereas the command to change the current window applies anywhere in GPS. The categories can be explicitly specified when you created your own actions through XML files (see Defining Actions).

Through the key manager, you can define key bindings similar to what Emacs uses (<control-x> followed by <control-k> for instance). To register such key bindings, you need to press the `Grab` button as usual, and then type the shortcut. The recording of the key binding will stop a short while after the last key stroke.

If you define complex shortcuts for menus, they will not appear next to the menu name when you select it with the mouse. This is expected, and is due to technical limitations in the graphical toolkit that GPS uses.

When you assign a new shortcut to an action, the following happens:

- All actions and menus currently associated with the same key will no longer be executed when the key is pressed.
- All key shortcuts defined for this action are replaced by the new one. As a result, the action is only executable through this new shortcut.