How to set up initial delay in UI key input repeat?

I’m making a menu with a set of options that the player navigates through using the keyboard or gamepad.
If they hold down, the cursor highlight should cycle through all of the options.

Usually when you have a repeated input, there is a short delay after the initial input before it begins repeating - but Unity UI navigation does not seem to obey any settings from the OS.

I know you can make input repeat faster or slower using “Input Actions Per Second” on the “Standalone Input Module”, but how do you implement an initial delay before input repeat?

You can do this with a Coroutine and a boolean but it’s not very clean.

if(///Your input here && canRepeat)
{
//Do what you want
canRepeat = false;
StartCoroutine(WaitAndRepeat());
}


...
...

IEnumerator WaitAndRepeat()
{
yield return new WaitForSeconds(waitTime);
canRepeat = true;
}