Merge pull request #494 from go-vgo/bitmap-pr

Fixed type x11 key bug #493
This commit is contained in:
Evans 2022-04-08 14:11:19 -07:00 committed by GitHub
commit bfa6b232be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -79,6 +79,11 @@ MMKeyCode keyCodeForChar(const char c) {
if (code == NoSymbol) {
return K_NOT_A_KEY;
}
// x11 key bug
if (c == 60) {
code = 44;
}
return code;
#endif
}

View File

@ -20,7 +20,7 @@
}
#elif defined(USE_X11)
Display *XGetMainDisplay(void);
void X_KEY_EVENT(Display *display, MMKeyCode key, bool is_press) {
XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), is_press, CurrentTime);
XSync(display, false);