Ticket #12395: PropertiesHelpShortcut.patch

File PropertiesHelpShortcut.patch, 1.4 KB (added by kolesar, 5 years ago)
  • src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    diff --git a/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java b/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
    index efcf1ec..abf27c0 100644
    a b implements SelectionChangedListener, MapView.EditLayerChangeListener, DataSetLis 
    528528
    529529        // F1 button = custom help action
    530530        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
    531                 KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), "onHelp");
     531                helpAction.getKeyStroke(), "onHelp");
    532532        getActionMap().put("onHelp", helpAction);
    533533    }
    534534
    implements SelectionChangedListener, MapView.EditLayerChangeListener, DataSetLis 
    11221122
    11231123    class HelpAction extends AbstractAction {
    11241124        HelpAction() {
    1125             putValue(NAME, tr("Go to OSM wiki for tag help (F1)"));
     1125            putValue(NAME, tr("Go to OSM wiki for tag help"));
    11261126            putValue(SHORT_DESCRIPTION, tr("Launch browser with wiki help for selected object"));
    11271127            putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));
     1128            putValue(ACCELERATOR_KEY, getKeyStroke());
     1129        }
     1130
     1131        public KeyStroke getKeyStroke() {
     1132            return KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0);
    11281133        }
    11291134
    11301135        @Override