title: How to stop calling d3.brush if I have keydown ? d3/js
body: <p>Here is my brush call</p>
  
  <pre><code>brush.call(d3.svg.brush() //-calling the brush
          .x(d3.scale.identity().domain([0, width]))
          .y(d3.scale.identity().domain([0, height]))
          .on("brushstart", function(d) {
          d3.selectAll(".selectedNode text")
          .attr("class", "hidden")
          ;
            nodes.each(function(d) { d.previouslySelected = shiftKey &amp;&amp; d.selected; });
          })
          .on("brush", function() {
  
           //console.log(d3.event.sourceEvent.ctrlKey + "ctrl key");
  
            nodes.classed("selectedNode", function(d) {
              return d.selected = d.previouslySelected ^
                  (extent[0][0] &lt;= d.x &amp;&amp; d.x &lt; extent[1][0]
                  &amp;&amp; extent[0][1] &lt;= d.y &amp;&amp; d.y &lt; extent[1][1]);
            });
          })
          .on("brushend", function() {
            d3.event.target.clear();
            d3.select(this).call(d3.event.target);
          }));
  </code></pre>
  
  <p>How do I stop calling this on drag if I have, say, the ctrl key down ? So I can then call the zoom function if ctrl key is down which separates the brush and zoom functions </p>