<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to hold down the ctrl key to select elements in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hold-down-the-ctrl-key-to-select-elements/m-p/1369301#M83324</link>
    <description>&lt;P&gt;This is possible, but whether or not it would be considered convenient could go either way.&amp;nbsp; There's two parts to this:1 is drawing the geometry, and 2 is capturing whether the Ctrl key is down or not when it's drawn.&amp;nbsp; For the geometry, I would recommend using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" target="_self"&gt;SketchViewModel&lt;/A&gt; module.&amp;nbsp; To capture whether the Ctrl key is down or not, you would use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#event-pointer-down" target="_self"&gt;pointer-down&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#event-pointer-up" target="_self"&gt;pointer-up&lt;/A&gt; events of the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#event-pointer-up" target="_self"&gt;MapView&lt;/A&gt;.&amp;nbsp; The argument passed to those event handlers will have a property called "native" that provides information about the click.&amp;nbsp; That "native" object has a Boolean property named "ctrlKey"&amp;nbsp; So, when using the SketchView model to draw a rectangle for example, you would capture the state of the ctrlKey property at the beginning and end of the sketch, and respond in your application accordingly if it was true in both cases.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 23:32:36 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2024-01-11T23:32:36Z</dc:date>
    <item>
      <title>How to hold down the ctrl key to select elements</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hold-down-the-ctrl-key-to-select-elements/m-p/1368751#M83312</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When I hold down the shift key and drag on the map, the following effect will occur. I want to have the same effect when holding down the ctrl key. Then I get a geometry or an extent. Is there a convenient way to achieve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-01-11_105513.jpg" style="width: 815px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91168iF009640632D6731C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-01-11_105513.jpg" alt="2024-01-11_105513.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 03:16:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hold-down-the-ctrl-key-to-select-elements/m-p/1368751#M83312</guid>
      <dc:creator>weiliyao</dc:creator>
      <dc:date>2024-01-11T03:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to hold down the ctrl key to select elements</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hold-down-the-ctrl-key-to-select-elements/m-p/1369301#M83324</link>
      <description>&lt;P&gt;This is possible, but whether or not it would be considered convenient could go either way.&amp;nbsp; There's two parts to this:1 is drawing the geometry, and 2 is capturing whether the Ctrl key is down or not when it's drawn.&amp;nbsp; For the geometry, I would recommend using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" target="_self"&gt;SketchViewModel&lt;/A&gt; module.&amp;nbsp; To capture whether the Ctrl key is down or not, you would use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#event-pointer-down" target="_self"&gt;pointer-down&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#event-pointer-up" target="_self"&gt;pointer-up&lt;/A&gt; events of the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#event-pointer-up" target="_self"&gt;MapView&lt;/A&gt;.&amp;nbsp; The argument passed to those event handlers will have a property called "native" that provides information about the click.&amp;nbsp; That "native" object has a Boolean property named "ctrlKey"&amp;nbsp; So, when using the SketchView model to draw a rectangle for example, you would capture the state of the ctrlKey property at the beginning and end of the sketch, and respond in your application accordingly if it was true in both cases.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 23:32:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hold-down-the-ctrl-key-to-select-elements/m-p/1369301#M83324</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-01-11T23:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to hold down the ctrl key to select elements</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hold-down-the-ctrl-key-to-select-elements/m-p/1369328#M83325</link>
      <description>&lt;P&gt;thank you for your replay&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 00:54:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hold-down-the-ctrl-key-to-select-elements/m-p/1369328#M83325</guid>
      <dc:creator>weiliyao</dc:creator>
      <dc:date>2024-01-12T00:54:11Z</dc:date>
    </item>
  </channel>
</rss>

