Index: /trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 4974)
+++ /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 4975)
@@ -357,5 +357,5 @@
     public JMenu addMenu(JMenu menu, String name, int mnemonicKey, int position, String relativeHelpTopic) {
         Shortcut.registerShortcut("menu:" + name, tr("Menu: {0}", tr(name)), mnemonicKey,
-                Shortcut.GROUP_MNEMONIC).setMnemonic(menu);
+                Shortcut.MNEMONIC).setMnemonic(menu);
         add(menu, position);
         menu.putClientProperty("help", relativeHelpTopic);
Index: /trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 4974)
+++ /trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 4975)
@@ -156,9 +156,4 @@
     }
 
-    private boolean isSame(int isKey, int isModifier) {
-        // -1 --- an unassigned shortcut is different from any other shortcut
-        return( isKey == assignedKey && isModifier == assignedModifier && assignedModifier != getGroupModifier(NONE));
-    }
-
     // create a shortcut object from an string as saved in the preferences
     private Shortcut(String prefString) {
@@ -191,6 +186,12 @@
     }
 
-    private boolean isSame(Shortcut other) {
-        return assignedKey == other.assignedKey && assignedModifier == other.assignedModifier;
+    private boolean isSame(int isKey, int isModifier) {
+        // an unassigned shortcut is different from any other shortcut
+        return isKey == assignedKey && isModifier == assignedModifier && assignedModifier != getGroupModifier(NONE);
+    }
+
+    public boolean isEvent(KeyEvent e) {
+        return getKeyStroke() != null && getKeyStroke().equals(
+        KeyStroke.getKeyStroke(e.getKeyCode(), e.getModifiers()));
     }
 
@@ -199,5 +200,5 @@
      */
     public void setMnemonic(JMenu menu) {
-        if (requestedGroup == GROUP_MNEMONIC && assignedModifier == getGroupModifier(requestedGroup + GROUPS_DEFAULT) && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
+        if (assignedModifier == getGroupModifier(MNEMONIC) && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
             menu.setMnemonic(KeyEvent.getKeyText(assignedKey).charAt(0)); //getKeyStroke().getKeyChar() seems not to work here
         }
@@ -207,5 +208,5 @@
      */
     public void setMnemonic(AbstractButton button) {
-        if (requestedGroup == GROUP_MNEMONIC && assignedModifier == getGroupModifier(requestedGroup + GROUPS_DEFAULT) && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
+        if (assignedModifier == getGroupModifier(MNEMONIC)  && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
             button.setMnemonic(KeyEvent.getKeyText(assignedKey).charAt(0)); //getKeyStroke().getKeyChar() seems not to work here
         }
@@ -248,5 +249,5 @@
     // check if something collides with an existing shortcut
     private static Shortcut findShortcut(int requestedKey, int modifier) {
-        if (modifier == getGroupModifier(GROUP_NONE))
+        if (modifier == getGroupModifier(NONE))
             return null;
         for (Shortcut sc : shortcuts.values()) {
@@ -282,4 +283,10 @@
     public static final int CTRL_SHIFT = 5009;
     public static final int ALT_CTRL_SHIFT = 5010;
+
+    /* for reassignment */
+    private static int[] mods = {ALT_CTRL, ALT_SHIFT, CTRL_SHIFT, ALT_CTRL_SHIFT};
+    private static int[] keys = {KeyEvent.VK_F1, KeyEvent.VK_F2, KeyEvent.VK_F3, KeyEvent.VK_F4,
+                                 KeyEvent.VK_F5, KeyEvent.VK_F6, KeyEvent.VK_F7, KeyEvent.VK_F8,
+                                 KeyEvent.VK_F9, KeyEvent.VK_F10, KeyEvent.VK_F11, KeyEvent.VK_F12};
 
     /* old */
@@ -297,4 +304,7 @@
     @Deprecated public static final int GROUPS_ALT2 = 200;
     @Deprecated public static final int SHIFT_DEFAULT = 1;
+    @Deprecated public static Shortcut registerShortcut(String shortText, String longText, int requestedKey, int requestedGroup, int modifier) {
+        return registerShortcut(shortText, longText, requestedKey, requestedGroup, modifier);
+    }
 
     // bootstrap
@@ -348,23 +358,27 @@
         Main.platform.initSystemShortcuts();
         // (2) User defined shortcuts
-        LinkedList<Shortcut> shortcuts = new LinkedList<Shortcut>();
+        LinkedList<Shortcut> newshortcuts = new LinkedList<Shortcut>();
         for(String s : Main.pref.getAllPrefixCollectionKeys("shortcut.entry.")) {
-            shortcuts.add(new Shortcut(s));
-        }
-        for(Shortcut sc : shortcuts) {
-            if (sc.getAssignedUser()) {
-                registerShortcut(sc);
+            newshortcuts.add(new Shortcut(s));
+        }
+
+        for(Shortcut sc : newshortcuts) {
+            if (sc.getAssignedUser()
+            && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
+                shortcuts.put(sc.getShortText(), sc);
             }
         }
         // Shortcuts at their default values
-        for(Shortcut sc : shortcuts) {
-            if (!sc.getAssignedUser() && sc.getAssignedDefault()) {
-                registerShortcut(sc);
+        for(Shortcut sc : newshortcuts) {
+            if (!sc.getAssignedUser() && sc.getAssignedDefault()
+            && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
+                shortcuts.put(sc.getShortText(), sc);
             }
         }
         // Shortcuts that were automatically moved
-        for(Shortcut sc : shortcuts) {
-            if (!sc.getAssignedUser() && !sc.getAssignedDefault()) {
-                registerShortcut(sc);
+        for(Shortcut sc : newshortcuts) {
+            if (!sc.getAssignedUser() && !sc.getAssignedDefault()
+            && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
+                shortcuts.put(sc.getShortText(), sc);
             }
         }
@@ -378,4 +392,19 @@
     }
 
+    private static int findModifier(int group, Integer modifier) {
+        Integer defaultModifier = getGroupModifier(group);
+        if(modifier != null) {
+            if(modifier == SHIFT_DEFAULT) {
+                defaultModifier |= KeyEvent.SHIFT_DOWN_MASK;
+            } else {
+                defaultModifier = modifier;
+            }
+        }
+        else if (defaultModifier == null) { // garbage in, no shortcut out
+            defaultModifier = getGroupModifier(NONE);
+        }
+        return defaultModifier;
+    }
+
     // shutdown handling
     public static boolean savePrefs() {
@@ -385,16 +414,4 @@
         }
         return changed;
-    }
-
-    // this is used to register a shortcut that was read from the preferences
-    private static void registerShortcut(Shortcut sc) {
-        // put a user configured shortcut in as-is -- unless there's a conflict
-        if(sc.getAssignedUser() && findShortcut(sc.getAssignedKey(),
-                sc.getAssignedModifier()) == null) {
-            shortcuts.put(sc.getShortText(), sc);
-        } else {
-            registerShortcut(sc.getShortText(), sc.getLongText(), sc.getRequestedKey(),
-                    sc.getRequestedGroup(), sc.getAssignedModifier(), sc);
-        }
     }
 
@@ -431,59 +448,12 @@
      * @param requestedKey the key you'd prefer. Use a {@link KeyEvent KeyEvent.VK_*} constant here.
      * @param requestedGroup the group this shortcut fits best. This will determine the
-     * modifiers your shortcut will get assigned. Use the {@code GROUP_*}
-     * constants defined above.
-     * @param modifier to register a {@code ctrl+shift} command, use {@see #SHIFT_DEFAULT}.
-     */
-    @Deprecated
-    public static Shortcut registerShortcut(String shortText, String longText, int requestedKey, int requestedGroup, int modifier) {
-        return registerShortcut(shortText, longText, requestedKey, requestedGroup, modifier, null);
-    }
-
-    /**
-     * Register a shortcut.
-     *
-     * Here you get your shortcuts from. The parameters are:
-     *
-     * @param shortText an ID. re-use a {@code "system:*"} ID if possible, else use something unique.
-     * {@code "menu:*"} is reserved for menu mnemonics, {@code "core:*"} is reserved for
-     * actions that are part of JOSM's core. Use something like
-     * {@code <pluginname>+":"+<actionname>}.
-     * @param longText this will be displayed in the shortcut preferences dialog. Better
-     * use something the user will recognize...
-     * @param requestedKey the key you'd prefer. Use a {@link KeyEvent KeyEvent.VK_*} constant here.
-     * @param requestedGroup the group this shortcut fits best. This will determine the
-     * modifiers your shortcut will get assigned. Use the {@code GROUP_*}
-     * constants defined above.
+     * modifiers your shortcut will get assigned. Use the constants defined above.
      */
     public static Shortcut registerShortcut(String shortText, String longText, int requestedKey, int requestedGroup) {
-        return registerShortcut(shortText, longText, requestedKey, requestedGroup, null, null);
-    }
-
-    private static int findModifier(int group, Integer modifier) {
-        Integer defaultModifier = getGroupModifier(group);
-        if(modifier != null) {
-            if(modifier == SHIFT_DEFAULT) {
-                defaultModifier |= KeyEvent.SHIFT_DOWN_MASK;
-            } else {
-                defaultModifier = modifier;
-            }
-        }
-        else if (defaultModifier == null) { // garbage in, no shortcut out
-            defaultModifier = getGroupModifier(NONE);
-        }
-        return defaultModifier;
-    }
-
-    private static int[] mods = {ALT_CTRL, ALT_SHIFT, CTRL_SHIFT, ALT_CTRL_SHIFT};
-    private static int[] keys = {KeyEvent.VK_F1, KeyEvent.VK_F2, KeyEvent.VK_F3, KeyEvent.VK_F4,
-                                 KeyEvent.VK_F5, KeyEvent.VK_F6, KeyEvent.VK_F7, KeyEvent.VK_F8,
-                                 KeyEvent.VK_F9, KeyEvent.VK_F10, KeyEvent.VK_F11, KeyEvent.VK_F12};
-    // and now the workhorse. same parameters as above, just one more: if originalShortcut is not null and
-    // is different from the shortcut that will be assigned, a popup warning will be displayed to the user.
-    // This is used when registering shortcuts that have been visible to the user before (read: have been
-    // read from the preferences file). New shortcuts will never warn, even when they land on some funny
-    // random fallback key like Ctrl+Alt+Shift+Z for "File Open..." <g>
-    private static Shortcut registerShortcut(String shortText, String longText, int requestedKey, int requestedGroup, Integer modifier,
-            Shortcut originalShortcut) {
+        return registerShortcut(shortText, longText, requestedKey, requestedGroup);
+    }
+
+    // and now the workhorse. same parameters as above, just one more
+    private static Shortcut registerShortcut(String shortText, String longText, int requestedKey, int requestedGroup, Integer modifier) {
         doInit();
         Integer defaultModifier = findModifier(requestedGroup, modifier);
@@ -557,8 +527,3 @@
         return sc.getKeyStroke();
     }
-
-    public boolean isEvent(KeyEvent e) {
-        return getKeyStroke() != null && getKeyStroke().equals(
-        KeyStroke.getKeyStroke(e.getKeyCode(), e.getModifiers()));
-    }
 }
