Android google chrome prints letters before keydown event

In Android Google Chrome (I’m using 128.0.6613.127 version) with javascript I’ve bound event callbacks

addEvent(elm, 'keydown', onKeyDown);
addEvent(elm, 'input', onInput);

Letter is already printed before the callback unlike other browsers.

How to callback before the letter printing.