Index: trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 4618)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 4619)
@@ -20,4 +20,5 @@
 import javax.swing.Action;
 import javax.swing.BorderFactory;
+import javax.swing.JComponent;
 import javax.swing.JDialog;
 import javax.swing.JLabel;
@@ -27,4 +28,5 @@
 import javax.swing.JScrollPane;
 import javax.swing.JSplitPane;
+import javax.swing.KeyStroke;
 import javax.swing.ListSelectionModel;
 import javax.swing.event.ListSelectionEvent;
@@ -262,4 +264,7 @@
             putValue(Action.NAME, tr("Cancel"));
             putValue(Action.SMALL_ICON, ImageProvider.get("", "cancel"));
+            getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) 
+            .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); 
+            getRootPane().getActionMap().put("ESCAPE", this);
             setEnabled(true);
         }
