code: func translateKeyEvents(events []winterm.INPUT_RECORD, escapeSequence []byte) []byte {
  	var buffer bytes.Buffer
  	for _, event := range events {
  		if event.EventType == winterm.KEY_EVENT && event.KeyEvent.KeyDown != 0 {
  			buffer.WriteString(keyToString(&event.KeyEvent, escapeSequence))
  		}
  	}
  
  	return buffer.Bytes()
  }
docs: // translateKeyEvents converts the input events into the appropriate ANSI string.