code: func (t *TextView) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) {
  	return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p Primitive)) {
  		key := event.Key()
  
  		if key == tcell.KeyEscape || key == tcell.KeyEnter || key == tcell.KeyTab || key == tcell.KeyBacktab {
  			if t.done != nil {
  				t.done(key)
  			}
  			return
  		}
  
  		if !t.scrollable {
  			return
  		}
  
  		switch key {
  		case tcell.KeyRune:
  			switch event.Rune() {
  			case 'g': // Home.
  				t.trackEnd = false
  				t.lineOffset = 0
  				t.columnOffset = 0
  			case 'G': // End.
  				t.trackEnd = true
  				t.columnOffset = 0
  			case 'j': // Down.
  				t.lineOffset++
  			case 'k': // Up.
  				t.trackEnd = false
  				t.lineOffset--
  			case 'h': // Left.
  				t.columnOffset--
  			case 'l': // Right.
  				t.columnOffset++
  			}
  		case tcell.KeyHome:
  			t.trackEnd = false
  			t.lineOffset = 0
  			t.columnOffset = 0
  		case tcell.KeyEnd:
  			t.trackEnd = true
  			t.columnOffset = 0
  		case tcell.KeyUp:
  			t.trackEnd = false
  			t.lineOffset--
  		case tcell.KeyDown:
  			t.lineOffset++
  		case tcell.KeyLeft:
  			t.columnOffset--
  		case tcell.KeyRight:
  			t.columnOffset++
  		case tcell.KeyPgDn, tcell.KeyCtrlF:
  			t.lineOffset += t.pageSize
  		case tcell.KeyPgUp, tcell.KeyCtrlB:
  			t.trackEnd = false
  			t.lineOffset -= t.pageSize
  		}
  	})
  }
docs: // InputHandler returns the handler for this primitive.