code: func (t *TreeView) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) {
  	return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p Primitive)) {
  		// Because the tree is flattened into a list only at drawing time, we also
  		// postpone the (selection) movement to drawing time.
  		switch key := event.Key(); key {
  		case tcell.KeyTab, tcell.KeyDown, tcell.KeyRight:
  			t.movement = treeDown
  		case tcell.KeyBacktab, tcell.KeyUp, tcell.KeyLeft:
  			t.movement = treeUp
  		case tcell.KeyHome:
  			t.movement = treeHome
  		case tcell.KeyEnd:
  			t.movement = treeEnd
  		case tcell.KeyPgDn, tcell.KeyCtrlF:
  			t.movement = treePageDown
  		case tcell.KeyPgUp, tcell.KeyCtrlB:
  			t.movement = treePageUp
  		case tcell.KeyRune:
  			switch event.Rune() {
  			case 'g':
  				t.movement = treeHome
  			case 'G':
  				t.movement = treeEnd
  			case 'j':
  				t.movement = treeDown
  			case 'k':
  				t.movement = treeUp
  			}
  		case tcell.KeyEnter:
  			if t.currentNode != nil {
  				if t.selected != nil {
  					t.selected(t.currentNode)
  				}
  				if t.currentNode.selected != nil {
  					t.currentNode.selected()
  				}
  			}
  		}
  
  		t.process()
  	})
  }
docs: // InputHandler returns the handler for this primitive.