<?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 Intercepting/changing keyboard events when using Sketch in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intercepting-changing-keyboard-events-when-using/m-p/1339272#M82502</link>
    <description>&lt;P&gt;We're using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html" target="_self"&gt;Sketch&lt;/A&gt; tool and would like to change the behavior of some keyboard events, specifically the "escape" key while in create mode. I haven't been able to find anything in the docs, so I'm not sure how to proceed. To be clear, waiting for the "cancel" event is too late for our use case - we want to be able to modify what happens when "escape" (or another key) are pressed.&lt;/P&gt;&lt;P&gt;Though I haven't tried it, it seems like adding a listener on the MapView to essentially intercept the keypress &lt;EM&gt;might&lt;/EM&gt; work? But to be honest, I'm hoping I'm missing a more obvious approach. Any suggestions or ideas are welcome!&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2023 18:42:31 GMT</pubDate>
    <dc:creator>ToddRunstein</dc:creator>
    <dc:date>2023-10-18T18:42:31Z</dc:date>
    <item>
      <title>Intercepting/changing keyboard events when using Sketch</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intercepting-changing-keyboard-events-when-using/m-p/1339272#M82502</link>
      <description>&lt;P&gt;We're using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html" target="_self"&gt;Sketch&lt;/A&gt; tool and would like to change the behavior of some keyboard events, specifically the "escape" key while in create mode. I haven't been able to find anything in the docs, so I'm not sure how to proceed. To be clear, waiting for the "cancel" event is too late for our use case - we want to be able to modify what happens when "escape" (or another key) are pressed.&lt;/P&gt;&lt;P&gt;Though I haven't tried it, it seems like adding a listener on the MapView to essentially intercept the keypress &lt;EM&gt;might&lt;/EM&gt; work? But to be honest, I'm hoping I'm missing a more obvious approach. Any suggestions or ideas are welcome!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 18:42:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intercepting-changing-keyboard-events-when-using/m-p/1339272#M82502</guid>
      <dc:creator>ToddRunstein</dc:creator>
      <dc:date>2023-10-18T18:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Intercepting/changing keyboard events when using Sketch</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intercepting-changing-keyboard-events-when-using/m-p/1339414#M82504</link>
      <description>&lt;P&gt;Just in case anyone else wants/needs to change the keypress events sent to Sketch, I can confirm that adding a listener on the MapView's "key-down" event let's you `stopPropogation`, or whatever you may wish to do. Hopefully someone else will find this useful.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 23:10:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intercepting-changing-keyboard-events-when-using/m-p/1339414#M82504</guid>
      <dc:creator>ToddRunstein</dc:creator>
      <dc:date>2023-10-18T23:10:51Z</dc:date>
    </item>
  </channel>
</rss>

