title: Override OOTB up and down navigation functionalities in DHTMLX tree structure?
body: <p>How can I override the OOTB key up and key down functionalities . Currently in the OOTB navigation works fine and after we have navigated to desired selection when we press enter it displays the corresponding tree item details . But what I have been trying is the details should be displayed on up and down navigation only without pressing enter . </p>
  
  <p>Previously this was the code . </p>
  
  <pre><code> tree.attachEvent('onKeyPress', function(key, event){
              if((tree._selected).length &gt; 0){
                  var xKey = 88, vKey = 86, cKey = 67, delKey = 46, escKey = 27,enterKey = 13,i, treeId, selectedNodeId, selectedNodeIds=[];
                  if(event.ctrlKey &amp;&amp; (key==cKey)) {
                      pubsub.publish('copyTree' + index);
                  }   
                  else if(event.ctrlKey &amp;&amp; (key==vKey)){
                      pubsub.publish('pasteTree' + index);
                  }   
                  else if(event.ctrlKey &amp;&amp; (key==xKey)){
                      pubsub.publish('cutTree' + index);
                  }
                  else if(key==delKey){
                      pubsub.publish('deleteTree' + index, 'delete');
                  }else if(key==escKey){
                      tree.clearCut();
                      cutCopyManager.clear();
                  }else if(key==enterKey){
                      if(tree._selected &amp;&amp; tree._selected.length&gt;0){
                          treeId = (tree._selected)[0].id;
                          showProductDetails(treeId);
                      }
                  }
                  else{
                       return true;
                  }
              }
          });
  </code></pre>
  
  <p>I have modified this way </p>
  
  <pre><code>tree.attachEvent('onKeyPress', function(key, event){
              if((tree._selected).length &gt; 0){
                  var xKey = 88, vKey = 86, cKey = 67, delKey = 46, escKey = 27,enterKey = 13,downKey = 40,upKey = 38,
                      i, treeId, selectedNodeId, selectedNodeIds=[];
                  if(event.ctrlKey &amp;&amp; (key==cKey)) {
                      pubsub.publish('copyTree' + index);
                  }   
                  else if(event.ctrlKey &amp;&amp; (key==vKey)){
                      pubsub.publish('pasteTree' + index);
                  }   
                  else if(event.ctrlKey &amp;&amp; (key==xKey)){
                      pubsub.publish('cutTree' + index);
                  }
                  else if(key==delKey){
                      pubsub.publish('deleteTree' + index, 'delete');
                  }else if(key==escKey){
                      tree.clearCut();
                      cutCopyManager.clear();
                  }else if(key==enterKey){
                      if(tree._selected &amp;&amp; tree._selected.length&gt;0){
                          treeId = (tree._selected)[0].id;
                          showProductDetails(treeId);
                      }
                  }
                  else if(key==upKey){
                      if(tree._selected &amp;&amp; tree._selected.length&gt;0){
                          treeId = (tree._selected)[0].id;
                          showProductDetails(treeId);
                      }
                  }
                  else if(key==downKey){
                      if(tree._selected &amp;&amp; tree._selected.length&gt;0){
                          treeId = (tree._selected)[0].id;
                          showProductDetails(treeId);
                      }
                  }
                  else{
                       return true;
                  }
              }
          });
  </code></pre>
  
  <p>But the selection it self has disappeared now. Tried to debug this since 2 days . Can some one tell me what is wrong ??</p>