Tuesday, July 8, 2008

wxWidgets keyboard shortcuts

If you create a menu bar with wxWidgets you can add a keyboard shortcut by specifying \t

For example if you have a zoom in action Then you may add a menu entry like so:

actionMenu->Append( kZoomInButtonId , "ZoomIn\tz" , "Click to zoom in on the current location.\n" );

Now if you press z it will execute this action.

No comments: