delite/KeyNav

This is a base class to enable keyboard navigation between the widget's descendants. Navigation can be performed via arrow keys and HOME/END keys, and also a letter key search. A List, Tree, or Grid widget could all be subclasses of KeyNav.

To use this base class, the subclass must implement a number of abstract methods. For LEFT/RIGHT/UP/DOWN arrow key navigation, implement:

These methods are meant to navigate relative to the current node, so they should operate based on this.focusedChild.

In addition, the subclass must:

Also, child widgets must implement a .focus() method.

Example