I want to make a virtual keyboard on js like those that do on sites for calculators. For example, there is a button with the number 1, when clicked, the number 1 is added to the input field. Similarly with letters.
I am interested in this version of the virtual keyboard, so that when you click on its button, the same events are triggered as when you press a button on a regular keyboard (keypress, keydown), and the focus from the input field is not lost.
Tell me where to do it better?