Skip to content

Fix and improve unicode input on macOS and Windows

Unicode text input from remote devices gives random texts because the plugin mistook the text encoding. Insert a Unicode 16 bits character each time instead of a UTF-8 character.

The API accepts the UniChar Unicode characters:

void CGEventKeyboardSetUnicodeString(CGEventRef event, UniCharCount stringLength, const UniChar *unicodeString);

from https://developer.apple.com/documentation/coregraphics/1456028-cgeventkeyboardsetunicodestring.

Edited by Weixuan Xiao

Merge request reports