<?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 onkeyup event anytime in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onkeyup-event-anytime/m-p/714736#M66401</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to capture the onkeyup event for the ESC key after a template is selected in the template picker, so that if a user decides he doesn't want to draw a feature when he has already selected a template just by pressing the ESC key the template will unselect with a drawToolbar. deactivate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My code is similar to &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/ed_multipleAttrInspector.html" rel="nofollow noopener noreferrer" target="_blank"&gt;this&lt;/A&gt;&lt;SPAN&gt; sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im using this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var key_event_handle = dojo.isIE ? dojo.query('body')[0] : window;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(key_event_handle, "onkeyup", function(key) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (key.keyCode == dojo.keys.ESCAPE) { drawToolbar.deactivate();} //ESC = 27
&amp;nbsp;&amp;nbsp;&amp;nbsp; }); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The onkeyup event is only captured after I've drawn a first point. Once I've done that if will work every time. What am I doing wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 06:36:10 GMT</pubDate>
    <dc:creator>AleydisG__Pere</dc:creator>
    <dc:date>2021-12-12T06:36:10Z</dc:date>
    <item>
      <title>onkeyup event anytime</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onkeyup-event-anytime/m-p/714736#M66401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to capture the onkeyup event for the ESC key after a template is selected in the template picker, so that if a user decides he doesn't want to draw a feature when he has already selected a template just by pressing the ESC key the template will unselect with a drawToolbar. deactivate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My code is similar to &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/ed_multipleAttrInspector.html" rel="nofollow noopener noreferrer" target="_blank"&gt;this&lt;/A&gt;&lt;SPAN&gt; sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im using this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var key_event_handle = dojo.isIE ? dojo.query('body')[0] : window;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(key_event_handle, "onkeyup", function(key) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (key.keyCode == dojo.keys.ESCAPE) { drawToolbar.deactivate();} //ESC = 27
&amp;nbsp;&amp;nbsp;&amp;nbsp; }); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The onkeyup event is only captured after I've drawn a first point. Once I've done that if will work every time. What am I doing wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:36:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/onkeyup-event-anytime/m-p/714736#M66401</guid>
      <dc:creator>AleydisG__Pere</dc:creator>
      <dc:date>2021-12-12T06:36:10Z</dc:date>
    </item>
  </channel>
</rss>

