It is necessary to simulate the keystrokes in the input. Yes, I know that I can change data via input, but this does not suit me.
I tried through KeyboardEvents, but it doesn’t work.
const ke = new KeyboardEvent("keydown", {
bubbles: true, cancelable: true, keyCode: 50
});
document.body.dispatchEvent(ke);