Changeset 1084 in josm for trunk


Ignore:
Timestamp:
2008-11-18T19:53:53+01:00 (16 years ago)
Author:
framm
Message:
  • cosmetics: rename ShortCut to Shortcut, and shortCut to shortcut
Location:
trunk/src/org/openstreetmap/josm
Files:
1 added
3 deleted
73 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r1080 r1084  
    6363import org.openstreetmap.josm.tools.PlatformHookWindows;
    6464import org.openstreetmap.josm.tools.PlatformHookOsx;
    65 import org.openstreetmap.josm.tools.ShortCut;
     65import org.openstreetmap.josm.tools.Shortcut;
    6666
    6767abstract public class Main {
     
    204204                contentPane.add(toolbar.control, BorderLayout.NORTH);
    205205
    206                 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ShortCut.registerShortCut("system:help", tr("Help"), KeyEvent.VK_F1, ShortCut.GROUP_DIRECT).getKeyStroke(), "Help");
     206                contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1, Shortcut.GROUP_DIRECT).getKeyStroke(), "Help");
    207207                contentPane.getActionMap().put("Help", menu.help);
    208208
     
    440440
    441441        public static boolean breakBecauseUnsavedChanges() {
    442                 ShortCut.savePrefs();
     442                Shortcut.savePrefs();
    443443                if (map != null) {
    444444                        boolean modified = false;
  • trunk/src/org/openstreetmap/josm/actions/AboutAction.java

    r1073 r1084  
    3434import org.openstreetmap.josm.tools.ImageProvider;
    3535import org.openstreetmap.josm.tools.UrlLabel;
    36 import org.openstreetmap.josm.tools.ShortCut;
     36import org.openstreetmap.josm.tools.Shortcut;
    3737
    3838/**
     
    7070
    7171        public AboutAction() {
    72                 super(tr("About"), "about", tr("Display the about screen."), ShortCut.registerShortCut("system:about", tr("About"), KeyEvent.VK_F1, ShortCut.GROUP_DIRECT, ShortCut.SHIFT_DEFAULT), true);
     72                super(tr("About"), "about", tr("Display the about screen."), Shortcut.registerShortcut("system:about", tr("About"), KeyEvent.VK_F1, Shortcut.GROUP_DIRECT, Shortcut.SHIFT_DEFAULT), true);
    7373        }
    7474
  • trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java

    r1054 r1084  
    2020import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2121import org.openstreetmap.josm.data.osm.Way;
    22 import org.openstreetmap.josm.tools.ShortCut;
     22import org.openstreetmap.josm.tools.Shortcut;
    2323
    2424/**
     
    3131        public AlignInCircleAction() {
    3232                super(tr("Align Nodes in Circle"), "aligncircle", tr("Move the selected nodes into a circle."),
    33                 ShortCut.registerShortCut("tools:aligncircle", tr("Tool: {0}", tr("Align Nodes in Circle")), KeyEvent.VK_O, ShortCut.GROUP_EDIT), true);
     33                Shortcut.registerShortcut("tools:aligncircle", tr("Tool: {0}", tr("Align Nodes in Circle")), KeyEvent.VK_O, Shortcut.GROUP_EDIT), true);
    3434        }
    3535
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r1054 r1084  
    1818import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1919import org.openstreetmap.josm.data.osm.Way;
    20 import org.openstreetmap.josm.tools.ShortCut;
     20import org.openstreetmap.josm.tools.Shortcut;
    2121
    2222/**
     
    3131        public AlignInLineAction() {
    3232                super(tr("Align Nodes in Line"), "alignline", tr("Move the selected nodes onto a line."),
    33                 ShortCut.registerShortCut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, ShortCut.GROUP_EDIT), true);
     33                Shortcut.registerShortcut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, Shortcut.GROUP_EDIT), true);
    3434        }
    3535
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r1054 r1084  
    1515import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
    1616import org.openstreetmap.josm.gui.layer.Layer;
    17 import org.openstreetmap.josm.tools.ShortCut;
     17import org.openstreetmap.josm.tools.Shortcut;
    1818
    1919/**
     
    4747    public AutoScaleAction(String mode) {
    4848        super(tr("Zoom to {0}", tr(mode)), "dialogs/autoscale/" + mode, tr("Zoom the view to {0}.", tr(mode)),
    49                                 ShortCut.registerShortCut("view:zoom"+mode, tr("View: {0}", tr("Zoom to {0}", tr(mode))), getModeShortcut(mode), ShortCut.GROUP_EDIT), true);
     49                                Shortcut.registerShortcut("view:zoom"+mode, tr("View: {0}", tr("Zoom to {0}", tr(mode))), getModeShortcut(mode), Shortcut.GROUP_EDIT), true);
    5050        String modeHelp = Character.toUpperCase(mode.charAt(0)) + mode.substring(1);
    5151        putValue("help", "Action/AutoScale/" + modeHelp);
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r1054 r1084  
    4040import org.openstreetmap.josm.tools.GBC;
    4141import org.openstreetmap.josm.tools.Pair;
    42 import org.openstreetmap.josm.tools.ShortCut;
     42import org.openstreetmap.josm.tools.Shortcut;
    4343
    4444/**
     
    5151        public CombineWayAction() {
    5252                super(tr("Combine Way"), "combineway", tr("Combine several ways into one."),
    53                 ShortCut.registerShortCut("tools:combineway", tr("Tool: {0}", tr("Combine Way")), KeyEvent.VK_C, ShortCut.GROUP_EDIT), true);
     53                Shortcut.registerShortcut("tools:combineway", tr("Tool: {0}", tr("Combine Way")), KeyEvent.VK_C, Shortcut.GROUP_EDIT), true);
    5454                DataSet.selListeners.add(this);
    5555        }
  • trunk/src/org/openstreetmap/josm/actions/CopyAction.java

    r1054 r1084  
    2424import org.openstreetmap.josm.data.osm.Way;
    2525import org.openstreetmap.josm.data.osm.visitor.Visitor;
    26 import org.openstreetmap.josm.tools.ShortCut;
     26import org.openstreetmap.josm.tools.Shortcut;
    2727
    2828public final class CopyAction extends JosmAction implements SelectionChangedListener {
     
    3333                super(tr("Copy"), "copy",
    3434                                tr("Copy selected objects to paste buffer."),
    35                                 ShortCut.registerShortCut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, ShortCut.GROUP_MENU), true);
     35                                Shortcut.registerShortcut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, Shortcut.GROUP_MENU), true);
    3636                setEnabled(false);
    3737                DataSet.selListeners.add(this);
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r1054 r1084  
    2020import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2121import org.openstreetmap.josm.data.osm.Way;
    22 import org.openstreetmap.josm.tools.ShortCut;
     22import org.openstreetmap.josm.tools.Shortcut;
    2323
    2424/**
     
    3636        public CreateCircleAction() {
    3737                super(tr("Create Circle"), "createcircle", tr("Create a circle from three selected nodes."),
    38                 ShortCut.registerShortCut("tools:createcircle", tr("Tool: {0}", tr("Create Circle")), KeyEvent.VK_O, ShortCut.GROUP_EDIT, ShortCut.SHIFT_DEFAULT), true);
     38                Shortcut.registerShortcut("tools:createcircle", tr("Tool: {0}", tr("Create Circle")), KeyEvent.VK_O, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
    3939        }
    4040
  • trunk/src/org/openstreetmap/josm/actions/DeleteAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.Main;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212public final class DeleteAction extends JosmAction {
     
    1414        public DeleteAction() {
    1515                super(tr("Delete"), "dialogs/delete", tr("Delete selected objects."),
    16                 ShortCut.registerShortCut("system:delete", tr("Edit: {0}", tr("Delete")), KeyEvent.VK_DELETE, ShortCut.GROUP_DIRECT), true);
     16                Shortcut.registerShortcut("system:delete", tr("Edit: {0}", tr("Delete")), KeyEvent.VK_DELETE, Shortcut.GROUP_DIRECT), true);
    1717                setEnabled(true);
    1818        }
  • trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java

    r1023 r1084  
    1010
    1111import org.openstreetmap.josm.Main;
    12 import org.openstreetmap.josm.tools.ShortCut;
     12import org.openstreetmap.josm.tools.Shortcut;
    1313
    1414/**
     
    1717abstract public class DiskAccessAction extends JosmAction {
    1818
    19         public DiskAccessAction(String name, String iconName, String tooltip, ShortCut shortCut) {
    20                 super(name, iconName, tooltip, shortCut, true);
     19        public DiskAccessAction(String name, String iconName, String tooltip, Shortcut shortcut) {
     20                super(name, iconName, tooltip, shortcut, true);
    2121        }
    2222
    2323        @Deprecated
    24         public DiskAccessAction(String name, String iconName, String tooltip, int shortCut, int modifiers) {
    25                 super(name, iconName, tooltip, shortCut, modifiers, true);
     24        public DiskAccessAction(String name, String iconName, String tooltip, int shortcut, int modifiers) {
     25                super(name, iconName, tooltip, shortcut, modifiers, true);
    2626        }
    2727
  • trunk/src/org/openstreetmap/josm/actions/DownloadAction.java

    r1054 r1084  
    1616import org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask;
    1717import org.openstreetmap.josm.tools.GBC;
    18 import org.openstreetmap.josm.tools.ShortCut;
     18import org.openstreetmap.josm.tools.Shortcut;
    1919
    2020/**
     
    3232        public DownloadAction() {
    3333                super(tr("Download from OSM ..."), "download", tr("Download map data from the OSM server."),
    34                 ShortCut.registerShortCut("file:download", tr("File: {0}", tr("Download from OSM ...")), KeyEvent.VK_D, ShortCut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY), true);
     34                Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download from OSM ...")), KeyEvent.VK_D, Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), true);
    3535        }
    3636
  • trunk/src/org/openstreetmap/josm/actions/DuplicateAction.java

    r1054 r1084  
    1313import org.openstreetmap.josm.data.osm.DataSet;
    1414import org.openstreetmap.josm.data.osm.OsmPrimitive;
    15 import org.openstreetmap.josm.tools.ShortCut;
     15import org.openstreetmap.josm.tools.Shortcut;
    1616
    1717public final class DuplicateAction extends JosmAction implements SelectionChangedListener {
     
    2020        super(tr("Duplicate"), "duplicate",
    2121                        tr("Duplicate selection by copy and immediate paste."),
    22                         ShortCut.registerShortCut("system:duplicate", tr("Edit: {0}", tr("Duplicate")), KeyEvent.VK_D, ShortCut.GROUP_MENU), true);
     22                        Shortcut.registerShortcut("system:duplicate", tr("Edit: {0}", tr("Duplicate")), KeyEvent.VK_D, Shortcut.GROUP_MENU), true);
    2323        setEnabled(false);
    2424                        DataSet.selListeners.add(this);
  • trunk/src/org/openstreetmap/josm/actions/ExitAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.Main;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212/**
     
    2121        public ExitAction() {
    2222                super(tr("Exit"), "exit", tr("Exit the application."),
    23                 ShortCut.registerShortCut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, ShortCut.GROUP_MENU), true);
     23                Shortcut.registerShortcut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, Shortcut.GROUP_MENU), true);
    2424        }
    2525
  • trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java

    r1054 r1084  
    3333import org.openstreetmap.josm.io.GpxWriter;
    3434import org.openstreetmap.josm.tools.GBC;
    35 import org.openstreetmap.josm.tools.ShortCut;
     35import org.openstreetmap.josm.tools.Shortcut;
    3636
    3737/**
     
    4646        public GpxExportAction(Layer layer) {
    4747                super(tr("Export to GPX ..."), "exportgpx", tr("Export the data to GPX file."),
    48                 ShortCut.registerShortCut("file:exportgpx", tr("Export to GPX ..."), KeyEvent.VK_E, ShortCut.GROUP_MENU));
     48                Shortcut.registerShortcut("file:exportgpx", tr("Export to GPX ..."), KeyEvent.VK_E, Shortcut.GROUP_MENU));
    4949                this.layer = layer;
    5050        }
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java

    r1054 r1084  
    1414import org.openstreetmap.josm.data.osm.visitor.Visitor;
    1515import org.openstreetmap.josm.tools.OpenBrowser;
    16 import org.openstreetmap.josm.tools.ShortCut;
     16import org.openstreetmap.josm.tools.Shortcut;
    1717
    1818public class HistoryInfoAction extends JosmAction {
     
    2020        public HistoryInfoAction() {
    2121                super(tr("OSM History Information"), "about",tr("Display history information about OSM ways or nodes."),
    22                 ShortCut.registerShortCut("core:history", tr("OSM History Information"), KeyEvent.VK_H, ShortCut.GROUP_HOTKEY), true);
     22                Shortcut.registerShortcut("core:history", tr("OSM History Information"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true);
    2323        }
    2424
  • trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java

    r1054 r1084  
    2323import org.openstreetmap.josm.data.osm.Way;
    2424import org.openstreetmap.josm.data.osm.WaySegment;
    25 import org.openstreetmap.josm.tools.ShortCut;
     25import org.openstreetmap.josm.tools.Shortcut;
    2626
    2727public class JoinNodeWayAction extends JosmAction {
    2828        public JoinNodeWayAction() {
    2929            super(tr("Join node to way"), "joinnodeway", tr("Join a node into the nearest way segments"),
    30                         ShortCut.registerShortCut("tools:joinnodeway", tr("Tool: {0}", tr("Join node to way")), KeyEvent.VK_J, ShortCut.GROUP_EDIT), true);
     30                        Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join node to way")), KeyEvent.VK_J, Shortcut.GROUP_EDIT), true);
    3131        }
    3232
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r1023 r1084  
    1212import org.openstreetmap.josm.tools.Destroyable;
    1313import org.openstreetmap.josm.tools.ImageProvider;
    14 import org.openstreetmap.josm.tools.ShortCut;
     14import org.openstreetmap.josm.tools.Shortcut;
    1515
    1616/**
     
    2626
    2727        @Deprecated
    28         public KeyStroke shortCut;
    29         protected ShortCut sc;
     28        public KeyStroke shortcut;
     29        protected Shortcut sc;
    3030
    31         public ShortCut getShortCut() {
     31        public Shortcut getShortcut() {
    3232                if (sc == null) {
    33                         sc = ShortCut.registerShortCut("core:none", "No Shortcut", 0, ShortCut.GROUP_NONE);
     33                        sc = Shortcut.registerShortcut("core:none", "No Shortcut", 0, Shortcut.GROUP_NONE);
    3434                        sc.setAutomatic(); // as this shortcut is shared by all action that don't want to have a shortcut,
    3535                                           // we shouldn't allow the user to change it...
     
    3939
    4040        @Deprecated
    41         public JosmAction(String name, String iconName, String tooltip, int shortCut, int modifier, boolean register) {
     41        public JosmAction(String name, String iconName, String tooltip, int shortcut, int modifier, boolean register) {
    4242                super(name, iconName == null ? null : ImageProvider.get(iconName));
    4343                setHelpId();
    44                 if (shortCut != 0) {
    45                         int group = ShortCut.GROUP_LAYER; //GROUP_NONE;
     44                if (shortcut != 0) {
     45                        int group = Shortcut.GROUP_LAYER; //GROUP_NONE;
    4646                        if (((modifier & InputEvent.CTRL_MASK) != 0) || ((modifier & InputEvent.CTRL_DOWN_MASK) != 0)) {
    47                                 group = ShortCut.GROUP_MENU;
     47                                group = Shortcut.GROUP_MENU;
    4848                        } else if (modifier == 0) {
    49                                 group = ShortCut.GROUP_EDIT;
     49                                group = Shortcut.GROUP_EDIT;
    5050                        }
    51                         sc = ShortCut.registerShortCut("auto:"+name, name, shortCut, group);
    52                         this.shortCut = sc.getKeyStroke();
     51                        sc = Shortcut.registerShortcut("auto:"+name, name, shortcut, group);
     52                        this.shortcut = sc.getKeyStroke();
    5353                        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), name);
    5454                        Main.contentPane.getActionMap().put(name, this);
     
    6969         * tooltip - a longer description of the action that will be displayed in the tooltip. Please note
    7070         *           that html is not supported for menu action on some platforms
    71          * shortCut - a ready-created shortcut object or null if you don't want a shortcut. But you always
     71         * shortcut - a ready-created shortcut object or null if you don't want a shortcut. But you always
    7272         *            do want a shortcut, remember you can alway register it with group=none, so you
    7373         *            won't be assigned a shurtcut unless the user configures one. If you pass null here,
     
    7575         * register - register this action for the toolbar preferences?
    7676         */
    77         public JosmAction(String name, String iconName, String tooltip, ShortCut shortCut, boolean register) {
     77        public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register) {
    7878                super(name, iconName == null ? null : ImageProvider.get(iconName));
    7979                setHelpId();
    80                 sc = shortCut;
     80                sc = shortcut;
    8181                if (sc != null) {
    82                         this.shortCut = sc.getKeyStroke();
     82                        this.shortcut = sc.getKeyStroke();
    8383                        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), name);
    8484                        Main.contentPane.getActionMap().put(name, this);
     
    9191
    9292        public void destroy() {
    93                 if (shortCut != null) {
     93                if (shortcut != null) {
    9494                        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).remove(sc.getKeyStroke());
    9595                        Main.contentPane.getActionMap().remove(sc.getKeyStroke());
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r1054 r1084  
    4040import org.openstreetmap.josm.tools.GBC;
    4141import org.openstreetmap.josm.tools.Pair;
    42 import org.openstreetmap.josm.tools.ShortCut;
     42import org.openstreetmap.josm.tools.Shortcut;
    4343
    4444
     
    5454        public MergeNodesAction() {
    5555                super(tr("Merge Nodes"), "mergenodes", tr("Merge nodes into the oldest one."),
    56                 ShortCut.registerShortCut("tools:mergenodes", tr("Tool: {0}", tr("Merge Nodes")), KeyEvent.VK_M, ShortCut.GROUP_EDIT), true);
     56                Shortcut.registerShortcut("tools:mergenodes", tr("Tool: {0}", tr("Merge Nodes")), KeyEvent.VK_M, Shortcut.GROUP_EDIT), true);
    5757                DataSet.selListeners.add(this);
    5858        }
  • trunk/src/org/openstreetmap/josm/actions/MoveAction.java

    r1023 r1084  
    1717import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1818import org.openstreetmap.josm.data.osm.visitor.AllNodesVisitor;
    19 import org.openstreetmap.josm.tools.ShortCut;
     19import org.openstreetmap.josm.tools.Shortcut;
    2020
    2121/**
     
    3131        // any better idea?
    3232        private static Object calltosupermustbefirststatementinconstructor(Direction dir, boolean text) {
    33                 ShortCut sc;
     33                Shortcut sc;
    3434                String directiontext;
    3535                if        (dir == Direction.UP)   {
    3636                        directiontext = tr("up");
    37                         sc = ShortCut.registerShortCut("core:moveup",    tr("Move objects {0}", directiontext), KeyEvent.VK_UP,    ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT);
     37                        sc = Shortcut.registerShortcut("core:moveup",    tr("Move objects {0}", directiontext), KeyEvent.VK_UP,    Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT);
    3838                } else if (dir == Direction.DOWN)  {
    3939                        directiontext = tr("down");
    40                         sc = ShortCut.registerShortCut("core:movedown",  tr("Move objects {0}", directiontext), KeyEvent.VK_DOWN,  ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT);
     40                        sc = Shortcut.registerShortcut("core:movedown",  tr("Move objects {0}", directiontext), KeyEvent.VK_DOWN,  Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT);
    4141                } else if (dir == Direction.LEFT)  {
    4242                        directiontext = tr("left");
    43                         sc = ShortCut.registerShortCut("core:moveleft",  tr("Move objects {0}", directiontext), KeyEvent.VK_LEFT,  ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT);
     43                        sc = Shortcut.registerShortcut("core:moveleft",  tr("Move objects {0}", directiontext), KeyEvent.VK_LEFT,  Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT);
    4444                } else { //dir == Direction.RIGHT) {
    4545                        directiontext = tr("right");
    46                         sc = ShortCut.registerShortCut("core:moveright", tr("Move objects {0}", directiontext), KeyEvent.VK_RIGHT, ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT);
     46                        sc = Shortcut.registerShortcut("core:moveright", tr("Move objects {0}", directiontext), KeyEvent.VK_RIGHT, Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT);
    4747                }
    4848                if (text) {
     
    5656                super(tr("Move {0}", calltosupermustbefirststatementinconstructor(dir, true)), null,
    5757                      tr("Moves Objects {0}", calltosupermustbefirststatementinconstructor(dir, true)),
    58                       (ShortCut)calltosupermustbefirststatementinconstructor(dir, false), true);
     58                      (Shortcut)calltosupermustbefirststatementinconstructor(dir, false), true);
    5959                myDirection = dir;
    6060        }
  • trunk/src/org/openstreetmap/josm/actions/NewAction.java

    r1054 r1084  
    1010import org.openstreetmap.josm.data.osm.DataSet;
    1111import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    12 import org.openstreetmap.josm.tools.ShortCut;
     12import org.openstreetmap.josm.tools.Shortcut;
    1313
    1414public class NewAction extends JosmAction {
     
    1616        public NewAction() {
    1717                super(tr("New"), "new", tr("Create a new map."),
    18                 ShortCut.registerShortCut("system:new", tr("File: {0}", tr("New")), KeyEvent.VK_N, ShortCut.GROUP_MENU), true);
     18                Shortcut.registerShortcut("system:new", tr("File: {0}", tr("New")), KeyEvent.VK_N, Shortcut.GROUP_MENU), true);
    1919        }
    2020
  • trunk/src/org/openstreetmap/josm/actions/OpenAction.java

    r1054 r1084  
    2525import org.openstreetmap.josm.io.OsmReader;
    2626import org.xml.sax.SAXException;
    27 import org.openstreetmap.josm.tools.ShortCut;
     27import org.openstreetmap.josm.tools.Shortcut;
    2828
    2929/**
     
    4040        public OpenAction() {
    4141                super(tr("Open ..."), "open", tr("Open a file."),
    42                 ShortCut.registerShortCut("system:open", tr("File: {0}", tr("Open ...")), KeyEvent.VK_O, ShortCut.GROUP_MENU));
     42                Shortcut.registerShortcut("system:open", tr("File: {0}", tr("Open ...")), KeyEvent.VK_O, Shortcut.GROUP_MENU));
    4343        }
    4444
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r1076 r1084  
    2525import org.openstreetmap.josm.data.osm.Way;
    2626import org.openstreetmap.josm.tools.DontShowAgainInfo;
    27 import org.openstreetmap.josm.tools.ShortCut;
     27import org.openstreetmap.josm.tools.Shortcut;
    2828
    2929/**
     
    4242            "ortho",
    4343            tr("Move nodes so all angles are 0/90/180/270deg"),
    44             ShortCut.registerShortCut("tools:orthogonalize", tr("Tool: {0}", tr("Orthogonalize")),
     44            Shortcut.registerShortcut("tools:orthogonalize", tr("Tool: {0}", tr("Orthogonalize")),
    4545            KeyEvent.VK_Q,
    46             ShortCut.GROUP_EDIT), true);
     46            Shortcut.GROUP_EDIT), true);
    4747        }
    4848
  • trunk/src/org/openstreetmap/josm/actions/PasteAction.java

    r1054 r1084  
    2424import org.openstreetmap.josm.data.osm.Way;
    2525import org.openstreetmap.josm.data.coor.EastNorth;
    26 import org.openstreetmap.josm.tools.ShortCut;
     26import org.openstreetmap.josm.tools.Shortcut;
    2727
    2828public final class PasteAction extends JosmAction {
     
    3030    public PasteAction() {
    3131        super(tr("Paste"), "paste", tr("Paste contents of paste buffer."),
    32                         ShortCut.registerShortCut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, ShortCut.GROUP_MENU), true);
     32                        Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.GROUP_MENU), true);
    3333                        setEnabled(false);
    3434    }
  • trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java

    r1054 r1084  
    2020import org.openstreetmap.josm.data.osm.DataSet;
    2121import org.openstreetmap.josm.data.osm.OsmPrimitive;
    22 import org.openstreetmap.josm.tools.ShortCut;
     22import org.openstreetmap.josm.tools.Shortcut;
    2323
    2424public final class PasteTagsAction extends JosmAction implements SelectionChangedListener {
     
    2727                super(tr("Paste Tags"), "pastetags",
    2828                        tr("Apply tags of contents of paste buffer to all selected items."),
    29                         ShortCut.registerShortCut("system:pastestyle", tr("Edit: {0}", tr("Paste Tags")), KeyEvent.VK_V, ShortCut.GROUP_MENU, ShortCut.SHIFT_DEFAULT), true);
     29                        Shortcut.registerShortcut("system:pastestyle", tr("Edit: {0}", tr("Paste Tags")), KeyEvent.VK_V, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true);
    3030                DataSet.selListeners.add(this);
    3131                copyAction.addListener(this);
  • trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java

    r1053 r1084  
    1616import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
    1717import org.openstreetmap.josm.tools.GBC;
    18 import org.openstreetmap.josm.tools.ShortCut;
     18import org.openstreetmap.josm.tools.Shortcut;
    1919
    2020/**
     
    3030        public PreferencesAction() {
    3131                super(tr("Preferences ..."), "preference", tr("Open a preferences page for global settings."),
    32                 ShortCut.registerShortCut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, ShortCut.GROUP_DIRECT), true);
     32                Shortcut.registerShortcut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, Shortcut.GROUP_DIRECT), true);
    3333        }
    3434
  • trunk/src/org/openstreetmap/josm/actions/RedoAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.Main;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212/**
     
    2222        public RedoAction() {
    2323                super(tr("Redo"), "redo", tr("Redo the last undone action."),
    24                 ShortCut.registerShortCut("system:redo", tr("Edit: {0}", tr("Redo")), KeyEvent.VK_Y, ShortCut.GROUP_MENU), true);
     24                Shortcut.registerShortcut("system:redo", tr("Edit: {0}", tr("Redo")), KeyEvent.VK_Y, Shortcut.GROUP_MENU), true);
    2525                setEnabled(false);
    2626        }
  • trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java

    r1054 r1084  
    2424import org.openstreetmap.josm.data.osm.Way;
    2525import org.openstreetmap.josm.data.osm.visitor.Visitor;
    26 import org.openstreetmap.josm.tools.ShortCut;
     26import org.openstreetmap.josm.tools.Shortcut;
    2727
    2828public final class ReverseWayAction extends JosmAction {
     
    3030        public ReverseWayAction() {
    3131                super(tr("Reverse ways"), "wayflip", tr("Reverse the direction of all selected ways."),
    32                 ShortCut.registerShortCut("tools:reverse", tr("Tool: {0}", tr("Reverse ways")), KeyEvent.VK_R, ShortCut.GROUP_EDIT), true);
     32                Shortcut.registerShortcut("tools:reverse", tr("Tool: {0}", tr("Reverse ways")), KeyEvent.VK_R, Shortcut.GROUP_EDIT), true);
    3333        }
    3434
  • trunk/src/org/openstreetmap/josm/actions/SaveAction.java

    r1054 r1084  
    1010import org.openstreetmap.josm.gui.layer.GpxLayer;
    1111import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    12 import org.openstreetmap.josm.tools.ShortCut;
     12import org.openstreetmap.josm.tools.Shortcut;
    1313
    1414/**
     
    2525        public SaveAction(Layer layer) {
    2626                super(tr("Save"), "save", tr("Save the current data."),
    27                 ShortCut.registerShortCut("system:save", tr("File: {0}", tr("Save")), KeyEvent.VK_S, ShortCut.GROUP_MENU), layer);
     27                Shortcut.registerShortcut("system:save", tr("File: {0}", tr("Save")), KeyEvent.VK_S, Shortcut.GROUP_MENU), layer);
    2828        }
    2929
  • trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java

    r1023 r1084  
    2222import org.openstreetmap.josm.io.OsmWriter;
    2323import org.openstreetmap.josm.io.GpxWriter;
    24 import org.openstreetmap.josm.tools.ShortCut;
     24import org.openstreetmap.josm.tools.Shortcut;
    2525
    2626public abstract class SaveActionBase extends DiskAccessAction {
     
    2828        private Layer layer;
    2929
    30         public SaveActionBase(String name, String iconName, String tooltip, ShortCut shortCut, Layer layer) {
    31                 super(name, iconName, tooltip, shortCut);
     30        public SaveActionBase(String name, String iconName, String tooltip, Shortcut shortcut, Layer layer) {
     31                super(name, iconName, tooltip, shortcut);
    3232                this.layer = layer;
    3333        }
    3434
    3535        @Deprecated
    36         public SaveActionBase(String name, String iconName, String tooltip, int shortCut, int modifiers, Layer layer) {
    37                 super(name, iconName, tooltip, shortCut, modifiers);
     36        public SaveActionBase(String name, String iconName, String tooltip, int shortcut, int modifiers, Layer layer) {
     37                super(name, iconName, tooltip, shortcut, modifiers);
    3838                this.layer = layer;
    3939        }
  • trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.gui.layer.Layer;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212/**
     
    2323        public SaveAsAction(Layer layer) {
    2424                super(tr("Save as ..."), "save_as", tr("Save the current data to a new file."),
    25                 ShortCut.registerShortCut("system:saveas", tr("File: {0}", tr("Save as ...")), KeyEvent.VK_S, ShortCut.GROUP_MENU, ShortCut.SHIFT_DEFAULT), layer);
     25                Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save as ...")), KeyEvent.VK_S, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), layer);
    2626        }
    2727
  • trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.Main;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212public class SelectAllAction extends JosmAction {
     
    1414        public SelectAllAction() {
    1515                super(tr("Select All"),"selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
    16                 ShortCut.registerShortCut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, ShortCut.GROUP_MENU), true);
     16                Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.GROUP_MENU), true);
    1717        }
    1818
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r1054 r1084  
    3333import org.openstreetmap.josm.data.osm.visitor.NameVisitor;
    3434import org.openstreetmap.josm.data.osm.visitor.Visitor;
    35 import org.openstreetmap.josm.tools.ShortCut;
     35import org.openstreetmap.josm.tools.Shortcut;
    3636
    3737/**
     
    5252        public SplitWayAction() {
    5353                super(tr("Split Way"), "splitway", tr("Split a way at the selected node."),
    54                 ShortCut.registerShortCut("tools:splitway", tr("Tool: {0}", tr("Split Way")), KeyEvent.VK_P, ShortCut.GROUP_EDIT), true);
     54                Shortcut.registerShortcut("tools:splitway", tr("Tool: {0}", tr("Split Way")), KeyEvent.VK_P, Shortcut.GROUP_EDIT), true);
    5555                DataSet.selListeners.add(this);
    5656        }
  • trunk/src/org/openstreetmap/josm/actions/ToggleGPXLinesAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.Main;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212public class ToggleGPXLinesAction extends JosmAction {
     
    1414        public ToggleGPXLinesAction() {
    1515                super(tr("Toggle GPX Lines"), "gps-lines", tr("Toggles the global setting ''{0}''.", tr("Draw lines between raw gps points.")),
    16                 ShortCut.registerShortCut("view:gpxlines", tr("View: {0}", tr("Toggle GPX Lines")), KeyEvent.VK_X, ShortCut.GROUP_MENU), true);
     16                Shortcut.registerShortcut("view:gpxlines", tr("View: {0}", tr("Toggle GPX Lines")), KeyEvent.VK_X, Shortcut.GROUP_MENU), true);
    1717        }
    1818
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r1054 r1084  
    2424import org.openstreetmap.josm.data.osm.RelationMember;
    2525import org.openstreetmap.josm.data.osm.Way;
    26 import org.openstreetmap.josm.tools.ShortCut;
     26import org.openstreetmap.josm.tools.Shortcut;
    2727
    2828/**
     
    4545        public UnGlueAction() {
    4646                super(tr("UnGlue Ways"), "unglueways", tr("Duplicate nodes that are used by multiple ways."),
    47                 ShortCut.registerShortCut("tools:unglue", tr("Tool: {0}", tr("UnGlue Ways")), KeyEvent.VK_G, ShortCut.GROUP_EDIT), true);
     47                Shortcut.registerShortcut("tools:unglue", tr("Tool: {0}", tr("UnGlue Ways")), KeyEvent.VK_G, Shortcut.GROUP_EDIT), true);
    4848                //DataSet.selListeners.add(this);
    4949        }
  • trunk/src/org/openstreetmap/josm/actions/UndoAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.Main;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212/**
     
    2222        public UndoAction() {
    2323                super(tr("Undo"), "undo", tr("Undo the last action."),
    24                 ShortCut.registerShortCut("system:undo", tr("Edit: {0}", tr("Undo")), KeyEvent.VK_Z, ShortCut.GROUP_MENU), true);
     24                Shortcut.registerShortcut("system:undo", tr("Edit: {0}", tr("Undo")), KeyEvent.VK_Z, Shortcut.GROUP_MENU), true);
    2525                setEnabled(false);
    2626        }
  • trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java

    r1054 r1084  
    99
    1010import org.openstreetmap.josm.Main;
    11 import org.openstreetmap.josm.tools.ShortCut;
     11import org.openstreetmap.josm.tools.Shortcut;
    1212
    1313public class UnselectAllAction extends JosmAction {
     
    1515        public UnselectAllAction() {
    1616                super(tr("Unselect All"), "unselectall", tr("Unselect all objects."),
    17                 ShortCut.registerShortCut("edit:unselectall", tr("Edit: {0}", tr("Unselect All")), KeyEvent.VK_U, ShortCut.GROUP_EDIT), true);
     17                Shortcut.registerShortcut("edit:unselectall", tr("Edit: {0}", tr("Unselect All")), KeyEvent.VK_U, Shortcut.GROUP_EDIT), true);
    1818                // this is not really GROUP_EDIT, but users really would complain if the yhad to reconfigure because we put
    1919                // the correct group in
     
    2121                // Add extra shortcut C-S-a
    2222                Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    23                 ShortCut.registerShortCut("edit:unselectallfocus", tr("Edit: {0}", tr("Unselect All (Focus)")),
    24                 KeyEvent.VK_A, ShortCut.GROUP_MENU, ShortCut.SHIFT_DEFAULT).getKeyStroke(),
     23                Shortcut.registerShortcut("edit:unselectallfocus", tr("Edit: {0}", tr("Unselect All (Focus)")),
     24                KeyEvent.VK_A, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT).getKeyStroke(),
    2525                tr("Unselect All"));
    2626
     
    3232                 */
    3333                Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    34                 ShortCut.registerShortCut("edit:unselectallescape", tr("Edit: {0}", tr("Unselect All (Escape)")),
    35                 KeyEvent.VK_ESCAPE, ShortCut.GROUP_DIRECT).getKeyStroke(),
     34                Shortcut.registerShortcut("edit:unselectallescape", tr("Edit: {0}", tr("Unselect All (Escape)")),
     35                KeyEvent.VK_ESCAPE, Shortcut.GROUP_DIRECT).getKeyStroke(),
    3636                tr("Unselect All"));
    3737        }
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r1054 r1084  
    2323import org.openstreetmap.josm.tools.GBC;
    2424import org.xml.sax.SAXException;
    25 import org.openstreetmap.josm.tools.ShortCut;
     25import org.openstreetmap.josm.tools.Shortcut;
    2626
    2727/**
     
    6161        public UploadAction() {
    6262                super(tr("Upload to OSM ..."), "upload", tr("Upload all changes to the OSM server."),
    63                 ShortCut.registerShortCut("file:upload", tr("File: {0}", tr("Upload to OSM ...")), KeyEvent.VK_U, ShortCut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY), true);
     63                Shortcut.registerShortcut("file:upload", tr("File: {0}", tr("Upload to OSM ...")), KeyEvent.VK_U, Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), true);
    6464
    6565                /**
  • trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.Main;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212public final class ZoomInAction extends JosmAction {
     
    1414        public ZoomInAction() {
    1515                super(tr("Zoom in"), "dialogs/zoomin", tr("Zoom in"),
    16                 ShortCut.registerShortCut("view:zoomin", tr("View: {0}", tr("Zoom in")), KeyEvent.VK_PLUS, ShortCut.GROUP_DIRECT), true);
     16                Shortcut.registerShortcut("view:zoomin", tr("View: {0}", tr("Zoom in")), KeyEvent.VK_PLUS, Shortcut.GROUP_DIRECT), true);
    1717                setEnabled(true);
    1818        }
  • trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java

    r1054 r1084  
    88
    99import org.openstreetmap.josm.Main;
    10 import org.openstreetmap.josm.tools.ShortCut;
     10import org.openstreetmap.josm.tools.Shortcut;
    1111
    1212public final class ZoomOutAction extends JosmAction {
     
    1414        public ZoomOutAction() {
    1515                super(tr("Zoom out"), "dialogs/zoomout", tr("Zoom out"),
    16                 ShortCut.registerShortCut("view:zoomout", tr("View: {0}", tr("Zoom out")), KeyEvent.VK_MINUS, ShortCut.GROUP_DIRECT), true);
     16                Shortcut.registerShortcut("view:zoomout", tr("View: {0}", tr("Zoom out")), KeyEvent.VK_MINUS, Shortcut.GROUP_DIRECT), true);
    1717                setEnabled(true);
    1818        }
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioBackAction.java

    r1054 r1084  
    1111import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    1212import org.openstreetmap.josm.tools.AudioPlayer;
    13 import org.openstreetmap.josm.tools.ShortCut;
     13import org.openstreetmap.josm.tools.Shortcut;
    1414
    1515public class AudioBackAction extends JosmAction {
     
    1919        public AudioBackAction() {
    2020                super(tr("Back"), "audio-back", tr("Jump back."),
    21                 ShortCut.registerShortCut("audio:back", tr("Audio: {0}", tr("Back")), KeyEvent.VK_F6, ShortCut.GROUP_DIRECT), true);
     21                Shortcut.registerShortcut("audio:back", tr("Audio: {0}", tr("Back")), KeyEvent.VK_F6, Shortcut.GROUP_DIRECT), true);
    2222                try {
    2323                        amount = - Double.parseDouble(Main.pref.get("audio.forwardbackamount","10.0"));
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFastSlowAction.java

    r1023 r1084  
    77import org.openstreetmap.josm.actions.JosmAction;
    88import org.openstreetmap.josm.tools.AudioPlayer;
    9 import org.openstreetmap.josm.tools.ShortCut;
     9import org.openstreetmap.josm.tools.Shortcut;
    1010
    1111abstract public class AudioFastSlowAction extends JosmAction {
     
    1313        private double multiplier;
    1414
    15         public AudioFastSlowAction(String name, String iconName, String tooltip, ShortCut shortcut, boolean fast) {
     15        public AudioFastSlowAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean fast) {
    1616                super(name, iconName, tooltip, shortcut, true);
    1717                try {
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFasterAction.java

    r1054 r1084  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    5 import org.openstreetmap.josm.tools.ShortCut;
     5import org.openstreetmap.josm.tools.Shortcut;
    66
    77import java.awt.event.KeyEvent;
     
    1111        public AudioFasterAction() {
    1212                super(tr("Faster"), "audio-faster", tr("Faster Forward"),
    13                 ShortCut.registerShortCut("audio:faster", tr("Audio: {0}", tr("Faster")), KeyEvent.VK_F9, ShortCut.GROUP_DIRECT), true);
     13                Shortcut.registerShortcut("audio:faster", tr("Audio: {0}", tr("Faster")), KeyEvent.VK_F9, Shortcut.GROUP_DIRECT), true);
    1414        }
    1515}
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFwdAction.java

    r1054 r1084  
    1111import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    1212import org.openstreetmap.josm.tools.AudioPlayer;
    13 import org.openstreetmap.josm.tools.ShortCut;
     13import org.openstreetmap.josm.tools.Shortcut;
    1414
    1515public class AudioFwdAction extends JosmAction {
     
    1919        public AudioFwdAction() {
    2020                super(tr("Forward"), "audio-fwd", tr("Jump forward"),
    21                 ShortCut.registerShortCut("audio:forward", tr("Audio: {0}", tr("Forward")), KeyEvent.VK_F7, ShortCut.GROUP_DIRECT), true);
     21                Shortcut.registerShortcut("audio:forward", tr("Audio: {0}", tr("Forward")), KeyEvent.VK_F7, Shortcut.GROUP_DIRECT), true);
    2222                try {
    2323                        amount = Double.parseDouble(Main.pref.get("audio.forwardbackamount","10.0"));
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioNextAction.java

    r1054 r1084  
    99import org.openstreetmap.josm.actions.JosmAction;
    1010import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    11 import org.openstreetmap.josm.tools.ShortCut;
     11import org.openstreetmap.josm.tools.Shortcut;
    1212
    1313public class AudioNextAction extends JosmAction {
     
    1515        public AudioNextAction() {
    1616                super(tr("Next Marker"), "audio-next", tr("Play next marker."),
    17                 ShortCut.registerShortCut("audio:next", tr("Audio: {0}", tr("Next Marker")), KeyEvent.VK_F8, ShortCut.GROUP_DIRECT), true);
     17                Shortcut.registerShortcut("audio:next", tr("Audio: {0}", tr("Next Marker")), KeyEvent.VK_F8, Shortcut.GROUP_DIRECT), true);
    1818        }
    1919
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java

    r1054 r1084  
    1111import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    1212import org.openstreetmap.josm.tools.AudioPlayer;
    13 import org.openstreetmap.josm.tools.ShortCut;
     13import org.openstreetmap.josm.tools.Shortcut;
    1414
    1515public class AudioPlayPauseAction extends JosmAction {
     
    1717        public AudioPlayPauseAction() {
    1818                super(tr("Play/pause"), "audio-playpause", tr("Play/pause audio."),
    19                 ShortCut.registerShortCut("audio:pause", tr("Audio: {0}", tr("Play/pause")), KeyEvent.VK_PERIOD, ShortCut.GROUP_DIRECT), true);
     19                Shortcut.registerShortcut("audio:pause", tr("Audio: {0}", tr("Play/pause")), KeyEvent.VK_PERIOD, Shortcut.GROUP_DIRECT), true);
    2020        }
    2121
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioPrevAction.java

    r1054 r1084  
    99import org.openstreetmap.josm.actions.JosmAction;
    1010import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    11 import org.openstreetmap.josm.tools.ShortCut;
     11import org.openstreetmap.josm.tools.Shortcut;
    1212
    1313public class AudioPrevAction extends JosmAction {
     
    1515        public AudioPrevAction() {
    1616                super(tr("Previous Marker"), "audio-prev", tr("Play previous marker."),
    17                 ShortCut.registerShortCut("audio:prev", tr("Audio: {0}", tr("Previous Marker")), KeyEvent.VK_F5, ShortCut.GROUP_DIRECT), true);
     17                Shortcut.registerShortcut("audio:prev", tr("Audio: {0}", tr("Previous Marker")), KeyEvent.VK_F5, Shortcut.GROUP_DIRECT), true);
    1818        }
    1919
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioSlowerAction.java

    r1054 r1084  
    55
    66import java.awt.event.KeyEvent;
    7 import org.openstreetmap.josm.tools.ShortCut;
     7import org.openstreetmap.josm.tools.Shortcut;
    88
    99public class AudioSlowerAction extends AudioFastSlowAction {
     
    1111        public AudioSlowerAction() {
    1212                super(tr("Slower"), "audio-slower", tr("Slower Forward"),
    13                 ShortCut.registerShortCut("audio:slower", tr("Audio: {0}", tr("Slower")), KeyEvent.VK_F4, ShortCut.GROUP_DIRECT), true);
     13                Shortcut.registerShortcut("audio:slower", tr("Audio: {0}", tr("Slower")), KeyEvent.VK_F4, Shortcut.GROUP_DIRECT), true);
    1414        }
    1515}
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java

    r1066 r1084  
    1616import org.openstreetmap.josm.gui.MapFrame;
    1717import org.openstreetmap.josm.tools.ImageProvider;
    18 import org.openstreetmap.josm.tools.ShortCut;
     18import org.openstreetmap.josm.tools.Shortcut;
    1919
    2020/**
     
    4444                                "delete",
    4545                                tr("Delete nodes or ways."),
    46                                 ShortCut.registerShortCut("mapmode:delete", tr("Mode: {0}",tr("Delete")), KeyEvent.VK_D, ShortCut.GROUP_EDIT),
     46                                Shortcut.registerShortcut("mapmode:delete", tr("Mode: {0}",tr("Delete")), KeyEvent.VK_D, Shortcut.GROUP_EDIT),
    4747                                mapFrame,
    4848                                ImageProvider.getCursor("normal", "delete"));
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r1054 r1084  
    5151import org.openstreetmap.josm.tools.ImageProvider;
    5252import org.openstreetmap.josm.tools.Pair;
    53 import org.openstreetmap.josm.tools.ShortCut;
     53import org.openstreetmap.josm.tools.Shortcut;
    5454
    5555/**
     
    7474        public DrawAction(MapFrame mapFrame) {
    7575                super(tr("Draw"), "node/autonode", tr("Draw nodes"),
    76                                 ShortCut.registerShortCut("mapmode:draw", tr("Mode: {0}", tr("Draw")), KeyEvent.VK_A, ShortCut.GROUP_EDIT),
     76                                Shortcut.registerShortcut("mapmode:draw", tr("Mode: {0}", tr("Draw")), KeyEvent.VK_A, Shortcut.GROUP_EDIT),
    7777                                mapFrame, getCursor());
    7878
    7979                // Add extra shortcut N
    8080                Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    81                         ShortCut.registerShortCut("mapmode:drawfocus", tr("Mode: Draw Focus"), KeyEvent.VK_N, ShortCut.GROUP_EDIT).getKeyStroke(), tr("Draw"));
     81                        Shortcut.registerShortcut("mapmode:drawfocus", tr("Mode: Draw Focus"), KeyEvent.VK_N, Shortcut.GROUP_EDIT).getKeyStroke(), tr("Draw"));
    8282
    8383                //putValue("help", "Action/AddNode/Autnode");
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r1054 r1084  
    3030import org.openstreetmap.josm.gui.layer.MapViewPaintable;
    3131import org.openstreetmap.josm.tools.ImageProvider;
    32 import org.openstreetmap.josm.tools.ShortCut;
     32import org.openstreetmap.josm.tools.Shortcut;
    3333
    3434/**
     
    7474        public ExtrudeAction(MapFrame mapFrame) {
    7575                super(tr("Extrude"), "extrude/extrude", tr("Create areas"),
    76                                 ShortCut.registerShortCut("mapmode:extrude", tr("Mode: {0}", tr("Extrude")), KeyEvent.VK_X, ShortCut.GROUP_EDIT),
     76                                Shortcut.registerShortcut("mapmode:extrude", tr("Mode: {0}", tr("Extrude")), KeyEvent.VK_X, Shortcut.GROUP_EDIT),
    7777                        mapFrame,
    7878                        getCursor("normal", "selection", Cursor.DEFAULT_CURSOR));
  • trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java

    r1023 r1084  
    1212import org.openstreetmap.josm.gui.MapFrame;
    1313import org.openstreetmap.josm.tools.ImageProvider;
    14 import org.openstreetmap.josm.tools.ShortCut;
     14import org.openstreetmap.josm.tools.Shortcut;
    1515
    1616/**
     
    2929         * Constructor for mapmodes without an menu
    3030         */
    31         public MapMode(String name, String iconName, String tooltip, ShortCut shortCut, MapFrame mapFrame, Cursor cursor) {
    32                 super(name, "mapmode/"+iconName, tooltip, shortCut, false);
     31        public MapMode(String name, String iconName, String tooltip, Shortcut shortcut, MapFrame mapFrame, Cursor cursor) {
     32                super(name, "mapmode/"+iconName, tooltip, shortcut, false);
    3333                this.cursor = cursor;
    3434                putValue("active", false);
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r1054 r1084  
    3636import org.openstreetmap.josm.gui.SelectionManager.SelectionEnded;
    3737import org.openstreetmap.josm.tools.ImageProvider;
    38 import org.openstreetmap.josm.tools.ShortCut;
     38import org.openstreetmap.josm.tools.Shortcut;
    3939
    4040/**
     
    8686        public SelectAction(MapFrame mapFrame) {
    8787                super(tr("Select"), "move/move", tr("Select, move and rotate objects"),
    88                         ShortCut.registerShortCut("mapmode:select", tr("Mode: {0}", tr("Select")), KeyEvent.VK_S, ShortCut.GROUP_EDIT),
     88                        Shortcut.registerShortcut("mapmode:select", tr("Mode: {0}", tr("Select")), KeyEvent.VK_S, Shortcut.GROUP_EDIT),
    8989                        mapFrame,
    9090                        getCursor("normal", "selection", Cursor.DEFAULT_CURSOR));
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ZoomAction.java

    r1054 r1084  
    1313import org.openstreetmap.josm.gui.SelectionManager.SelectionEnded;
    1414import org.openstreetmap.josm.tools.ImageProvider;
    15 import org.openstreetmap.josm.tools.ShortCut;
     15import org.openstreetmap.josm.tools.Shortcut;
    1616
    1717/**
     
    4747        public ZoomAction(MapFrame mapFrame) {
    4848                super(tr("Zoom"), "zoom", tr("Zoom and move map"),
    49                 ShortCut.registerShortCut("mapmode:zoom", tr("Mode: {0}", tr("Zoom")), KeyEvent.VK_Z, ShortCut.GROUP_EDIT),
     49                Shortcut.registerShortcut("mapmode:zoom", tr("Mode: {0}", tr("Zoom")), KeyEvent.VK_Z, Shortcut.GROUP_EDIT),
    5050                mapFrame, ImageProvider.getCursor("normal", "zoom"));
    5151                mv = mapFrame.mapView;
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r1063 r1084  
    2222import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2323import org.openstreetmap.josm.tools.GBC;
    24 import org.openstreetmap.josm.tools.ShortCut;
     24import org.openstreetmap.josm.tools.Shortcut;
    2525
    2626public class SearchAction extends JosmAction {
     
    3838    public SearchAction() {
    3939        super(tr("Search ..."), "dialogs/search", tr("Search for objects."),
    40         ShortCut.registerShortCut("system:find", tr("Search..."), KeyEvent.VK_F, ShortCut.GROUP_HOTKEY), true);
     40        Shortcut.registerShortcut("system:find", tr("Search..."), KeyEvent.VK_F, Shortcut.GROUP_HOTKEY), true);
    4141    }
    4242
  • trunk/src/org/openstreetmap/josm/gui/MainApplet.java

    r1055 r1084  
    2929import org.openstreetmap.josm.data.ServerSidePreferences;
    3030import org.openstreetmap.josm.tools.GBC;
    31 import org.openstreetmap.josm.tools.ShortCut;
     31import org.openstreetmap.josm.tools.Shortcut;
    3232
    3333public class MainApplet extends JApplet {
     
    3636                public UploadPreferencesAction() {
    3737                        super(tr("Upload Preferences"), "upload-preferences", tr("Upload the current preferences to the server"),
    38                         ShortCut.registerShortCut("applet:uploadprefs", tr("Upload Preferences"), KeyEvent.VK_U, ShortCut.GROUP_HOTKEY), true);
     38                        Shortcut.registerShortcut("applet:uploadprefs", tr("Upload Preferences"), KeyEvent.VK_U, Shortcut.GROUP_HOTKEY), true);
    3939        }
    4040            public void actionPerformed(ActionEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r1076 r1084  
    6161import org.openstreetmap.josm.actions.ToggleGPXLinesAction;
    6262import org.openstreetmap.josm.data.DataSetChecker;
    63 import org.openstreetmap.josm.tools.ShortCut;
     63import org.openstreetmap.josm.tools.Shortcut;
    6464
    6565/**
     
    142142         */
    143143        public static void add(JMenu menu, JosmAction action) {
    144                 if (!action.getShortCut().getAutomatic()) {
     144                if (!action.getShortcut().getAutomatic()) {
    145145                        JMenuItem menuitem = menu.add(action);
    146                         KeyStroke ks = action.getShortCut().getKeyStroke();
     146                        KeyStroke ks = action.getShortcut().getKeyStroke();
    147147                        if (ks != null) {
    148148                                menuitem.setAccelerator(ks);
     
    157157         */
    158158        public void add(JMenu menu, int mnemonicKey, String shortName) {
    159                 ShortCut.registerShortCut("menu:"+shortName, tr("Menu: {0}", menu.getText()), mnemonicKey, ShortCut.GROUP_MNEMONIC).setMnemonic(menu);
     159                Shortcut.registerShortcut("menu:"+shortName, tr("Menu: {0}", menu.getText()), mnemonicKey, Shortcut.GROUP_MNEMONIC).setMnemonic(menu);
    160160                add(menu);
    161161        }
     
    204204                final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe view"));
    205205                wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", false));
    206                 wireframe.setAccelerator(ShortCut.registerShortCut("menu:view:wireframe", "Toggle Wireframe view", KeyEvent.VK_W, ShortCut.GROUP_MENU).getKeyStroke());
     206                wireframe.setAccelerator(Shortcut.registerShortcut("menu:view:wireframe", "Toggle Wireframe view", KeyEvent.VK_W, Shortcut.GROUP_MENU).getKeyStroke());
    207207                wireframe.addActionListener(new ActionListener() {
    208208                        public void actionPerformed(ActionEvent ev) {
     
    253253                helpMenu.add(check);
    254254                current = helpMenu.add(help); // why is help not a JosmAction?
    255                 current.setAccelerator(ShortCut.registerShortCut("system:help", tr("Help"), KeyEvent.VK_F1, ShortCut.GROUP_DIRECT).getKeyStroke());
     255                current.setAccelerator(Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1, Shortcut.GROUP_DIRECT).getKeyStroke());
    256256                add(helpMenu, about);
    257257                add(helpMenu, historyinfo);
  • trunk/src/org/openstreetmap/josm/gui/MapMover.java

    r1054 r1084  
    1515import javax.swing.JComponent;
    1616import javax.swing.JPanel;
    17 import org.openstreetmap.josm.tools.ShortCut;
     17import org.openstreetmap.josm.tools.Shortcut;
    1818import static org.openstreetmap.josm.tools.I18n.tr;
    1919
     
    8282                if (contentPane != null) {
    8383                        contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    84                                 ShortCut.registerShortCut("system:movefocusright", tr("Map: {0}", tr("Move right")), KeyEvent.VK_RIGHT, ShortCut.GROUP_HOTKEY).getKeyStroke(),
     84                                Shortcut.registerShortcut("system:movefocusright", tr("Map: {0}", tr("Move right")), KeyEvent.VK_RIGHT, Shortcut.GROUP_HOTKEY).getKeyStroke(),
    8585                                "MapMover.Zoomer.right");
    8686                        contentPane.getActionMap().put("MapMover.Zoomer.right", new ZoomerAction("right"));
    8787
    8888                        contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    89                                 ShortCut.registerShortCut("system:movefocusleft", tr("Map: {0}", tr("Move left")), KeyEvent.VK_LEFT, ShortCut.GROUP_HOTKEY).getKeyStroke(),
     89                                Shortcut.registerShortcut("system:movefocusleft", tr("Map: {0}", tr("Move left")), KeyEvent.VK_LEFT, Shortcut.GROUP_HOTKEY).getKeyStroke(),
    9090                                "MapMover.Zoomer.left");
    9191                        contentPane.getActionMap().put("MapMover.Zoomer.left", new ZoomerAction("left"));
    9292
    9393                        contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    94                                 ShortCut.registerShortCut("system:movefocusup", tr("Map: {0}", tr("Move up")), KeyEvent.VK_UP, ShortCut.GROUP_HOTKEY).getKeyStroke(),
     94                                Shortcut.registerShortcut("system:movefocusup", tr("Map: {0}", tr("Move up")), KeyEvent.VK_UP, Shortcut.GROUP_HOTKEY).getKeyStroke(),
    9595                                "MapMover.Zoomer.up");
    9696                        contentPane.getActionMap().put("MapMover.Zoomer.up", new ZoomerAction("up"));
    9797
    9898                        contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    99                                 ShortCut.registerShortCut("system:movefocusdown", tr("Map: {0}", tr("Move down")), KeyEvent.VK_DOWN, ShortCut.GROUP_HOTKEY).getKeyStroke(),
     99                                Shortcut.registerShortcut("system:movefocusdown", tr("Map: {0}", tr("Move down")), KeyEvent.VK_DOWN, Shortcut.GROUP_HOTKEY).getKeyStroke(),
    100100                                "MapMover.Zoomer.down");
    101101                        contentPane.getActionMap().put("MapMover.Zoomer.down", new ZoomerAction("down"));
    102102
    103103                        contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    104                                 ShortCut.registerShortCut("view:zoominalternate", tr("Map: {0}", tr("Zoom in")), KeyEvent.VK_COMMA, ShortCut.GROUP_HOTKEY).getKeyStroke(),
     104                                Shortcut.registerShortcut("view:zoominalternate", tr("Map: {0}", tr("Zoom in")), KeyEvent.VK_COMMA, Shortcut.GROUP_HOTKEY).getKeyStroke(),
    105105                                "MapMover.Zoomer.in");
    106106                        contentPane.getActionMap().put("MapMover.Zoomer.in", new ZoomerAction(","));
    107107
    108108                        contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    109                                 ShortCut.registerShortCut("view:zoomoutalternate", tr("Map: {0}", tr("Zoom out")), KeyEvent.VK_PERIOD, ShortCut.GROUP_HOTKEY).getKeyStroke(),
     109                                Shortcut.registerShortcut("view:zoomoutalternate", tr("Map: {0}", tr("Zoom out")), KeyEvent.VK_PERIOD, Shortcut.GROUP_HOTKEY).getKeyStroke(),
    110110                                "MapMover.Zoomer.out");
    111111                        contentPane.getActionMap().put("MapMover.Zoomer.out", new ZoomerAction("."));
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r1047 r1084  
    110110                                JosmAction mv;
    111111                                mv = new MoveAction(MoveAction.Direction.UP);
    112                                 if (mv.getShortCut() != null) {
    113                                         Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortCut().getKeyStroke(), "UP");
     112                                if (mv.getShortcut() != null) {
     113                                        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortcut().getKeyStroke(), "UP");
    114114                                        Main.contentPane.getActionMap().put("UP", mv);
    115115                                }
    116116                                mv = new MoveAction(MoveAction.Direction.DOWN);
    117                                 if (mv.getShortCut() != null) {
    118                                         Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortCut().getKeyStroke(), "DOWN");
     117                                if (mv.getShortcut() != null) {
     118                                        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortcut().getKeyStroke(), "DOWN");
    119119                                        Main.contentPane.getActionMap().put("DOWN", mv);
    120120                                }
    121121                                mv = new MoveAction(MoveAction.Direction.LEFT);
    122                                 if (mv.getShortCut() != null) {
    123                                         Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortCut().getKeyStroke(), "LEFT");
     122                                if (mv.getShortcut() != null) {
     123                                        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortcut().getKeyStroke(), "LEFT");
    124124                                        Main.contentPane.getActionMap().put("LEFT", mv);
    125125                                }
    126126                                mv = new MoveAction(MoveAction.Direction.RIGHT);
    127                                 if (mv.getShortCut() != null) {
    128                                         Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortCut().getKeyStroke(), "RIGHT");
     127                                if (mv.getShortcut() != null) {
     128                                        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortcut().getKeyStroke(), "RIGHT");
    129129                                        Main.contentPane.getActionMap().put("RIGHT", mv);
    130130                                }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java

    r1054 r1084  
    2020import org.openstreetmap.josm.gui.MapFrame;
    2121import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener;
    22 import org.openstreetmap.josm.tools.ShortCut;
     22import org.openstreetmap.josm.tools.Shortcut;
    2323
    2424public class CommandStackDialog extends ToggleDialog implements CommandQueueListener {
     
    2929        public CommandStackDialog(final MapFrame mapFrame) {
    3030                super(tr("Command Stack"), "commandstack", tr("Open a list of all commands (undo buffer)."),
    31                 ShortCut.registerShortCut("subwindow:commandstack", tr("Toggle: {0}", tr("Command Stack")), KeyEvent.VK_O, ShortCut.GROUP_LAYER), 100);
     31                Shortcut.registerShortcut("subwindow:commandstack", tr("Toggle: {0}", tr("Command Stack")), KeyEvent.VK_O, Shortcut.GROUP_LAYER), 100);
    3232                Main.main.undoRedo.listenerCommands.add(this);
    3333
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    r1054 r1084  
    4343import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    4444import org.openstreetmap.josm.gui.SideButton;
    45 import org.openstreetmap.josm.tools.ShortCut;
     45import org.openstreetmap.josm.tools.Shortcut;
    4646
    4747public final class ConflictDialog extends ToggleDialog {
     
    5353        public ConflictDialog() {
    5454                super(tr("Conflict"), "conflict", tr("Merging conflicts."),
    55                 ShortCut.registerShortCut("subwindow:conflict", tr("Toggle: {0}", tr("Conflict")), KeyEvent.VK_C, ShortCut.GROUP_LAYER), 100);
     55                Shortcut.registerShortcut("subwindow:conflict", tr("Toggle: {0}", tr("Conflict")), KeyEvent.VK_C, Shortcut.GROUP_LAYER), 100);
    5656                displaylist.setCellRenderer(new OsmPrimitivRenderer());
    5757                displaylist.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java

    r1054 r1084  
    3838import org.openstreetmap.josm.tools.GBC;
    3939import org.openstreetmap.josm.tools.ImageProvider;
    40 import org.openstreetmap.josm.tools.ShortCut;
     40import org.openstreetmap.josm.tools.Shortcut;
    4141
    4242/**
     
    8989        public HistoryDialog() {
    9090                super(tr("History"), "history", tr("Display the history of all selected items."),
    91                 ShortCut.registerShortCut("subwindow:history", tr("Toggle: {0}", tr("History")), KeyEvent.VK_H,
    92                 ShortCut.GROUP_LAYER, ShortCut.SHIFT_DEFAULT), 150);
     91                Shortcut.registerShortcut("subwindow:history", tr("Toggle: {0}", tr("History")), KeyEvent.VK_H,
     92                Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150);
    9393                historyPane.setVisible(false);
    9494                notLoaded.setVisible(true);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r1054 r1084  
    4040import org.openstreetmap.josm.tools.ImageProvider;
    4141import org.openstreetmap.josm.tools.ImageProvider.OverlayPosition;
    42 import org.openstreetmap.josm.tools.ShortCut;
     42import org.openstreetmap.josm.tools.Shortcut;
    4343
    4444/**
     
    160160        public LayerListDialog(MapFrame mapFrame) {
    161161                super(tr("Layers"), "layerlist", tr("Open a list of all loaded layers."),
    162                 ShortCut.registerShortCut("subwindow:layers", tr("Toggle: {0}", tr("Layers")), KeyEvent.VK_L, ShortCut.GROUP_LAYER), 100);
     162                Shortcut.registerShortcut("subwindow:layers", tr("Toggle: {0}", tr("Layers")), KeyEvent.VK_L, Shortcut.GROUP_LAYER), 100);
    163163                instance = new JList(model);
    164164                listScrollPane = new JScrollPane(instance);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r1075 r1084  
    6464import org.openstreetmap.josm.tools.AutoCompleteComboBox;
    6565import org.openstreetmap.josm.tools.GBC;
    66 import org.openstreetmap.josm.tools.ShortCut;
     66import org.openstreetmap.josm.tools.Shortcut;
    6767
    6868/**
     
    429429        public PropertiesDialog(MapFrame mapFrame) {
    430430                super(tr("Properties/Memberships"), "propertiesdialog", tr("Properties for selected objects."),
    431                 ShortCut.registerShortCut("subwindow:properies", tr("Toggle: {0}", tr("Properties/Memberships")), KeyEvent.VK_P,
    432                 ShortCut.GROUP_LAYER, ShortCut.SHIFT_DEFAULT), 150);
     431                Shortcut.registerShortcut("subwindow:properies", tr("Toggle: {0}", tr("Properties/Memberships")), KeyEvent.VK_P,
     432                Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150);
    433433
    434434                // ---------------------------------------
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r1054 r1084  
    3232import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
    3333import org.openstreetmap.josm.tools.GBC;
    34 import org.openstreetmap.josm.tools.ShortCut;
     34import org.openstreetmap.josm.tools.Shortcut;
    3535
    3636/**
     
    5757        public RelationListDialog() {
    5858                super(tr("Relations"), "relationlist", tr("Open a list of all relations."),
    59                 ShortCut.registerShortCut("subwindow:relations", tr("Toggle: {0}", tr("Relations")), KeyEvent.VK_R, ShortCut.GROUP_LAYER), 150);
     59                Shortcut.registerShortcut("subwindow:relations", tr("Toggle: {0}", tr("Relations")), KeyEvent.VK_R, Shortcut.GROUP_LAYER), 150);
    6060                displaylist.setCellRenderer(new OsmPrimitivRenderer());
    6161                displaylist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r1054 r1084  
    4141import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    4242import org.openstreetmap.josm.gui.SideButton;
    43 import org.openstreetmap.josm.tools.ShortCut;
     43import org.openstreetmap.josm.tools.Shortcut;
    4444
    4545/**
     
    7878    public SelectionListDialog() {
    7979        super(tr("Current Selection"), "selectionlist", tr("Open a selection list window."),
    80         ShortCut.registerShortCut("subwindow:selection", tr("Toggle: {0}", tr("Current Selection")), KeyEvent.VK_T, ShortCut.GROUP_LAYER, ShortCut.SHIFT_DEFAULT), 150);
     80        Shortcut.registerShortcut("subwindow:selection", tr("Toggle: {0}", tr("Current Selection")), KeyEvent.VK_T, Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150);
    8181
    8282        selectionHistory = new LinkedList<Collection<? extends OsmPrimitive>>();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r1047 r1084  
    2626import org.openstreetmap.josm.tools.GBC;
    2727import org.openstreetmap.josm.tools.ImageProvider;
    28 import org.openstreetmap.josm.tools.ShortCut;
     28import org.openstreetmap.josm.tools.Shortcut;
    2929
    3030/**
     
    4040                public AbstractButton button;
    4141
    42                 private ToggleDialogAction(String name, String iconName, String tooltip, ShortCut shortCut, String prefname) {
    43                         super(name, iconName, tooltip, shortCut, false);
     42                private ToggleDialogAction(String name, String iconName, String tooltip, Shortcut shortcut, String prefname) {
     43                        super(name, iconName, tooltip, shortcut, false);
    4444                        this.prefname = prefname;
    4545                }
     
    6363
    6464        @Deprecated
    65         public ToggleDialog(final String name, String iconName, String tooltip, int shortCut, int preferredHeight) {
     65        public ToggleDialog(final String name, String iconName, String tooltip, int shortcut, int preferredHeight) {
    6666                super(new BorderLayout());
    6767                this.prefName = iconName;
    68                 ToggleDialogInit(name, iconName, tooltip, ShortCut.registerShortCut("auto:"+name, tooltip, shortCut, ShortCut.GROUP_LAYER), preferredHeight);
     68                ToggleDialogInit(name, iconName, tooltip, Shortcut.registerShortcut("auto:"+name, tooltip, shortcut, Shortcut.GROUP_LAYER), preferredHeight);
    6969        }
    7070
    71         public ToggleDialog(final String name, String iconName, String tooltip, ShortCut shortCut, int preferredHeight) {
     71        public ToggleDialog(final String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight) {
    7272                super(new BorderLayout());
    7373                this.prefName = iconName;
    74                 ToggleDialogInit(name, iconName, tooltip, shortCut, preferredHeight);
     74                ToggleDialogInit(name, iconName, tooltip, shortcut, preferredHeight);
    7575        }
    7676
    77         private void ToggleDialogInit(final String name, String iconName, String tooltip, ShortCut shortCut, int preferredHeight) {
     77        private void ToggleDialogInit(final String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight) {
    7878                setPreferredSize(new Dimension(330,preferredHeight));
    79                 action = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortCut, iconName);
     79                action = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortcut, iconName);
    8080                String helpId = "Dialog/"+getClass().getName().substring(getClass().getName().lastIndexOf('.')+1);
    8181                action.putValue("help", helpId.substring(0, helpId.length()-6));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java

    r1054 r1084  
    2424import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2525import org.openstreetmap.josm.data.osm.User;
    26 import org.openstreetmap.josm.tools.ShortCut;
     26import org.openstreetmap.josm.tools.Shortcut;
    2727
    2828/**
     
    5252        public UserListDialog() {
    5353                super(tr("Authors"), "userlist", tr("Open a list of people working on the selected objects."),
    54                 ShortCut.registerShortCut("subwindow:authors", tr("Toggle: {0}", tr("Authors")), KeyEvent.VK_A, ShortCut.GROUP_LAYER, ShortCut.SHIFT_DEFAULT), 150);
     54                Shortcut.registerShortcut("subwindow:authors", tr("Toggle: {0}", tr("Authors")), KeyEvent.VK_A, Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150);
    5555
    5656                data.setColumnIdentifiers(new String[]{tr("Author"),tr("# Objects"),"%"});
  • trunk/src/org/openstreetmap/josm/gui/preferences/ShortcutPreference.java

    r1054 r1084  
    1010
    1111import org.openstreetmap.josm.tools.GBC;
    12 import org.openstreetmap.josm.tools.ShortCut;
     12import org.openstreetmap.josm.tools.Shortcut;
    1313import org.openstreetmap.josm.gui.preferences.prefJPanel;
    1414
     
    3737//              private String[] columnNames = new String[]{tr("Action"), tr("Shortcut"), tr("Group"), tr("ID")};
    3838                private String[] columnNames = new String[]{tr("Action"), tr("Shortcut")};
    39                 private Collection<ShortCut> data;
     39                private Collection<Shortcut> data;
    4040                public scListModel() {
    41                         data = ShortCut.listAll();
     41                        data = Shortcut.listAll();
    4242                }
    4343                public int getColumnCount() {
     
    5151                }
    5252                public Object getValueAt(int row, int col) {
    53                         ShortCut sc = (ShortCut)data.toArray()[row];
     53                        Shortcut sc = (Shortcut)data.toArray()[row];
    5454                        if (col == 0) {
    5555                                return sc.getLongText();
     
    5757                                return sc.getKeyText();
    5858                        } /*else if (col == 2) {
    59                                 if (sc.getRequestedGroup() == ShortCut.GROUP_NONE) {
     59                                if (sc.getRequestedGroup() == Shortcut.GROUP_NONE) {
    6060                                        return tr("None");
    61                                 } else if (sc.getRequestedGroup() == ShortCut.GROUP_HOTKEY) {
     61                                } else if (sc.getRequestedGroup() == Shortcut.GROUP_HOTKEY) {
    6262                                        return tr("Hotkey");
    63                                 } else if (sc.getRequestedGroup() == ShortCut.GROUP_MENU) {
     63                                } else if (sc.getRequestedGroup() == Shortcut.GROUP_MENU) {
    6464                                        return tr("Menu");
    65                                 } else if (sc.getRequestedGroup() == ShortCut.GROUP_EDIT) {
     65                                } else if (sc.getRequestedGroup() == Shortcut.GROUP_EDIT) {
    6666                                        return tr("Edit");
    67                                 } else if (sc.getRequestedGroup() == ShortCut.GROUP_LAYER) {
     67                                } else if (sc.getRequestedGroup() == Shortcut.GROUP_LAYER) {
    6868                                        return tr("Subwindow");
    69                                 } else if (sc.getRequestedGroup() == ShortCut.GROUP_DIRECT) {
     69                                } else if (sc.getRequestedGroup() == Shortcut.GROUP_DIRECT) {
    7070                                        return tr("Direct");
    71                                 } else if (sc.getRequestedGroup() == ShortCut.GROUP_MNEMONIC) {
     71                                } else if (sc.getRequestedGroup() == Shortcut.GROUP_MNEMONIC) {
    7272                                        return tr("Mnemonic");
    73                                 } else if (sc.getRequestedGroup() == ShortCut.GROUP_RESERVED) {
     73                                } else if (sc.getRequestedGroup() == Shortcut.GROUP_RESERVED) {
    7474                                        return tr("System");
    7575                                } else {
  • trunk/src/org/openstreetmap/josm/gui/preferences/prefJPanel.java

    r1053 r1084  
    2121
    2222import org.openstreetmap.josm.Main;
    23 import org.openstreetmap.josm.tools.ShortCut;
     23import org.openstreetmap.josm.tools.Shortcut;
    2424
    2525/**
     
    380380                        if (!lsm.isSelectionEmpty()) {
    381381                                int row = lsm.getMinSelectionIndex();
    382                                 ShortCut sc = (ShortCut)panel.model.getValueAt(row, -1);
     382                                Shortcut sc = (Shortcut)panel.model.getValueAt(row, -1);
    383383                                panel.cbDefault.setSelected(!sc.getAssignedUser());
    384384                                panel.cbDisable.setSelected(sc.getKeyStroke() == null);
     
    419419                                if (e != null) { // only if we've been called by a user action
    420420                                        int row = lsm.getMinSelectionIndex();
    421                                         ShortCut sc = (ShortCut)panel.model.getValueAt(row, -1);
     421                                        Shortcut sc = (Shortcut)panel.model.getValueAt(row, -1);
    422422                                        sc.setAssignedUser(!panel.cbDefault.isSelected());
    423423                                        if (panel.cbDisable.isSelected()) {
     
    463463        private class bxAction extends javax.swing.AbstractAction {
    464464                public void actionPerformed(java.awt.event.ActionEvent e) {
    465                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT),    Integer.toString( modifInts[bxPrim1.getSelectedIndex()] ));
    466                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1   +ShortCut.GROUP_EDIT),    Integer.toString( modifInts[ bxSec1.getSelectedIndex()] ));
    467                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2   +ShortCut.GROUP_EDIT),    Integer.toString( modifInts[ bxTer1.getSelectedIndex()] ));
    468 
    469                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MENU),    Integer.toString( modifInts[bxPrim2.getSelectedIndex()] ));
    470                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1   +ShortCut.GROUP_MENU),    Integer.toString( modifInts[ bxSec2.getSelectedIndex()] ));
    471                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2   +ShortCut.GROUP_MENU),    Integer.toString( modifInts[ bxTer2.getSelectedIndex()] ));
    472 
    473                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY),  Integer.toString( modifInts[bxPrim3.getSelectedIndex()] ));
    474                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1   +ShortCut.GROUP_HOTKEY),  Integer.toString( modifInts[ bxSec3.getSelectedIndex()] ));
    475                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2   +ShortCut.GROUP_HOTKEY),  Integer.toString( modifInts[ bxTer3.getSelectedIndex()] ));
    476 
    477                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER),   Integer.toString( modifInts[bxPrim4.getSelectedIndex()] ));
    478                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1   +ShortCut.GROUP_LAYER),   Integer.toString( modifInts[ bxSec4.getSelectedIndex()] ));
    479                         Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2   +ShortCut.GROUP_LAYER),   Integer.toString( modifInts[ bxTer4.getSelectedIndex()] ));
     465                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT),    Integer.toString( modifInts[bxPrim1.getSelectedIndex()] ));
     466                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1   +Shortcut.GROUP_EDIT),    Integer.toString( modifInts[ bxSec1.getSelectedIndex()] ));
     467                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2   +Shortcut.GROUP_EDIT),    Integer.toString( modifInts[ bxTer1.getSelectedIndex()] ));
     468
     469                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU),    Integer.toString( modifInts[bxPrim2.getSelectedIndex()] ));
     470                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1   +Shortcut.GROUP_MENU),    Integer.toString( modifInts[ bxSec2.getSelectedIndex()] ));
     471                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2   +Shortcut.GROUP_MENU),    Integer.toString( modifInts[ bxTer2.getSelectedIndex()] ));
     472
     473                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY),  Integer.toString( modifInts[bxPrim3.getSelectedIndex()] ));
     474                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1   +Shortcut.GROUP_HOTKEY),  Integer.toString( modifInts[ bxSec3.getSelectedIndex()] ));
     475                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2   +Shortcut.GROUP_HOTKEY),  Integer.toString( modifInts[ bxTer3.getSelectedIndex()] ));
     476
     477                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER),   Integer.toString( modifInts[bxPrim4.getSelectedIndex()] ));
     478                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1   +Shortcut.GROUP_LAYER),   Integer.toString( modifInts[ bxSec4.getSelectedIndex()] ));
     479                        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2   +Shortcut.GROUP_LAYER),   Integer.toString( modifInts[ bxTer4.getSelectedIndex()] ));
    480480                }
    481481        }
    482482
    483483        private void initbx() {
    484                 setBx(bxPrim1, "shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT));
    485                 setBx(bxSec1,  "shortcut.groups."+(ShortCut.GROUPS_ALT1   +ShortCut.GROUP_EDIT));
    486                 setBx(bxTer1,  "shortcut.groups."+(ShortCut.GROUPS_ALT2   +ShortCut.GROUP_EDIT));
    487 
    488                 setBx(bxPrim2, "shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MENU));
    489                 setBx(bxSec2,  "shortcut.groups."+(ShortCut.GROUPS_ALT1   +ShortCut.GROUP_MENU));
    490                 setBx(bxTer2,  "shortcut.groups."+(ShortCut.GROUPS_ALT2   +ShortCut.GROUP_MENU));
    491 
    492                 setBx(bxPrim3, "shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY));
    493                 setBx(bxSec3,  "shortcut.groups."+(ShortCut.GROUPS_ALT1   +ShortCut.GROUP_HOTKEY));
    494                 setBx(bxTer3,  "shortcut.groups."+(ShortCut.GROUPS_ALT2   +ShortCut.GROUP_HOTKEY));
    495 
    496                 setBx(bxPrim4, "shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER));
    497                 setBx(bxSec4,  "shortcut.groups."+(ShortCut.GROUPS_ALT1   +ShortCut.GROUP_LAYER));
    498                 setBx(bxTer4,  "shortcut.groups."+(ShortCut.GROUPS_ALT2   +ShortCut.GROUP_LAYER));
     484                setBx(bxPrim1, "shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT));
     485                setBx(bxSec1,  "shortcut.groups."+(Shortcut.GROUPS_ALT1   +Shortcut.GROUP_EDIT));
     486                setBx(bxTer1,  "shortcut.groups."+(Shortcut.GROUPS_ALT2   +Shortcut.GROUP_EDIT));
     487
     488                setBx(bxPrim2, "shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU));
     489                setBx(bxSec2,  "shortcut.groups."+(Shortcut.GROUPS_ALT1   +Shortcut.GROUP_MENU));
     490                setBx(bxTer2,  "shortcut.groups."+(Shortcut.GROUPS_ALT2   +Shortcut.GROUP_MENU));
     491
     492                setBx(bxPrim3, "shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY));
     493                setBx(bxSec3,  "shortcut.groups."+(Shortcut.GROUPS_ALT1   +Shortcut.GROUP_HOTKEY));
     494                setBx(bxTer3,  "shortcut.groups."+(Shortcut.GROUPS_ALT2   +Shortcut.GROUP_HOTKEY));
     495
     496                setBx(bxPrim4, "shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER));
     497                setBx(bxSec4,  "shortcut.groups."+(Shortcut.GROUPS_ALT1   +Shortcut.GROUP_LAYER));
     498                setBx(bxTer4,  "shortcut.groups."+(Shortcut.GROUPS_ALT2   +Shortcut.GROUP_LAYER));
    499499        }
    500500        private void setBx(javax.swing.JComboBox bx, String key) {
  • trunk/src/org/openstreetmap/josm/tools/PlatformHook.java

    r1047 r1084  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    5 import org.openstreetmap.josm.tools.ShortCut;
     5import org.openstreetmap.josm.tools.Shortcut;
    66
    77import java.io.IOException;
     
    5555
    5656        /**
    57           * The initShortCutGroups hook will be called by the
    58           * ShortCut class if it detects that there are no
     57          * The initShortcutGroups hook will be called by the
     58          * Shortcut class if it detects that there are no
    5959          * groups in teh config file. So that will happen
    6060          * once on each JOSM installation only.
     
    6767          * to register any shortcuts from within.
    6868          */
    69         public void initShortCutGroups();
     69        public void initShortcutGroups();
    7070
    7171        /**
    72           * The initSystemShortCuts hook will be called by the
    73           * ShortCut class after the modifier groups have been read
     72          * The initSystemShortcuts hook will be called by the
     73          * Shortcut class after the modifier groups have been read
    7474          * from the config, but before any shortcuts are read from
    7575          * it or registered from within the application.
     
    8989          * user to change them.
    9090          */
    91         public void initSystemShortCuts();
     91        public void initSystemShortcuts();
    9292
    9393        /**
     
    102102          * LAFs.
    103103          */
    104         public String makeTooltip(String name, ShortCut sc);
     104        public String makeTooltip(String name, Shortcut sc);
    105105}
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r1047 r1084  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    5 import org.openstreetmap.josm.tools.ShortCut;
     5import org.openstreetmap.josm.tools.Shortcut;
    66import org.openstreetmap.josm.Main;
    77import org.openstreetmap.josm.tools.PlatformHookUnixoid;
     
    6767                Runtime.getRuntime().exec("open " + url);
    6868        }
    69         public void initShortCutGroups() {
    70                 // Everything but ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MENU is guesswork.
    71                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_NONE),    Integer.toString(-1));
    72                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY),  Integer.toString(KeyEvent.CTRL_DOWN_MASK));
    73                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MENU),    Integer.toString(KeyEvent.META_DOWN_MASK));
    74                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT),    Integer.toString(0));
    75                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    76                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_DIRECT),  Integer.toString(0));
    77                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));
    78 
    79                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_NONE),       Integer.toString(-1));
    80                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
    81                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_MENU),       Integer.toString(KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
    82                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_EDIT),       Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
    83                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
    84                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT),     Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
    85                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    86 
    87                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_NONE),       Integer.toString(-1));
    88                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
    89                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_MENU),       Integer.toString(KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
    90                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_EDIT),       Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
    91                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK));
    92                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_DIRECT),     Integer.toString(KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
    93                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    94         }
    95         public void initSystemShortCuts() {
     69        public void initShortcutGroups() {
     70                // Everything but Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU is guesswork.
     71                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_NONE),    Integer.toString(-1));
     72                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY),  Integer.toString(KeyEvent.CTRL_DOWN_MASK));
     73                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU),    Integer.toString(KeyEvent.META_DOWN_MASK));
     74                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT),    Integer.toString(0));
     75                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     76                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_DIRECT),  Integer.toString(0));
     77                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));
     78
     79                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_NONE),       Integer.toString(-1));
     80                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
     81                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU),       Integer.toString(KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
     82                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT),       Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
     83                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
     84                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT),     Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
     85                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     86
     87                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_NONE),       Integer.toString(-1));
     88                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
     89                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU),       Integer.toString(KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
     90                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_EDIT),       Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
     91                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK));
     92                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_DIRECT),     Integer.toString(KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
     93                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     94        }
     95        public void initSystemShortcuts() {
    9696                // Yeah, it's a long, long list. And people always complain that OSX has no shortcuts.
    97                 ShortCut.registerSystemCut("apple-reserved-01", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems).
    98                 ShortCut.registerSystemCut("apple-reserved-02", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Apple reserved.
    99                 ShortCut.registerSystemCut("apple-reserved-03", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Show the Spotlight search results window (when multiple languages are installed, may rotate through keyboard layouts and input methods within a script).
    100                 ShortCut.registerSystemCut("apple-reserved-04", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); //  | Apple reserved.
    101                 ShortCut.registerSystemCut("apple-reserved-05", "reserved", KeyEvent.VK_TAB, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Navigate through controls in a reverse direction. See "Keyboard Focus and Navigation."
    102                 ShortCut.registerSystemCut("apple-reserved-06", "reserved", KeyEvent.VK_TAB, KeyEvent.META_DOWN_MASK).setAutomatic(); // Move forward to the next most recently used application in a list of open applications.
    103                 ShortCut.registerSystemCut("apple-reserved-07", "reserved", KeyEvent.VK_TAB, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move backward through a list of open applications (sorted by recent use).
    104                 ShortCut.registerSystemCut("apple-reserved-08", "reserved", KeyEvent.VK_TAB, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the next grouping of controls in a dialog or the next table (when Tab moves to the next cell). See Accessibility Overview.
    105                 ShortCut.registerSystemCut("apple-reserved-09", "reserved", KeyEvent.VK_TAB, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previous grouping of controls. See Accessibility Overview.
    106                 ShortCut.registerSystemCut("apple-reserved-10", "reserved", KeyEvent.VK_ESCAPE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Open Front Row.
    107                 ShortCut.registerSystemCut("apple-reserved-11", "reserved", KeyEvent.VK_ESCAPE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Open the Force Quit dialog.
    108                 ShortCut.registerSystemCut("apple-reserved-12", "reserved", KeyEvent.VK_F1, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Toggle full keyboard access on or off. See Accessibility Overview.
    109                 ShortCut.registerSystemCut("apple-reserved-13", "reserved", KeyEvent.VK_F2, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the menu bar. See Accessibility Overview.
    110                 ShortCut.registerSystemCut("apple-reserved-14", "reserved", KeyEvent.VK_F3, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the Dock. See Accessibility Overview.
    111                 ShortCut.registerSystemCut("apple-reserved-15", "reserved", KeyEvent.VK_F4, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the active (or next) window. See Accessibility Overview.
    112                 ShortCut.registerSystemCut("apple-reserved-16", "reserved", KeyEvent.VK_F4, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previously active window. See Accessibility Overview.
    113                 ShortCut.registerSystemCut("apple-reserved-17", "reserved", KeyEvent.VK_F5, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the toolbar. See Accessibility Overview.
    114                 ShortCut.registerSystemCut("apple-reserved-18", "reserved", KeyEvent.VK_F5, KeyEvent.META_DOWN_MASK).setAutomatic(); // Turn VoiceOver on or off. See Accessibility Overview.
    115                 ShortCut.registerSystemCut("apple-reserved-19", "reserved", KeyEvent.VK_F6, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the first (or next) panel. See Accessibility Overview.
    116                 ShortCut.registerSystemCut("apple-reserved-20", "reserved", KeyEvent.VK_F6, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previous panel. See Accessibility Overview.
    117                 ShortCut.registerSystemCut("apple-reserved-21", "reserved", KeyEvent.VK_F7, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Temporarily override the current keyboard access mode in windows and dialogs. See Accessibility Overview.
    118                 ShortCut.registerSystemCut("apple-reserved-22", "reserved", KeyEvent.VK_F9, 0).setAutomatic(); // Tile or untile all open windows.
    119                 ShortCut.registerSystemCut("apple-reserved-23", "reserved", KeyEvent.VK_F10, 0).setAutomatic(); // Tile or untile all open windows in the currently active application.
    120                 ShortCut.registerSystemCut("apple-reserved-24", "reserved", KeyEvent.VK_F11, 0).setAutomatic(); // Hide or show all open windows.
    121                 ShortCut.registerSystemCut("apple-reserved-25", "reserved", KeyEvent.VK_F12, 0).setAutomatic(); // Hide or display Dashboard.
    122                 ShortCut.registerSystemCut("apple-reserved-26", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Activate the next open window in the frontmost application. See "Window Layering."
    123                 ShortCut.registerSystemCut("apple-reserved-27", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Activate the previous open window in the frontmost application. See "Window Layering."
    124                 ShortCut.registerSystemCut("apple-reserved-28", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Move focus to the window drawer.
    125                 ShortCut.registerSystemCut("apple-reserved-29", "reserved", KeyEvent.VK_MINUS, KeyEvent.META_DOWN_MASK).setAutomatic(); // Decrease the size of the selected item (equivalent to the Smaller command). See "The Format Menu."
    126                 ShortCut.registerSystemCut("apple-reserved-30", "reserved", KeyEvent.VK_MINUS, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Zoom out when screen zooming is on. See Accessibility Overview.
    127 
    128                 ShortCut.registerSystemCut("system:align-left", "reserved", KeyEvent.VK_OPEN_BRACKET, KeyEvent.META_DOWN_MASK); // Left-align a selection (equivalent to the Align Left command). See "The Format Menu."
    129                 ShortCut.registerSystemCut("system:align-right","reserved", KeyEvent.VK_CLOSE_BRACKET, KeyEvent.META_DOWN_MASK); // Right-align a selection (equivalent to the Align Right command). See "The Format Menu."
     97                Shortcut.registerSystemShortcut("apple-reserved-01", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems).
     98                Shortcut.registerSystemShortcut("apple-reserved-02", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Apple reserved.
     99                Shortcut.registerSystemShortcut("apple-reserved-03", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Show the Spotlight search results window (when multiple languages are installed, may rotate through keyboard layouts and input methods within a script).
     100                Shortcut.registerSystemShortcut("apple-reserved-04", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); //  | Apple reserved.
     101                Shortcut.registerSystemShortcut("apple-reserved-05", "reserved", KeyEvent.VK_TAB, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Navigate through controls in a reverse direction. See "Keyboard Focus and Navigation."
     102                Shortcut.registerSystemShortcut("apple-reserved-06", "reserved", KeyEvent.VK_TAB, KeyEvent.META_DOWN_MASK).setAutomatic(); // Move forward to the next most recently used application in a list of open applications.
     103                Shortcut.registerSystemShortcut("apple-reserved-07", "reserved", KeyEvent.VK_TAB, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move backward through a list of open applications (sorted by recent use).
     104                Shortcut.registerSystemShortcut("apple-reserved-08", "reserved", KeyEvent.VK_TAB, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the next grouping of controls in a dialog or the next table (when Tab moves to the next cell). See Accessibility Overview.
     105                Shortcut.registerSystemShortcut("apple-reserved-09", "reserved", KeyEvent.VK_TAB, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previous grouping of controls. See Accessibility Overview.
     106                Shortcut.registerSystemShortcut("apple-reserved-10", "reserved", KeyEvent.VK_ESCAPE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Open Front Row.
     107                Shortcut.registerSystemShortcut("apple-reserved-11", "reserved", KeyEvent.VK_ESCAPE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Open the Force Quit dialog.
     108                Shortcut.registerSystemShortcut("apple-reserved-12", "reserved", KeyEvent.VK_F1, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Toggle full keyboard access on or off. See Accessibility Overview.
     109                Shortcut.registerSystemShortcut("apple-reserved-13", "reserved", KeyEvent.VK_F2, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the menu bar. See Accessibility Overview.
     110                Shortcut.registerSystemShortcut("apple-reserved-14", "reserved", KeyEvent.VK_F3, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the Dock. See Accessibility Overview.
     111                Shortcut.registerSystemShortcut("apple-reserved-15", "reserved", KeyEvent.VK_F4, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the active (or next) window. See Accessibility Overview.
     112                Shortcut.registerSystemShortcut("apple-reserved-16", "reserved", KeyEvent.VK_F4, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previously active window. See Accessibility Overview.
     113                Shortcut.registerSystemShortcut("apple-reserved-17", "reserved", KeyEvent.VK_F5, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the toolbar. See Accessibility Overview.
     114                Shortcut.registerSystemShortcut("apple-reserved-18", "reserved", KeyEvent.VK_F5, KeyEvent.META_DOWN_MASK).setAutomatic(); // Turn VoiceOver on or off. See Accessibility Overview.
     115                Shortcut.registerSystemShortcut("apple-reserved-19", "reserved", KeyEvent.VK_F6, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the first (or next) panel. See Accessibility Overview.
     116                Shortcut.registerSystemShortcut("apple-reserved-20", "reserved", KeyEvent.VK_F6, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previous panel. See Accessibility Overview.
     117                Shortcut.registerSystemShortcut("apple-reserved-21", "reserved", KeyEvent.VK_F7, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Temporarily override the current keyboard access mode in windows and dialogs. See Accessibility Overview.
     118                Shortcut.registerSystemShortcut("apple-reserved-22", "reserved", KeyEvent.VK_F9, 0).setAutomatic(); // Tile or untile all open windows.
     119                Shortcut.registerSystemShortcut("apple-reserved-23", "reserved", KeyEvent.VK_F10, 0).setAutomatic(); // Tile or untile all open windows in the currently active application.
     120                Shortcut.registerSystemShortcut("apple-reserved-24", "reserved", KeyEvent.VK_F11, 0).setAutomatic(); // Hide or show all open windows.
     121                Shortcut.registerSystemShortcut("apple-reserved-25", "reserved", KeyEvent.VK_F12, 0).setAutomatic(); // Hide or display Dashboard.
     122                Shortcut.registerSystemShortcut("apple-reserved-26", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Activate the next open window in the frontmost application. See "Window Layering."
     123                Shortcut.registerSystemShortcut("apple-reserved-27", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Activate the previous open window in the frontmost application. See "Window Layering."
     124                Shortcut.registerSystemShortcut("apple-reserved-28", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Move focus to the window drawer.
     125                Shortcut.registerSystemShortcut("apple-reserved-29", "reserved", KeyEvent.VK_MINUS, KeyEvent.META_DOWN_MASK).setAutomatic(); // Decrease the size of the selected item (equivalent to the Smaller command). See "The Format Menu."
     126                Shortcut.registerSystemShortcut("apple-reserved-30", "reserved", KeyEvent.VK_MINUS, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Zoom out when screen zooming is on. See Accessibility Overview.
     127
     128                Shortcut.registerSystemShortcut("system:align-left", "reserved", KeyEvent.VK_OPEN_BRACKET, KeyEvent.META_DOWN_MASK); // Left-align a selection (equivalent to the Align Left command). See "The Format Menu."
     129                Shortcut.registerSystemShortcut("system:align-right","reserved", KeyEvent.VK_CLOSE_BRACKET, KeyEvent.META_DOWN_MASK); // Right-align a selection (equivalent to the Align Right command). See "The Format Menu."
    130130                // I found no KeyEvent for |
    131                 //ShortCut.registerSystemCut("system:align-center", "reserved", '|', KeyEvent.META_DOWN_MASK); // Center-align a selection (equivalent to the Align Center command). See "The Format Menu."
    132                 ShortCut.registerSystemCut("system:spelling", "reserved", KeyEvent.VK_COLON, KeyEvent.META_DOWN_MASK); // Display the Spelling window (equivalent to the Spelling command). See "The Edit Menu."
    133                 ShortCut.registerSystemCut("system:spellcheck", "reserved", KeyEvent.VK_SEMICOLON, KeyEvent.META_DOWN_MASK); // Find misspelled words in the document (equivalent to the Check Spelling command). See "The Edit Menu."
    134                 ShortCut.registerSystemCut("system:preferences", "reserved", KeyEvent.VK_COMMA, KeyEvent.META_DOWN_MASK).setAutomatic(); // Open the application's preferences window (equivalent to the Preferences command). See "The Application Menu."
    135 
    136                 ShortCut.registerSystemCut("apple-reserved-31", "reserved", KeyEvent.VK_COMMA, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Decrease screen contrast. See Accessibility Overview.
    137                 ShortCut.registerSystemCut("apple-reserved-32", "reserved", KeyEvent.VK_PERIOD, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Increase screen contrast. See Accessibility Overview.
     131                //Shortcut.registerSystemCut("system:align-center", "reserved", '|', KeyEvent.META_DOWN_MASK); // Center-align a selection (equivalent to the Align Center command). See "The Format Menu."
     132                Shortcut.registerSystemShortcut("system:spelling", "reserved", KeyEvent.VK_COLON, KeyEvent.META_DOWN_MASK); // Display the Spelling window (equivalent to the Spelling command). See "The Edit Menu."
     133                Shortcut.registerSystemShortcut("system:spellcheck", "reserved", KeyEvent.VK_SEMICOLON, KeyEvent.META_DOWN_MASK); // Find misspelled words in the document (equivalent to the Check Spelling command). See "The Edit Menu."
     134                Shortcut.registerSystemShortcut("system:preferences", "reserved", KeyEvent.VK_COMMA, KeyEvent.META_DOWN_MASK).setAutomatic(); // Open the application's preferences window (equivalent to the Preferences command). See "The Application Menu."
     135
     136                Shortcut.registerSystemShortcut("apple-reserved-31", "reserved", KeyEvent.VK_COMMA, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Decrease screen contrast. See Accessibility Overview.
     137                Shortcut.registerSystemShortcut("apple-reserved-32", "reserved", KeyEvent.VK_PERIOD, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Increase screen contrast. See Accessibility Overview.
    138138
    139139                // I found no KeyEvent for ?
    140                 //ShortCut.registerSystemCut("system:help", "reserved", '?', KeyEvent.META_DOWN_MASK).setAutomatic(); // Open the application's help in Help Viewer. See "The Help Menu."
    141 
    142                 ShortCut.registerSystemCut("apple-reserved-33", "reserved", KeyEvent.VK_SLASH, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Turn font smoothing on or off.
    143                 ShortCut.registerSystemCut("apple-reserved-34", "reserved", KeyEvent.VK_EQUALS, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Increase the size of the selected item (equivalent to the Bigger command). See "The Format Menu."
    144                 ShortCut.registerSystemCut("apple-reserved-35", "reserved", KeyEvent.VK_EQUALS, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Zoom in when screen zooming is on. See Accessibility Overview.
    145                 ShortCut.registerSystemCut("apple-reserved-36", "reserved", KeyEvent.VK_3, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Capture the screen to a file.
    146                 ShortCut.registerSystemCut("apple-reserved-37", "reserved", KeyEvent.VK_3, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Capture the screen to the Clipboard.
    147                 ShortCut.registerSystemCut("apple-reserved-38", "reserved", KeyEvent.VK_4, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Capture a selection to a file.
    148                 ShortCut.registerSystemCut("apple-reserved-39", "reserved", KeyEvent.VK_4, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Capture a selection to the Clipboard.
    149                 ShortCut.registerSystemCut("apple-reserved-40", "reserved", KeyEvent.VK_8, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Turn screen zooming on or off. See Accessibility Overview.
    150                 ShortCut.registerSystemCut("apple-reserved-41", "reserved", KeyEvent.VK_8, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Invert the screen colors. See Accessibility Overview.
    151 
    152                 ShortCut.registerSystemCut("system:selectall", "reserved", KeyEvent.VK_A, KeyEvent.META_DOWN_MASK); // Highlight every item in a document or window, or all characters in a text field (equivalent to the Select All command). See "The Edit Menu."
    153                 ShortCut.registerSystemCut("system:bold", "reserved", KeyEvent.VK_B, KeyEvent.META_DOWN_MASK); // Boldface the selected text or toggle boldfaced text on and off (equivalent to the Bold command). See "The Edit Menu."
    154                 ShortCut.registerSystemCut("system:copy", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK); // Duplicate the selected data and store on the Clipboard (equivalent to the Copy command). See "The Edit Menu."
    155                 ShortCut.registerSystemCut("system:colors", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display the Colors window (equivalent to the Show Colors command). See "The Format Menu."
    156                 ShortCut.registerSystemCut("system:copystyle", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Copy the style of the selected text (equivalent to the Copy Style command). See "The Format Menu."
    157                 ShortCut.registerSystemCut("system:copyformat", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Copy the formatting settings of the selected item and store on the Clipboard (equivalent to the Copy Ruler command). See "The Format Menu."
    158 
    159                 ShortCut.registerSystemCut("apple-reserved-42", "reserved", KeyEvent.VK_D, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Show or hide the Dock. See "The Dock."
    160 
    161                 ShortCut.registerSystemCut("system:dictionarylookup", "reserved", KeyEvent.VK_D, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK); // Display the definition of the selected word in the Dictionary application.
    162                 ShortCut.registerSystemCut("system:findselected", "reserved", KeyEvent.VK_E, KeyEvent.META_DOWN_MASK); // Use the selection for a find operation. See "Find Windows."
    163                 ShortCut.registerSystemCut("system:find", "reserved", KeyEvent.VK_F, KeyEvent.META_DOWN_MASK); // Open a Find window (equivalent to the Find command). See "The Edit Menu."
    164                 ShortCut.registerSystemCut("system:search", "reserved", KeyEvent.VK_F, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Jump to the search field control. See "Search Fields."
    165                 ShortCut.registerSystemCut("system:findnext", "reserved", KeyEvent.VK_G, KeyEvent.META_DOWN_MASK); // Find the next occurrence of the selection (equivalent to the Find Next command). See "The Edit Menu."
    166                 ShortCut.registerSystemCut("system:findprev", "reserved", KeyEvent.VK_G, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Find the previous occurrence of the selection (equivalent to the Find Previous command). See "The Edit Menu."
    167                 ShortCut.registerSystemCut("system:hide", "reserved", KeyEvent.VK_H, KeyEvent.META_DOWN_MASK).setAutomatic(); // Hide the windows of the currently running application (equivalent to the Hide ApplicationName command). See "The Application Menu."
    168                 ShortCut.registerSystemCut("system:hideothers", "reserved", KeyEvent.VK_H, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Hide the windows of all other running applications (equivalent to the Hide Others command). See "The Application Menu."
     140                //Shortcut.registerSystemCut("system:help", "reserved", '?', KeyEvent.META_DOWN_MASK).setAutomatic(); // Open the application's help in Help Viewer. See "The Help Menu."
     141
     142                Shortcut.registerSystemShortcut("apple-reserved-33", "reserved", KeyEvent.VK_SLASH, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Turn font smoothing on or off.
     143                Shortcut.registerSystemShortcut("apple-reserved-34", "reserved", KeyEvent.VK_EQUALS, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Increase the size of the selected item (equivalent to the Bigger command). See "The Format Menu."
     144                Shortcut.registerSystemShortcut("apple-reserved-35", "reserved", KeyEvent.VK_EQUALS, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Zoom in when screen zooming is on. See Accessibility Overview.
     145                Shortcut.registerSystemShortcut("apple-reserved-36", "reserved", KeyEvent.VK_3, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Capture the screen to a file.
     146                Shortcut.registerSystemShortcut("apple-reserved-37", "reserved", KeyEvent.VK_3, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Capture the screen to the Clipboard.
     147                Shortcut.registerSystemShortcut("apple-reserved-38", "reserved", KeyEvent.VK_4, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Capture a selection to a file.
     148                Shortcut.registerSystemShortcut("apple-reserved-39", "reserved", KeyEvent.VK_4, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Capture a selection to the Clipboard.
     149                Shortcut.registerSystemShortcut("apple-reserved-40", "reserved", KeyEvent.VK_8, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Turn screen zooming on or off. See Accessibility Overview.
     150                Shortcut.registerSystemShortcut("apple-reserved-41", "reserved", KeyEvent.VK_8, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Invert the screen colors. See Accessibility Overview.
     151
     152                Shortcut.registerSystemShortcut("system:selectall", "reserved", KeyEvent.VK_A, KeyEvent.META_DOWN_MASK); // Highlight every item in a document or window, or all characters in a text field (equivalent to the Select All command). See "The Edit Menu."
     153                Shortcut.registerSystemShortcut("system:bold", "reserved", KeyEvent.VK_B, KeyEvent.META_DOWN_MASK); // Boldface the selected text or toggle boldfaced text on and off (equivalent to the Bold command). See "The Edit Menu."
     154                Shortcut.registerSystemShortcut("system:copy", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK); // Duplicate the selected data and store on the Clipboard (equivalent to the Copy command). See "The Edit Menu."
     155                Shortcut.registerSystemShortcut("system:colors", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display the Colors window (equivalent to the Show Colors command). See "The Format Menu."
     156                Shortcut.registerSystemShortcut("system:copystyle", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Copy the style of the selected text (equivalent to the Copy Style command). See "The Format Menu."
     157                Shortcut.registerSystemShortcut("system:copyformat", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Copy the formatting settings of the selected item and store on the Clipboard (equivalent to the Copy Ruler command). See "The Format Menu."
     158
     159                Shortcut.registerSystemShortcut("apple-reserved-42", "reserved", KeyEvent.VK_D, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Show or hide the Dock. See "The Dock."
     160
     161                Shortcut.registerSystemShortcut("system:dictionarylookup", "reserved", KeyEvent.VK_D, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK); // Display the definition of the selected word in the Dictionary application.
     162                Shortcut.registerSystemShortcut("system:findselected", "reserved", KeyEvent.VK_E, KeyEvent.META_DOWN_MASK); // Use the selection for a find operation. See "Find Windows."
     163                Shortcut.registerSystemShortcut("system:find", "reserved", KeyEvent.VK_F, KeyEvent.META_DOWN_MASK); // Open a Find window (equivalent to the Find command). See "The Edit Menu."
     164                Shortcut.registerSystemShortcut("system:search", "reserved", KeyEvent.VK_F, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Jump to the search field control. See "Search Fields."
     165                Shortcut.registerSystemShortcut("system:findnext", "reserved", KeyEvent.VK_G, KeyEvent.META_DOWN_MASK); // Find the next occurrence of the selection (equivalent to the Find Next command). See "The Edit Menu."
     166                Shortcut.registerSystemShortcut("system:findprev", "reserved", KeyEvent.VK_G, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Find the previous occurrence of the selection (equivalent to the Find Previous command). See "The Edit Menu."
     167                Shortcut.registerSystemShortcut("system:hide", "reserved", KeyEvent.VK_H, KeyEvent.META_DOWN_MASK).setAutomatic(); // Hide the windows of the currently running application (equivalent to the Hide ApplicationName command). See "The Application Menu."
     168                Shortcut.registerSystemShortcut("system:hideothers", "reserved", KeyEvent.VK_H, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Hide the windows of all other running applications (equivalent to the Hide Others command). See "The Application Menu."
    169169                // What about applications that have italic text AND info windows?
    170                 //ShortCut.registerSystemCut("system:italic", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK); // Italicize the selected text or toggle italic text on or off (equivalent to the Italic command). See "The Format Menu."
    171                 ShortCut.registerSystemCut("system:info", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK); // Display an Info window. See "Inspector Windows."
    172                 ShortCut.registerSystemCut("system:inspector", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Display an inspector window. See "Inspector Windows."
    173                 ShortCut.registerSystemCut("system:toselection", "reserved", KeyEvent.VK_J, KeyEvent.META_DOWN_MASK); // Scroll to a selection.
    174                 ShortCut.registerSystemCut("system:minimize", "reserved", KeyEvent.VK_M, KeyEvent.META_DOWN_MASK); // Minimize the active window to the Dock (equivalent to the Minimize command). See "The Window Menu."
    175                 ShortCut.registerSystemCut("system:minimizeall", "reserved", KeyEvent.VK_M, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Minimize all windows of the active application to the Dock (equivalent to the Minimize All command). See "The Window Menu."
    176                 ShortCut.registerSystemCut("system:new", "reserved", KeyEvent.VK_N, KeyEvent.META_DOWN_MASK); // Open a new document (equivalent to the New command). See "The File Menu."
    177                 ShortCut.registerSystemCut("system:open", "reserved", KeyEvent.VK_O, KeyEvent.META_DOWN_MASK); // Display a dialog for choosing a document to open (equivalent to the Open command). See "The File Menu."
    178                 ShortCut.registerSystemCut("system:print", "reserved", KeyEvent.VK_P, KeyEvent.META_DOWN_MASK); // Display the Print dialog (equivalent to the Print command). See "The File Menu."
    179                 ShortCut.registerSystemCut("system:printsetup", "reserved", KeyEvent.VK_P, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display a dialog for specifying printing parameters (equivalent to the Page Setup command). See "The File Menu."
    180                 ShortCut.registerSystemCut("system:menuexit", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK).setAutomatic(); // Quit the application (equivalent to the Quit command). See "The Application Menu."
    181 
    182                 ShortCut.registerSystemCut("apple-reserved-43", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Log out the current user (equivalent to the Log Out command).
    183                 ShortCut.registerSystemCut("apple-reserved-44", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Log out the current user without confirmation.
    184 
    185                 ShortCut.registerSystemCut("system:save", "reserved", KeyEvent.VK_S, KeyEvent.META_DOWN_MASK); // Save the active document (equivalent to the Save command). See "The File Menu."
    186                 ShortCut.registerSystemCut("system:saveas", "reserved", KeyEvent.VK_S, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display the Save dialog (equivalent to the Save As command). See "The File Menu."
    187                 ShortCut.registerSystemCut("system:fonts", "reserved", KeyEvent.VK_T, KeyEvent.META_DOWN_MASK); // Display the Fonts window (equivalent to the Show Fonts command). See "The Format Menu."
    188                 ShortCut.registerSystemCut("system:toggletoolbar", "reserved", KeyEvent.VK_T, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Show or hide a toolbar (equivalent to the Show/Hide Toolbar command). See "The View Menu" and "Toolbars."
    189                 ShortCut.registerSystemCut("system:underline", "reserved", KeyEvent.VK_U, KeyEvent.META_DOWN_MASK); // Underline the selected text or turn underlining on or off (equivalent to the Underline command). See "The Format Menu."
    190                 ShortCut.registerSystemCut("system:paste", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK); // Insert the Clipboard contents at the insertion point (equivalent to the Paste command). See "The File Menu."
    191                 ShortCut.registerSystemCut("system:pastestyle", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Apply the style of one object to the selected object (equivalent to the Paste Style command). See "The Format Menu."
    192                 ShortCut.registerSystemCut("system:pastemwithoutstyle", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Apply the style of the surrounding text to the inserted object (equivalent to the Paste and Match Style command). See "The Edit Menu."
    193                 ShortCut.registerSystemCut("system:pasteformatting", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK); // Apply formatting settings to the selected object (equivalent to the Paste Ruler command). See "The Format Menu."
    194                 ShortCut.registerSystemCut("system:closewindow", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK); // Close the active window (equivalent to the Close command). See "The File Menu."
    195                 ShortCut.registerSystemCut("system:closefile", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Close a file and its associated windows (equivalent to the Close File command). See "The File Menu."
    196                 ShortCut.registerSystemCut("system:closeallwindows", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Close all windows in the application (equivalent to the Close All command). See "The File Menu."
    197                 ShortCut.registerSystemCut("system:cut", "reserved", KeyEvent.VK_X, KeyEvent.META_DOWN_MASK); // Remove the selection and store on the Clipboard (equivalent to the Cut command). See "The Edit Menu."
    198                 ShortCut.registerSystemCut("system:undo", "reserved", KeyEvent.VK_Z, KeyEvent.META_DOWN_MASK); // Reverse the effect of the user's previous operation (equivalent to the Undo command). See "The Edit Menu."
    199                 ShortCut.registerSystemCut("system:redo", "reserved", KeyEvent.VK_Z, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Reverse the effect of the last Undo command (equivalent to the Redo command). See "The Edit Menu."
    200 
    201                 ShortCut.registerSystemCut("apple-reserved-45", "reserved", KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK).setAutomatic(); // Change the keyboard layout to current layout of Roman script.
    202                 //ShortCut.registerSystemCut("apple-reserved-46", "reserved", KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the next semantic unit, typically the end of the current line.
    203                 //ShortCut.registerSystemCut("apple-reserved-47", "reserved", KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection one character to the right.
    204                 //ShortCut.registerSystemCut("apple-reserved-48", "reserved", KeyEvent.VK_RIGHT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the end of the current word, then to the end of the next word.
    205 
    206                 ShortCut.registerSystemCut("system:movefocusright", "reserved", KeyEvent.VK_RIGHT, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
    207 
    208                 ShortCut.registerSystemCut("apple-reserved-49", "reserved", KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK).setAutomatic(); // Change the keyboard layout to current layout of system script.
    209                 //ShortCut.registerSystemCut("apple-reserved-50", "reserved", KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the previous semantic unit, typically the beginning of the current line.
    210                 //ShortCut.registerSystemCut("apple-reserved-51", "reserved", KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection one character to the left.
    211                 //ShortCut.registerSystemCut("apple-reserved-52", "reserved", KeyEvent.VK_LEFT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the beginning of the current word, then to the beginning of the previous word.
    212 
    213                 ShortCut.registerSystemCut("system:movefocusleft", "reserved", KeyEvent.VK_LEFT, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
    214 
    215                 //ShortCut.registerSystemCut("apple-reserved-53", "reserved", KeyEvent.VK_UP, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection upward in the next semantic unit, typically the beginning of the document.
    216                 //ShortCut.registerSystemCut("apple-reserved-54", "reserved", KeyEvent.VK_UP, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the line above, to the nearest character boundary at the same horizontal location.
    217                 //ShortCut.registerSystemCut("apple-reserved-55", "reserved", KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph.
    218 
    219                 ShortCut.registerSystemCut("system:movefocusup", "reserved", KeyEvent.VK_UP, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
    220 
    221                 //ShortCut.registerSystemCut("apple-reserved-56", "reserved", KeyEvent.VK_DOWN, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection downward in the next semantic unit, typically the end of the document.
    222                 //ShortCut.registerSystemCut("apple-reserved-57", "reserved", KeyEvent.VK_DOWN, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the line below, to the nearest character boundary at the same horizontal location.
    223                 //ShortCut.registerSystemCut("apple-reserved-58", "reserved", KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the end of the current paragraph, then to the end of the next paragraph (include the blank line between paragraphs in cut, copy, and paste operations).
    224 
    225                 ShortCut.registerSystemCut("system:movefocusdown", "reserved", KeyEvent.VK_DOWN, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
    226 
    227                 ShortCut.registerSystemCut("system:about", "reserved", 0, -1).setAutomatic(); // About
    228         }
    229         public String makeTooltip(String name, ShortCut sc) {
     170                //Shortcut.registerSystemCut("system:italic", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK); // Italicize the selected text or toggle italic text on or off (equivalent to the Italic command). See "The Format Menu."
     171                Shortcut.registerSystemShortcut("system:info", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK); // Display an Info window. See "Inspector Windows."
     172                Shortcut.registerSystemShortcut("system:inspector", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Display an inspector window. See "Inspector Windows."
     173                Shortcut.registerSystemShortcut("system:toselection", "reserved", KeyEvent.VK_J, KeyEvent.META_DOWN_MASK); // Scroll to a selection.
     174                Shortcut.registerSystemShortcut("system:minimize", "reserved", KeyEvent.VK_M, KeyEvent.META_DOWN_MASK); // Minimize the active window to the Dock (equivalent to the Minimize command). See "The Window Menu."
     175                Shortcut.registerSystemShortcut("system:minimizeall", "reserved", KeyEvent.VK_M, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Minimize all windows of the active application to the Dock (equivalent to the Minimize All command). See "The Window Menu."
     176                Shortcut.registerSystemShortcut("system:new", "reserved", KeyEvent.VK_N, KeyEvent.META_DOWN_MASK); // Open a new document (equivalent to the New command). See "The File Menu."
     177                Shortcut.registerSystemShortcut("system:open", "reserved", KeyEvent.VK_O, KeyEvent.META_DOWN_MASK); // Display a dialog for choosing a document to open (equivalent to the Open command). See "The File Menu."
     178                Shortcut.registerSystemShortcut("system:print", "reserved", KeyEvent.VK_P, KeyEvent.META_DOWN_MASK); // Display the Print dialog (equivalent to the Print command). See "The File Menu."
     179                Shortcut.registerSystemShortcut("system:printsetup", "reserved", KeyEvent.VK_P, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display a dialog for specifying printing parameters (equivalent to the Page Setup command). See "The File Menu."
     180                Shortcut.registerSystemShortcut("system:menuexit", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK).setAutomatic(); // Quit the application (equivalent to the Quit command). See "The Application Menu."
     181
     182                Shortcut.registerSystemShortcut("apple-reserved-43", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Log out the current user (equivalent to the Log Out command).
     183                Shortcut.registerSystemShortcut("apple-reserved-44", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Log out the current user without confirmation.
     184
     185                Shortcut.registerSystemShortcut("system:save", "reserved", KeyEvent.VK_S, KeyEvent.META_DOWN_MASK); // Save the active document (equivalent to the Save command). See "The File Menu."
     186                Shortcut.registerSystemShortcut("system:saveas", "reserved", KeyEvent.VK_S, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display the Save dialog (equivalent to the Save As command). See "The File Menu."
     187                Shortcut.registerSystemShortcut("system:fonts", "reserved", KeyEvent.VK_T, KeyEvent.META_DOWN_MASK); // Display the Fonts window (equivalent to the Show Fonts command). See "The Format Menu."
     188                Shortcut.registerSystemShortcut("system:toggletoolbar", "reserved", KeyEvent.VK_T, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Show or hide a toolbar (equivalent to the Show/Hide Toolbar command). See "The View Menu" and "Toolbars."
     189                Shortcut.registerSystemShortcut("system:underline", "reserved", KeyEvent.VK_U, KeyEvent.META_DOWN_MASK); // Underline the selected text or turn underlining on or off (equivalent to the Underline command). See "The Format Menu."
     190                Shortcut.registerSystemShortcut("system:paste", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK); // Insert the Clipboard contents at the insertion point (equivalent to the Paste command). See "The File Menu."
     191                Shortcut.registerSystemShortcut("system:pastestyle", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Apply the style of one object to the selected object (equivalent to the Paste Style command). See "The Format Menu."
     192                Shortcut.registerSystemShortcut("system:pastemwithoutstyle", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Apply the style of the surrounding text to the inserted object (equivalent to the Paste and Match Style command). See "The Edit Menu."
     193                Shortcut.registerSystemShortcut("system:pasteformatting", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK); // Apply formatting settings to the selected object (equivalent to the Paste Ruler command). See "The Format Menu."
     194                Shortcut.registerSystemShortcut("system:closewindow", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK); // Close the active window (equivalent to the Close command). See "The File Menu."
     195                Shortcut.registerSystemShortcut("system:closefile", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Close a file and its associated windows (equivalent to the Close File command). See "The File Menu."
     196                Shortcut.registerSystemShortcut("system:closeallwindows", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Close all windows in the application (equivalent to the Close All command). See "The File Menu."
     197                Shortcut.registerSystemShortcut("system:cut", "reserved", KeyEvent.VK_X, KeyEvent.META_DOWN_MASK); // Remove the selection and store on the Clipboard (equivalent to the Cut command). See "The Edit Menu."
     198                Shortcut.registerSystemShortcut("system:undo", "reserved", KeyEvent.VK_Z, KeyEvent.META_DOWN_MASK); // Reverse the effect of the user's previous operation (equivalent to the Undo command). See "The Edit Menu."
     199                Shortcut.registerSystemShortcut("system:redo", "reserved", KeyEvent.VK_Z, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Reverse the effect of the last Undo command (equivalent to the Redo command). See "The Edit Menu."
     200
     201                Shortcut.registerSystemShortcut("apple-reserved-45", "reserved", KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK).setAutomatic(); // Change the keyboard layout to current layout of Roman script.
     202                //Shortcut.registerSystemCut("apple-reserved-46", "reserved", KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the next semantic unit, typically the end of the current line.
     203                //Shortcut.registerSystemCut("apple-reserved-47", "reserved", KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection one character to the right.
     204                //Shortcut.registerSystemCut("apple-reserved-48", "reserved", KeyEvent.VK_RIGHT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the end of the current word, then to the end of the next word.
     205
     206                Shortcut.registerSystemShortcut("system:movefocusright", "reserved", KeyEvent.VK_RIGHT, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     207
     208                Shortcut.registerSystemShortcut("apple-reserved-49", "reserved", KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK).setAutomatic(); // Change the keyboard layout to current layout of system script.
     209                //Shortcut.registerSystemCut("apple-reserved-50", "reserved", KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the previous semantic unit, typically the beginning of the current line.
     210                //Shortcut.registerSystemCut("apple-reserved-51", "reserved", KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection one character to the left.
     211                //Shortcut.registerSystemCut("apple-reserved-52", "reserved", KeyEvent.VK_LEFT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the beginning of the current word, then to the beginning of the previous word.
     212
     213                Shortcut.registerSystemShortcut("system:movefocusleft", "reserved", KeyEvent.VK_LEFT, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     214
     215                //Shortcut.registerSystemCut("apple-reserved-53", "reserved", KeyEvent.VK_UP, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection upward in the next semantic unit, typically the beginning of the document.
     216                //Shortcut.registerSystemCut("apple-reserved-54", "reserved", KeyEvent.VK_UP, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the line above, to the nearest character boundary at the same horizontal location.
     217                //Shortcut.registerSystemCut("apple-reserved-55", "reserved", KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph.
     218
     219                Shortcut.registerSystemShortcut("system:movefocusup", "reserved", KeyEvent.VK_UP, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     220
     221                //Shortcut.registerSystemCut("apple-reserved-56", "reserved", KeyEvent.VK_DOWN, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection downward in the next semantic unit, typically the end of the document.
     222                //Shortcut.registerSystemCut("apple-reserved-57", "reserved", KeyEvent.VK_DOWN, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the line below, to the nearest character boundary at the same horizontal location.
     223                //Shortcut.registerSystemCut("apple-reserved-58", "reserved", KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the end of the current paragraph, then to the end of the next paragraph (include the blank line between paragraphs in cut, copy, and paste operations).
     224
     225                Shortcut.registerSystemShortcut("system:movefocusdown", "reserved", KeyEvent.VK_DOWN, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     226
     227                Shortcut.registerSystemShortcut("system:about", "reserved", 0, -1).setAutomatic(); // About
     228        }
     229        public String makeTooltip(String name, Shortcut sc) {
    230230                String lafid = UIManager.getLookAndFeel().getID();
    231231                boolean canHtml = true;
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r1047 r1084  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    5 import org.openstreetmap.josm.tools.ShortCut;
     5import org.openstreetmap.josm.tools.Shortcut;
    66import org.openstreetmap.josm.Main;
    77
     
    2929                }
    3030        }
    31         public void initShortCutGroups() {
     31        public void initShortcutGroups() {
    3232                // This is the Windows list. Someone should look over it and make it more "*nix"...
    33                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_NONE),    Integer.toString(-1));
    34                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY),  Integer.toString(KeyEvent.CTRL_DOWN_MASK));
    35                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MENU),    Integer.toString(KeyEvent.CTRL_DOWN_MASK));
    36                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT),    Integer.toString(0));
    37                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    38                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_DIRECT),  Integer.toString(0));
    39                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));
     33                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_NONE),    Integer.toString(-1));
     34                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY),  Integer.toString(KeyEvent.CTRL_DOWN_MASK));
     35                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU),    Integer.toString(KeyEvent.CTRL_DOWN_MASK));
     36                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT),    Integer.toString(0));
     37                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     38                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_DIRECT),  Integer.toString(0));
     39                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));
    4040
    41                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_NONE),       Integer.toString(-1));
    42                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
    43                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_MENU),       Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
    44                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_EDIT),       Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
    45                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
    46                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT),     Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
    47                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     41                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_NONE),       Integer.toString(-1));
     42                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
     43                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU),       Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
     44                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT),       Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
     45                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
     46                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT),     Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
     47                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    4848
    49                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_NONE),       Integer.toString(-1));
    50                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
    51                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_MENU),       Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
    52                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_EDIT),       Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
    53                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK));
    54                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_DIRECT),     Integer.toString(KeyEvent.CTRL_DOWN_MASK));
    55                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     49                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_NONE),       Integer.toString(-1));
     50                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
     51                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU),       Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
     52                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_EDIT),       Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
     53                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK));
     54                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_DIRECT),     Integer.toString(KeyEvent.CTRL_DOWN_MASK));
     55                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    5656        }
    57         public void initSystemShortCuts() {
     57        public void initSystemShortcuts() {
    5858                // TODO: Insert system shortcuts here. See Windows and espacially OSX to see how to.
    5959        }
     
    6363          * this is implemented here...
    6464          */
    65         public String makeTooltip(String name, ShortCut sc) {
     65        public String makeTooltip(String name, Shortcut sc) {
    6666                String result = "";
    6767                result += "<html>";
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r1047 r1084  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    5 import org.openstreetmap.josm.tools.ShortCut;
     5import org.openstreetmap.josm.tools.Shortcut;
    66import org.openstreetmap.josm.tools.PlatformHookUnixoid;
    77import org.openstreetmap.josm.Main;
     
    2121                Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
    2222        }
    23         public void initShortCutGroups() {
    24                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_NONE),    Integer.toString(-1));
    25                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY),  Integer.toString(KeyEvent.CTRL_DOWN_MASK));
    26                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MENU),    Integer.toString(KeyEvent.CTRL_DOWN_MASK));
    27                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT),    Integer.toString(0));
    28                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    29                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_DIRECT),  Integer.toString(0));
    30                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_DEFAULT+ShortCut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));
     23        public void initShortcutGroups() {
     24                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_NONE),    Integer.toString(-1));
     25                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY),  Integer.toString(KeyEvent.CTRL_DOWN_MASK));
     26                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU),    Integer.toString(KeyEvent.CTRL_DOWN_MASK));
     27                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT),    Integer.toString(0));
     28                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     29                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_DIRECT),  Integer.toString(0));
     30                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));
    3131
    32                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_NONE),       Integer.toString(-1));
    33                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
    34                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_MENU),       Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
    35                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_EDIT),       Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
    36                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
    37                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT),     Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
    38                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT1+ShortCut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     32                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_NONE),       Integer.toString(-1));
     33                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
     34                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU),       Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
     35                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT),       Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
     36                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
     37                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT),     Integer.toString(KeyEvent.SHIFT_DOWN_MASK));
     38                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    3939
    40                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_NONE),       Integer.toString(-1));
    41                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
    42                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_MENU),       Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
    43                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_EDIT),       Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
    44                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK));
    45                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_DIRECT),     Integer.toString(KeyEvent.CTRL_DOWN_MASK));
    46                 Main.pref.put("shortcut.groups."+(ShortCut.GROUPS_ALT2+ShortCut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
     40                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_NONE),       Integer.toString(-1));
     41                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_HOTKEY),     Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
     42                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU),       Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));
     43                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_EDIT),       Integer.toString(KeyEvent.ALT_DOWN_MASK  | KeyEvent.SHIFT_DOWN_MASK));
     44                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_LAYER),      Integer.toString(KeyEvent.ALT_DOWN_MASK));
     45                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_DIRECT),     Integer.toString(KeyEvent.CTRL_DOWN_MASK));
     46                Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    4747        }
    48         public void initSystemShortCuts() {
     48        public void initSystemShortcuts() {
    4949                // This list if far from complete!
    50                 ShortCut.registerSystemCut("system:exit", "unused", KeyEvent.VK_F4, KeyEvent.ALT_DOWN_MASK).setAutomatic(); // items with automatic shortcuts will not be added to the menu bar at all
    51                 ShortCut.registerSystemCut("system:menuexit", "unused", KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK);
    52                 ShortCut.registerSystemCut("system:copy", "unused", KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK);
    53                 ShortCut.registerSystemCut("system:paste", "unused", KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK);
    54                 ShortCut.registerSystemCut("system:cut", "unused", KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK);
    55                 ShortCut.registerSystemCut("system:duplicate", "unused", KeyEvent.VK_D, KeyEvent.CTRL_DOWN_MASK); // not really system, but to avoid odd results
    56                 ShortCut.registerSystemCut("system:help", "unused", KeyEvent.VK_F1, 0);
     50                Shortcut.registerSystemShortcut("system:exit", "unused", KeyEvent.VK_F4, KeyEvent.ALT_DOWN_MASK).setAutomatic(); // items with automatic shortcuts will not be added to the menu bar at all
     51                Shortcut.registerSystemShortcut("system:menuexit", "unused", KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK);
     52                Shortcut.registerSystemShortcut("system:copy", "unused", KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK);
     53                Shortcut.registerSystemShortcut("system:paste", "unused", KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK);
     54                Shortcut.registerSystemShortcut("system:cut", "unused", KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK);
     55                Shortcut.registerSystemShortcut("system:duplicate", "unused", KeyEvent.VK_D, KeyEvent.CTRL_DOWN_MASK); // not really system, but to avoid odd results
     56                Shortcut.registerSystemShortcut("system:help", "unused", KeyEvent.VK_F1, 0);
    5757        }
    5858}
Note: See TracChangeset for help on using the changeset viewer.