question: there is a requirement that if the input box is not currently focused, but the keyboard is pressed, the input will be automatically populated into the input box.
my implementation is to listen to document.keydown, to determine keycode, and set the input box focus when it is an input character. This kind of implementation is no problem for English, but if the Chinese input method is turned on, then the document.keydown will not be able to monitor, and it will not be able to judge focus, how should it be done?
PS: is a client made of qt, and the interface is implemented at the front end.