code: public static <S, T extends Event, U extends T> InputMapTemplate<S, U> process(
              EventPattern<? super T, ? extends U> eventPattern,
              BiFunction<? super S, ? super U, InputHandler.Result> action) {
          return new PatternActionTemplate<>(eventPattern, action);
      }
docs: If the given {@link EventPattern} matches the given event type, runs the given action, and then attempts
  to pattern match the event type with the next {@code InputMap} (if one exists).