<?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>idea Improve keyboard / mouse navigation API in Developers Ideas</title>
    <link>https://community.esri.com/t5/developers-ideas/improve-keyboard-mouse-navigation-api/idi-p/935535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As of 4.16 customization keyboard / mouse navigation is quite hard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to this on a SceneView but it also apply to a MapView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/view-disable-zoom/index.html"&gt;some customization is doable&lt;/A&gt;&amp;nbsp;the system could be more flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to use Ctrl + Drag to rotate the map while Drag only should pan the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't found an easy way to do this.&lt;/P&gt;&lt;P&gt;What I ended up doing is listening to the key-down / key-up events and if the key is "Control" then&amp;nbsp;call the toggle method of the navigation-toggle widget. It sorts of work but sometime the navigation would got stuck for a little while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then an other problem is that if I want to attach a behavior to mouse-wheel + Control (i.e.&amp;nbsp;view.on('mouse-wheel', ['Control'], (e) =&amp;gt; { ... })) then my key-down / key-up event isn't really working any more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be one way to solve this would be to decouple the key/mouse&amp;nbsp;from the navigation and being able to map some key/mouse to a different action ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example I could bind Drag to a pan navigation and bind Control + Drag to a rotate navigation. It would also be nice to "unbind" any keys that are not needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should also be possible to trigger an action programmatically. i.e. rotate around the map center, ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reference:&amp;nbsp;&lt;A href="https://community.esri.com/thread/259792-customize-keyboard-navigation"&gt;https://community.esri.com/thread/259792-customize-keyboard-navigation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Sep 2020 17:03:12 GMT</pubDate>
    <dc:creator>VictorBerchet</dc:creator>
    <dc:date>2020-09-25T17:03:12Z</dc:date>
    <item>
      <title>Improve keyboard / mouse navigation API</title>
      <link>https://community.esri.com/t5/developers-ideas/improve-keyboard-mouse-navigation-api/idi-p/935535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As of 4.16 customization keyboard / mouse navigation is quite hard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to this on a SceneView but it also apply to a MapView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/view-disable-zoom/index.html"&gt;some customization is doable&lt;/A&gt;&amp;nbsp;the system could be more flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to use Ctrl + Drag to rotate the map while Drag only should pan the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't found an easy way to do this.&lt;/P&gt;&lt;P&gt;What I ended up doing is listening to the key-down / key-up events and if the key is "Control" then&amp;nbsp;call the toggle method of the navigation-toggle widget. It sorts of work but sometime the navigation would got stuck for a little while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then an other problem is that if I want to attach a behavior to mouse-wheel + Control (i.e.&amp;nbsp;view.on('mouse-wheel', ['Control'], (e) =&amp;gt; { ... })) then my key-down / key-up event isn't really working any more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be one way to solve this would be to decouple the key/mouse&amp;nbsp;from the navigation and being able to map some key/mouse to a different action ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example I could bind Drag to a pan navigation and bind Control + Drag to a rotate navigation. It would also be nice to "unbind" any keys that are not needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should also be possible to trigger an action programmatically. i.e. rotate around the map center, ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reference:&amp;nbsp;&lt;A href="https://community.esri.com/thread/259792-customize-keyboard-navigation"&gt;https://community.esri.com/thread/259792-customize-keyboard-navigation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2020 17:03:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/improve-keyboard-mouse-navigation-api/idi-p/935535</guid>
      <dc:creator>VictorBerchet</dc:creator>
      <dc:date>2020-09-25T17:03:12Z</dc:date>
    </item>
  </channel>
</rss>

