Index: /applications/editors/josm/plugins/CommandLine/src/CommandLine/LengthAction.java
===================================================================
--- /applications/editors/josm/plugins/CommandLine/src/CommandLine/LengthAction.java	(revision 29594)
+++ /applications/editors/josm/plugins/CommandLine/src/CommandLine/LengthAction.java	(revision 29595)
@@ -38,211 +38,215 @@
 
 public class LengthAction extends MapMode implements MapViewPaintable, AWTEventListener {
-	private CommandLine parentPlugin;
-	final private Cursor cursorCrosshair;
-	final private Cursor cursorJoinNode;
-	private Cursor currentCursor;
-	private Color selectedColor;
-	private Point drawStartPos;
-	private Point drawEndPos;
-	private LatLon startCoor;
-	private LatLon endCoor;
-	private Point mousePos;
-	private Node nearestNode;
-	private boolean drawing;
-
-	public LengthAction(MapFrame mapFrame, CommandLine parentPlugin) {
-		super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("crosshair", null));
-		this.parentPlugin = parentPlugin;
-		selectedColor = Main.pref.getColor(marktr("selected"), Color.red);
-		cursorCrosshair = ImageProvider.getCursor("crosshair", null);
-		cursorJoinNode = ImageProvider.getCursor("crosshair", "joinnode");
-		currentCursor = cursorCrosshair;
-		nearestNode = null;
-	}
-
-	@Override
-	public void enterMode() {
-		super.enterMode();
-		Main.map.mapView.addMouseListener(this);
-		Main.map.mapView.addMouseMotionListener(this);
-		Main.map.mapView.addTemporaryLayer(this);
-		try {
-			Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.KEY_EVENT_MASK);
-		} catch (SecurityException ex) {
-		}
-	}
-
-	@Override
-	public void exitMode() {
-		super.exitMode();
-		Main.map.mapView.removeMouseListener(this);
-		Main.map.mapView.removeMouseMotionListener(this);
-		Main.map.mapView.removeTemporaryLayer(this);
-		try {
-			Toolkit.getDefaultToolkit().removeAWTEventListener(this);
-		} catch (SecurityException ex) {
-		}
-		if (drawing)
-			Main.map.mapView.repaint();
-	}
-
-	public void cancelDrawing() {
-		if (Main.map == null || Main.map.mapView == null)
-			return;
-		Main.map.statusLine.setHeading(-1);
-		Main.map.statusLine.setAngle(-1);
-		updateStatusLine();
-		parentPlugin.abortInput();
-	}
-
-	public void eventDispatched(AWTEvent arg0) {
-		if (!(arg0 instanceof KeyEvent))
-			return;
-		KeyEvent ev = (KeyEvent) arg0;
-		if (ev.getKeyCode() == KeyEvent.VK_ESCAPE && ev.getID() == KeyEvent.KEY_PRESSED) {
-			if (drawing)
-				ev.consume();
-			cancelDrawing();
-		}
-	}
-
-	private void processMouseEvent(MouseEvent e) {
-		if (e != null) {
-			mousePos = e.getPoint();
-		}
-	}
-
-	public void paint(Graphics2D g, MapView mv, Bounds bbox) {
-		if (!drawing)
-			return;
-
-		g.setColor(selectedColor);
-		g.setStroke(new BasicStroke(3, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
-
-		GeneralPath b = new GeneralPath();
-		Point pp1 = drawStartPos;
-		Point pp2 = drawEndPos;
-
-		b.moveTo(pp1.x, pp1.y);
-		b.lineTo(pp2.x, pp2.y);
-		g.draw(b);
-
-		g.setStroke(new BasicStroke(1));
-	}
-
-	private void drawingStart(MouseEvent e) {
-		mousePos = e.getPoint();
-		if (nearestNode != null) {
-			drawStartPos = Main.map.mapView.getPoint(nearestNode.getCoor());
-		} else {
-			drawStartPos = mousePos;
-		}
-		drawEndPos = drawStartPos;
-		startCoor = Main.map.mapView.getLatLon(drawStartPos.x, drawStartPos.y);
-		endCoor = startCoor;
-		drawing = true;
-		updateStatusLine();
-	}
-
-	private void drawingFinish() {
-		parentPlugin.loadParameter(String.valueOf(startCoor.greatCircleDistance(endCoor)), true);
-		drawStartPos = null;
-		drawing = false;
-		exitMode();
-	}
-
-	@Override
-	public void mousePressed(MouseEvent e) {
-		if (e.getButton() == MouseEvent.BUTTON1) {
-		  if (!Main.map.mapView.isActiveLayerDrawable())
-			return;
-		  drawingStart(e);
-		}
-		else
-		  drawing = false;
-	}
-
-	@Override
-	public void mouseReleased(MouseEvent e) {
-	  if (e.getButton() != MouseEvent.BUTTON1)
-		  return;
-	  if (!Main.map.mapView.isActiveLayerDrawable())
-		  return;
-	  boolean dragged = true;
-	  if (drawStartPos != null)
-		  dragged = drawEndPos.distance(drawStartPos) > 10;
-	  if (drawing && dragged)
-		drawingFinish();
-	  drawing = false;
-	}
-
-	@Override
-	public void mouseDragged(MouseEvent e) {
-		processMouseEvent(e);
-		updCursor();
-		if (nearestNode != null)
-			drawEndPos = Main.map.mapView.getPoint(nearestNode.getCoor());
-		else
-			drawEndPos = mousePos;
-		endCoor = Main.map.mapView.getLatLon(drawEndPos.x, drawEndPos.y);
-    if (drawing) {
-      Main.map.statusLine.setDist(startCoor.greatCircleDistance(endCoor));
-			Main.map.mapView.repaint();
-    }
-	}
-
-	@Override
-	public void mouseMoved(MouseEvent e) {
-		if (!Main.map.mapView.isActiveLayerDrawable())
-			return;
-		processMouseEvent(e);
-		updCursor();
-		if (drawing)
-			Main.map.mapView.repaint();
-	}
-
-	@Override
-	public String getModeHelpText() {
-		if (drawing)
-			return tr("Point on the start");
-		else
-			return tr("Point on the end");
-	}
-
-	@Override
-	public boolean layerIsSupported(Layer l) {
-		return l instanceof OsmDataLayer;
-	}
-
-	private void updCursor() {
-		if (mousePos != null) {
-			if (!Main.isDisplayingMapView())
-				return;
-			nearestNode = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive.isUsablePredicate);
-			if (nearestNode != null) {
-				setCursor(cursorJoinNode);
-			}
-			else {
-				setCursor(cursorCrosshair);
-			}
-		}
-	}
-
-	private void setCursor(final Cursor c) {
-		if (currentCursor.equals(c))
-			return;
-		try {
-			// We invoke this to prevent strange things from happening
-			EventQueue.invokeLater(new Runnable() {
-				public void run() {
-					// Don't change cursor when mode has changed already
-					if (!(Main.map.mapMode instanceof LengthAction))
-						return;
-					Main.map.mapView.setCursor(c);
-				}
-			});
-			currentCursor = c;
-		} catch (Exception e) {
-		}
-	}
+    private final CommandLine parentPlugin;
+    final private Cursor cursorCrosshair;
+    final private Cursor cursorJoinNode;
+    private Cursor currentCursor;
+    private final Color selectedColor;
+    private Point drawStartPos;
+    private Point drawEndPos;
+    private LatLon startCoor;
+    private LatLon endCoor;
+    private Point mousePos;
+    private Node nearestNode;
+    private boolean drawing;
+
+    public LengthAction(MapFrame mapFrame, CommandLine parentPlugin) {
+        super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("crosshair", null));
+        this.parentPlugin = parentPlugin;
+        selectedColor = Main.pref.getColor(marktr("selected"), Color.red);
+        cursorCrosshair = ImageProvider.getCursor("crosshair", null);
+        cursorJoinNode = ImageProvider.getCursor("crosshair", "joinnode");
+        currentCursor = cursorCrosshair;
+        nearestNode = null;
+    }
+
+    @Override
+    public void enterMode() {
+        super.enterMode();
+        Main.map.mapView.addMouseListener(this);
+        Main.map.mapView.addMouseMotionListener(this);
+        Main.map.mapView.addTemporaryLayer(this);
+        try {
+            Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.KEY_EVENT_MASK);
+        } catch (SecurityException ex) {
+        }
+    }
+
+    @Override
+    public void exitMode() {
+        super.exitMode();
+        Main.map.mapView.removeMouseListener(this);
+        Main.map.mapView.removeMouseMotionListener(this);
+        Main.map.mapView.removeTemporaryLayer(this);
+        try {
+            Toolkit.getDefaultToolkit().removeAWTEventListener(this);
+        } catch (SecurityException ex) {
+        }
+        if (drawing)
+            Main.map.mapView.repaint();
+    }
+
+    public void cancelDrawing() {
+        if (Main.map == null || Main.map.mapView == null)
+            return;
+        Main.map.statusLine.setHeading(-1);
+        Main.map.statusLine.setAngle(-1);
+        updateStatusLine();
+        parentPlugin.abortInput();
+    }
+
+    @Override
+    public void eventDispatched(AWTEvent arg0) {
+        if (!(arg0 instanceof KeyEvent))
+            return;
+        KeyEvent ev = (KeyEvent) arg0;
+        if (ev.getKeyCode() == KeyEvent.VK_ESCAPE && ev.getID() == KeyEvent.KEY_PRESSED) {
+            if (drawing)
+                ev.consume();
+            cancelDrawing();
+        }
+    }
+
+    private void processMouseEvent(MouseEvent e) {
+        if (e != null) {
+            mousePos = e.getPoint();
+        }
+    }
+
+    @Override
+    public void paint(Graphics2D g, MapView mv, Bounds bbox) {
+        if (!drawing)
+            return;
+
+        g.setColor(selectedColor);
+        g.setStroke(new BasicStroke(3, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
+
+        GeneralPath b = new GeneralPath();
+        Point pp1 = drawStartPos;
+        Point pp2 = drawEndPos;
+
+        b.moveTo(pp1.x, pp1.y);
+        b.lineTo(pp2.x, pp2.y);
+        g.draw(b);
+
+        g.setStroke(new BasicStroke(1));
+    }
+
+    private void drawingStart(MouseEvent e) {
+        mousePos = e.getPoint();
+        if (nearestNode != null) {
+            drawStartPos = Main.map.mapView.getPoint(nearestNode.getCoor());
+        } else {
+            drawStartPos = mousePos;
+        }
+        drawEndPos = drawStartPos;
+        startCoor = Main.map.mapView.getLatLon(drawStartPos.x, drawStartPos.y);
+        endCoor = startCoor;
+        drawing = true;
+        updateStatusLine();
+    }
+
+    private void drawingFinish() {
+        parentPlugin.loadParameter(String.valueOf(startCoor.greatCircleDistance(endCoor)), true);
+        drawStartPos = null;
+        drawing = false;
+        exitMode();
+    }
+
+    @Override
+    public void mousePressed(MouseEvent e) {
+        if (e.getButton() == MouseEvent.BUTTON1) {
+            if (!Main.map.mapView.isActiveLayerDrawable())
+                return;
+            requestFocusInMapView();
+            drawingStart(e);
+        }
+        else
+            drawing = false;
+    }
+
+    @Override
+    public void mouseReleased(MouseEvent e) {
+        if (e.getButton() != MouseEvent.BUTTON1)
+            return;
+        if (!Main.map.mapView.isActiveLayerDrawable())
+            return;
+        boolean dragged = true;
+        if (drawStartPos != null)
+            dragged = drawEndPos.distance(drawStartPos) > 10;
+            if (drawing && dragged)
+                drawingFinish();
+            drawing = false;
+    }
+
+    @Override
+    public void mouseDragged(MouseEvent e) {
+        processMouseEvent(e);
+        updCursor();
+        if (nearestNode != null)
+            drawEndPos = Main.map.mapView.getPoint(nearestNode.getCoor());
+        else
+            drawEndPos = mousePos;
+        endCoor = Main.map.mapView.getLatLon(drawEndPos.x, drawEndPos.y);
+        if (drawing) {
+            Main.map.statusLine.setDist(startCoor.greatCircleDistance(endCoor));
+            Main.map.mapView.repaint();
+        }
+    }
+
+    @Override
+    public void mouseMoved(MouseEvent e) {
+        if (!Main.map.mapView.isActiveLayerDrawable())
+            return;
+        processMouseEvent(e);
+        updCursor();
+        if (drawing)
+            Main.map.mapView.repaint();
+    }
+
+    @Override
+    public String getModeHelpText() {
+        if (drawing)
+            return tr("Point on the start");
+        else
+            return tr("Point on the end");
+    }
+
+    @Override
+    public boolean layerIsSupported(Layer l) {
+        return l instanceof OsmDataLayer;
+    }
+
+    private void updCursor() {
+        if (mousePos != null) {
+            if (!Main.isDisplayingMapView())
+                return;
+            nearestNode = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive.isUsablePredicate);
+            if (nearestNode != null) {
+                setCursor(cursorJoinNode);
+            }
+            else {
+                setCursor(cursorCrosshair);
+            }
+        }
+    }
+
+    private void setCursor(final Cursor c) {
+        if (currentCursor.equals(c))
+            return;
+        try {
+            // We invoke this to prevent strange things from happening
+            EventQueue.invokeLater(new Runnable() {
+                @Override
+                public void run() {
+                    // Don't change cursor when mode has changed already
+                    if (!(Main.map.mapMode instanceof LengthAction))
+                        return;
+                    Main.map.mapView.setCursor(c);
+                }
+            });
+            currentCursor = c;
+        } catch (Exception e) {
+        }
+    }
 }
