code: func KeyPressDuration(key ebiten.Key) int {
  	theInputState.m.RLock()
  	s := theInputState.keyDurations[key]
  	theInputState.m.RUnlock()
  	return s
  }
docs: // KeyPressDuration returns how long the key is pressed in frames.
  //
  // KeyPressDuration is concurrent safe.