Skip to content

Commit

Permalink
Merge pull request octalmage#567 from rayfoss/linux-unicode-patch
Browse files Browse the repository at this point in the history
Fix X11 support stripped with windows PR
  • Loading branch information
oktapodia authored Apr 22, 2020
2 parents b081928 + 57bb9fd commit c9cbd98
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/keypress.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,18 @@ void toggleUnicode(UniChar ch, const bool down)
CGEventPost(kCGSessionEventTap, keyEvent);
CFRelease(keyEvent);
}
#elif defined(USE_X11)
#define toggleUniKey(c, down) toggleKey(c, down, MOD_NONE)
#endif

void unicodeTap(const unsigned value)
{
#if defined(IS_MACOSX)
#if defined(USE_X11)
char ch = (char)value;

toggleUniKey(ch, true);
toggleUniKey(ch, false);
#elif defined(IS_MACOSX)
UniChar ch = (UniChar)value; // Convert to unsigned char

toggleUnicode(ch, true);
Expand Down

0 comments on commit c9cbd98

Please sign in to comment.