Whole document tree
    

Whole document tree

Format information for the configuration of keybindings for standard mens

7.5. Format information for the configuration of keybindings for standard mens

The information about keybindings is stored using gnome-config. It's stored in the section "/Gnome/Menus". Each keybinding is two key/value pairs. We'll assume that the menu item is new. The idea extends. The first key pair, in this case, is Menu-new-accelerator-key. The value is an integer (I believe from gtk+/gdk/gdkkeysyms.h) describing which key corresponds to this menu item. The second key is Menu-new-ac-mods. This value is another integer, describing which set of modifiers corresponds to this menu item. This value is a logical or of values in GdkModifierType in gtk+/gdk/gdktypes.h.

If building the configuration by hand, you need to edit ~/.gnome/Gnome. You need to add a section headed by [Menus]. It should contain two lines for each menu item. Again suppose that you're configuring the menu item new. The first line of the pair should read "Menu-new-accelerator-key=<number>" where <number> is an integer from gtk+/gdk/gdkkeysyms.h. Usually this means that it's an ASCII value describing which key corresponds to this menu item. The second line should read "Menu-new-ac-mods=<number>" where <number> is a logical or of values from GdkModifierType in gtk+/gdk/gdktypes.h. Usually, this means to start with 0. If you want shift to be part of the keybinding, add 1. If you want control to be part of the keybinding add 4. If you want alt to be part of the keybinding, add 8. The result is the value substituted for <number> in the second line of the pair.

The list of possible menu items is as follows.