Index: /applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java
===================================================================
--- /applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 29594)
+++ /applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 29595)
@@ -285,4 +285,6 @@
         if (!isEnabled()) return;
         if (e.getButton() != MouseEvent.BUTTON1) return;
+        
+        requestFocusInMapView();
 
         int idx=line.findClosestPoint(e.getPoint(),settings.maxDist);
Index: /applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java
===================================================================
--- /applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java	(revision 29594)
+++ /applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java	(revision 29595)
@@ -322,4 +322,6 @@
             return;
 
+        requestFocusInMapView();
+
         if (mode == Mode.None)
             drawingStart(e);
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java	(revision 29594)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java	(revision 29595)
@@ -81,4 +81,5 @@
         if (e.getButton() != MouseEvent.BUTTON1)
             return;
+        requestFocusInMapView();
         boolean ctrl = (e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0;
         // boolean alt = (e.getModifiers() & ActionEvent.ALT_MASK) != 0;
Index: /applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxMode.java
===================================================================
--- /applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxMode.java	(revision 29594)
+++ /applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxMode.java	(revision 29595)
@@ -71,4 +71,6 @@
             return;
         }
+
+        requestFocusInMapView();
 
         Point pointReleased = e.getPoint();
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java	(revision 29594)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java	(revision 29595)
@@ -83,11 +83,12 @@
 			return;
 		}
