Now there is a serial port handheld input device, with self-contained learning software, is an English interface and input. Its working principle: Monitor the key action of this input device from the serial port using Java's serial packet, if there is action, read information, processing, and display the characters corresponding to the button. I now want to implement Chinese input. If you open this handheld device (drive is a separate program, it is not installed in the system, understand? ^ _ ^), Then the device can enter Chinese characters through the input method (this It should be said that this hand-held input device is the system-level device like this handheld keyboard mouse. I don't know if this is right. Because of the needs of the experiment, I need to solve the input of the Chinese characters when I don't use the driver. I think a few options, now there are two, everyone helps me see if it is? The first: I want to join the code of the input method in the software, that is, the built-in input method, so after reading the serial port, directly payment directly to the input method. Add a text editor in Tutor (learning software), the function is to get the Tutor read the keyboard information read from the Twiddler, and read the keyboard information into the text editor, but in order to implement Chinese input, you need to first pair in the editor. JtextArea restriction input, parsing AZ characters, if it is AZ letter, then pop up the parsing window. Two JtextField objects are defined in the parser window class, one is used to accept the input letter (edit), and the other to display the resolution result of the input letter in time (if there is in the font). Analyze the corresponding Chinese characters based on the input string. The problem of this is, I need to find an open font. But just do the test, I can build a simple franchery yourself. If you need it, you can add the feature that outputs text information to text files; because I have the source code of Tutor, and the source code has Keymap, which is the information that can get the keyboard, so You can do a simple input method yourself, the experiment can be met. The second: Is it possible to invoke the input of the system to implement Chinese input. After reading the serial button information, call the system input method to process, return the result of the result to tutor, send the display.
Personal decided to use the input method, find a Code of a friend, learn from it. Siege ...
(to be continued)