Switch the input's text to the next value, if any.
Handle history collection without overriding the parent's onChange handler, if any.
Handle history navigation without overriding the parent's onKeyDown handler, if any.
Switch the input's text to the previous value, if any.
Add a nonempty current value to the history, if not already present. (Debounced, 1 second delay.)