variable pwm frequency and duty cycle using push buttons

hello, I need to vary the frequency and duty cycle in a pwm output using two buttons one to vary the frequency and another to vary the duty cycle, I am using a mega arduino 2560, searching here in the forum I found a similar topic where the following code:

#include <PWM.h>

int outputPin = 11;

//For testing
int freqInput = 100; //10-10000 Hz (I wanted that range only)
int dutyCycleInput = 70; //1-65535

void setup()
{
InitTimersSafe();
}

void loop()
{
//Get inputs from either serial or through pot
//So we have Frequency and Duty cycle in variables 'freqInput' & 'dutyCycleInput' respectively in int
SetPinFrequencySafe(outputPin, freqInput );
pwmWriteHR(outputPin, dutyCycleInput );
}

My question is how to add the buttons to vary both frequency and duty cycle in a single output? thanks

How do you want to 'vary' the frequency with one button? Did you want to enter values in Morse code? Did you want the button to have several different meanings for single click, double click, and long press?

Same for duty-cycle.

Are you SURE you don't want to use two pots?!?