public static @Nullable TypingTarget findTarget(PlaybackContext context) {
    if (!context.isUseTypingTargets()) {
      return null;
    }

    Component each = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
    while (each != null) {
      if (each instanceof TypingTarget) {
        return (TypingTarget)each;
      }

      each = each.getParent();
    }

    return null;
  }
public static @Nullable TypingTarget findTarget(PlaybackContext context)