Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 3469)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 3470)
@@ -24,5 +24,7 @@
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
+import javax.swing.ComponentInputMap;
 import javax.swing.ImageIcon;
+import javax.swing.InputMap;
 import javax.swing.JButton;
 import javax.swing.JComponent;
@@ -31,4 +33,5 @@
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
+import javax.swing.KeyStroke;
 
 import org.openstreetmap.josm.Main;
@@ -46,4 +49,56 @@
  */
 public class ToggleDialog extends JPanel implements Helpful {
+
+    // It's not possible to simply set component input map parent to be Main.contentPane.getInputMap because
+    // there is check in setParent that InputMap is for the same component
+    // Yes, this is a hack
+    // Another possibility would be simply copy InputMap, but that would require to keep copies synchronized when some shortcut is
+    // later
+    private static class RedirectInputMap extends ComponentInputMap {
+
+        private final InputMap target;
+
+        public RedirectInputMap(JComponent component, InputMap target) {
+            super(component);
+            this.target = target;
+        }
+
+        @Override
+        public Object get(KeyStroke keyStroke) {
+            return target.get(keyStroke);
+        }
+
+        @Override
+        public KeyStroke[] keys() {
+            return target.keys();
+        }
+
+        @Override
+        public int size() {
+            return target.size();
+        }
+
+        @Override
+        public KeyStroke[] allKeys() {
+            return target.allKeys();
+        }
+
+        @Override
+        public void put(KeyStroke keyStroke, Object actionMapKey) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void remove(KeyStroke key) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void clear() {
+            throw new UnsupportedOperationException();
+        }
+
+    }
+
     /** The action to toggle this dialog */
     protected ToggleDialogAction toggleAction;
@@ -97,4 +152,5 @@
      * @param defShow if the dialog should be shown by default, if there is no preference
      */
+    @SuppressWarnings("deprecation")
     public ToggleDialog(String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight, boolean defShow) {
         super(new BorderLayout());
@@ -123,4 +179,11 @@
         isDocked = Main.pref.getBoolean(preferencePrefix+".docked", true);
         isCollapsed = Main.pref.getBoolean(preferencePrefix+".minimized", false);
+
+        InputMap lastParent = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+        while (lastParent.getParent() != null) {
+            lastParent = lastParent.getParent();
+        }
+        lastParent.setParent(new RedirectInputMap(this, Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)));
+        getActionMap().setParent(Main.contentPane.getActionMap());
     }
 
