Changes

Line 43: Line 43:  
         #Reset the icon displayed for customButton
 
         #Reset the icon displayed for customButton
 
         customButton.set_icon("edit-custom");
 
         customButton.set_icon("edit-custom");
 +
 +
=== How do I add a keyboard shortcut to my tool button? ===
 +
We typically use Alt characters for shortcuts within an activity, reserving Ctrl for system shortcuts. In the example below, we add the Alt-b short cut to our custom button.
 +
 +
        #Add keyboard shortcut for customButton
 +
        customButton.props.accelerator = '<Alt>b'