目录

Input Box and Input Method Interaction in Non-Focusable Windows

When to Use

Before using an input method, its host application must have focus. You need to handle focus correctly to ensure the proper functioning of input methods.

For example, during application development, you can use setWindowFocusable to set the focusable property of the created window (such as floating window and auxiliary interaction window) to false, and draw an input box (such as TextInput, TextArea, or a custom edit box) in the window to launch the system keyboard for inputs.

System Restrictions

When a window is set to be non-focusable via setWindowFocusable, the system imposes restrictions on it. Since the window is not focusable, input events (such as key information) cannot be correctly received and processed by the window. The input content cannot be synchronized to the input box in the window, resulting in abnormal interaction between the input box and the keyboard.