For example, a USB barcode scanner can act as an HID keyboard to input characters. However, to input some foreign language other than English, e.g. Unicode, an HID keyboard could face difficulties. An HID keyboard mimics keyboard behaviors, which is subject to the chosen IME. Thus it has no unique, universal way to input certain Unicode characters.
Is there any defined "Machine Interface device" (MID) rather than HID? or How could I implement a USB device (or even other interfaces than USB) to input Unicode characters directly?
USB HID spec requires a keyboard layout, which means keys are sent to OS as keys and OS will translate the key to corresponding text. There is a "Unicode" layout in spec, but unfortunately:
So if you want to input some Unicode character, either define a custom keyboard layout in OS or write your own keyboard driver.
Referrence: https://github.com/kiibohd/KiiConf/issues/30
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With