+		requestFocusInMapView();
 		digraph.ereaseJunctioncandidate();//um zu verhindern, dass gefundene Kreuzungen/Kandidaten weiterhin weiß gezeichnet werden
 		Point pointReleased = e.getPoint();
 
 		Rectangle r = createRect(pointReleased, pointPressed);
-		boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
+		//boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
 		boolean shift = (e.getModifiers() & ActionEvent.SHIFT_MASK) != 0;
-		boolean alt = (e.getModifiers() & ActionEvent.ALT_MASK) != 0;
+		//boolean alt = (e.getModifiers() & ActionEvent.ALT_MASK) != 0;
 		if (shift == false) {
 			digraph.ereaseSelectedChannels();
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java	(revision 29594)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java	(revision 29595)
@@ -61,4 +61,5 @@
 
 	        if ( currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) {
+	            requestFocusInMapView();
 	            isDragging = true;
 	            prevMousePoint = new Point(e.getPoint());
Index: /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java
===================================================================
--- /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java	(revision 29594)
+++ /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java	(revision 29595)
@@ -97,4 +97,5 @@
         if (e.getButton() == MouseEvent.BUTTON1) {
             if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+                requestFocusInMapView();
                 RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
                 RoutingModel routingModel = layer.getRoutingModel();
Index: /applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerAction.java
===================================================================
--- /applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerAction.java	(revision 29594)
+++ /applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerAction.java	(revision 29595)
@@ -171,5 +171,5 @@
             return;
         }
-
+        requestFocusInMapView();
         updateKeyModifiers(e);
         if (e.getButton() == MouseEvent.BUTTON1) {
