code: func (e *EditField) ProcessEvent(event Event) bool {
  	if !e.Active() || !e.Enabled() {
  		return false
  	}
  
  	if event.Type == EventActivate && event.X == 0 {
  		term.HideCursor()
  	}
  
  	if event.Type == EventMouse && event.Key == term.MouseLeft {
  		e.lastEvent = time.Now()
  	}
  
  	if event.Type == EventKey && event.Key != term.KeyTab {
  		if e.onKeyPress != nil {
  			res := e.onKeyPress(event.Key, event.Ch)
  			if res {
  				return true
  			}
  		}
  
  		switch event.Key {
  		case term.KeyEnter:
  			return false
  		case term.KeySpace:
  			e.insertRune(' ')
  			return true
  		case term.KeyBackspace, term.KeyBackspace2:
  			e.backspace()
  			return true
  		case term.KeyDelete:
  			e.del()
  			return true
  		case term.KeyArrowLeft:
  			e.charLeft()
  			return true
  		case term.KeyHome:
  			e.home()
  			return true
  		case term.KeyEnd:
  			e.end()
  			return true
  		case term.KeyCtrlR:
  			if !e.readonly {
  				e.Clear()
  			}
  			return true
  		case term.KeyArrowRight:
  			e.charRight()
  			return true
  		default:
  			if event.Ch != 0 {
  				elapsed := time.Now().Sub(e.lastEvent)
  				if elapsed > time.Duration(charInvervalMs)*time.Millisecond {
  					e.insertRune(event.Ch)
  					e.lastEvent = time.Now()
  				}
  				return true
  			}
  		}
  		return false
  	}
  
  	return false
  }
docs: /*
  ProcessEvent processes all events come from the control parent. If a control
  processes an event it should return true. If the method returns false it means
  that the control do not want or cannot process the event and the caller sends
  the event to the control parent
  */