Post

Replies

Boosts

Views

Activity

Reply to CGEventPost with Emoji unicode in Monterey
down = CGEventCreateKeyboardEvent(NULL, 0 ,true); up = CGEventCreateKeyboardEvent(NULL, 0 ,false); CGEventKeyboardSetUnicodeString(down, 1, uChar); CGEventKeyboardSetUnicodeString(up, 1, uChar); CGEventPost(kCGHIDEventTap, down); CGEventPost(kCGHIDEventTap, up); Call the above procedures two times as one Emoji contains 2 UniChar.
Topic: Programming Languages SubTopic: General Tags:
May ’22
Reply to CGEventPost with Emoji unicode in Monterey
Thanks for your reply. In Big Sur, when I press the button in my software, it will show an emoji in a text editor. But in Monterey, it will show nothing. My program does not crash in Monterey. My software also has another button which will show "ab" in a text editor. It works in both Big Sur and Monterey. Terry
Topic: Programming Languages SubTopic: General Tags:
May ’22
Reply to CGEventPost with Emoji unicode in Monterey
Thanks for your explanation.
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to CGEventPost with Emoji unicode in Monterey
down = CGEventCreateKeyboardEvent(NULL, 0 ,true); up = CGEventCreateKeyboardEvent(NULL, 0 ,false); CGEventKeyboardSetUnicodeString(down, 1, uChar); CGEventKeyboardSetUnicodeString(up, 1, uChar); CGEventPost(kCGHIDEventTap, down); CGEventPost(kCGHIDEventTap, up); Call the above procedures two times as one Emoji contains 2 UniChar.
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to CGEventPost with Emoji unicode in Monterey
Thanks for your reply. In Big Sur, when I press the button in my software, it will show an emoji in a text editor. But in Monterey, it will show nothing. My program does not crash in Monterey. My software also has another button which will show "ab" in a text editor. It works in both Big Sur and Monterey. Terry
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’22