Fixed type x11 key bug

This commit is contained in:
vcaesar 2022-04-08 14:10:02 -07:00
parent 985c590284
commit 51ca08e484
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);