Article # 17, added by Geoworks, historical record
| first | previous | index | next | last |

Keyboard shortcuts in menus




Question:
The keyboard shortcuts in my program don't work. For instance, if I try
Ctrl-P, I get a beep instead of the Print panel. 

Answer:
To fix this just add GA_KBD_SEARCH_PATH to the GI_attrs of the menus
containing shortcuts and all their parents, and their parent's parents,
and so on up to GenApplication. This allows GEOS to search those branches
of the object tree for the keyboard accelerators. It's generally a good
idea to add this attribute to as many objects as will ever need to receive a
shortcut, as well as all the parents of those objects. Here are classes
that have the attribute set automatically: 

  GenDisplayClass
  GenDocumentClass
  GenDocumentControlClass
  GenEditControlClass
  GenViewControlClass
  JustificationControlClass
  PointSizeControlClass
  TextStyleControlClass