<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Jan,<br>
    &nbsp;There's a short example on the OpenLayers docs that sounds similar.
    <a
      href="http://dev.openlayers.org/docs/files/OpenLayers/Control-js.html">http://dev.openlayers.org/docs/files/OpenLayers/Control-js.html</a><br>
    It doesn't use the map.events.register though. <br>
    It shows how to use OpenLayers.Util.extend to create a control that
    will work when the user is holding down the Shift key. It intercepts
    the shift-mouse click, lets the user drag out a box, and then does
    something with the bounds of that box. <br>
    It uses the OpenLayers.Handler.MOD_SHIFT keymask. There is also a
    MOD_CTRL keymask you could use as well. <br>
    <a
href="http://dev.openlayers.org/docs/files/OpenLayers/Handler-js.html#OpenLayers.Handler.OpenLayers.Handler.MOD_CTRL">http://dev.openlayers.org/docs/files/OpenLayers/Handler-js.html#OpenLayers.Handler.OpenLayers.Handler.MOD_CTRL</a><br>
    <br>
    I use the MOD_SHIFT keymask to let users drag out a box over a map
    and it works fine. <br>
    - Ryan<br>
    <br>
    On 2/21/2012 9:54 AM, Jan Hartmann wrote:
    <blockquote cite="mid:4F43BE1A.3080802@uva.nl" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <font face="Times New Roman, Times, serif">Hi all,<br>
        <br>
        I have written a small application to input points with
        &lt;ctrl&gt;&lt;click&gt; from an OpenLayers map using
        "map.events.register("click",map,function(e) { ...}". Works
        fine, but when the user moves the mouse when clicking, the
        default behavior takes over: the map is panned and no input
        takes place. How can I disable panning when the &lt;ctrl&gt; key
        is&nbsp; down?<br>
        <br>
        Jan<br>
      </font> <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Ryan Williams
GIS Analyst / Programmer
PAQ Interactive Inc.
<a class="moz-txt-link-abbreviated" href="mailto:rwilliams@paqinteractive.com">rwilliams@paqinteractive.com</a>
217-762-7955</pre>
  </body>
</html>