SimpleComputerRemote
SimpleComputerRemote copied to clipboard
Can't write in CAPS LOCK when typing in the smartphone.
I use the up arrow to change to caps and the smartphone does make the letters bigger but when it sends to the raspberry pi it receives lower letters.
not sure if this an active project but I thought it would be a good springboard for a project I am working on. Looks like the caps problem is related to the following method:
static inline void SendKeysym(int keySym) {
Display *display = XOpenDisplay(NULL);
if (display != NULL) {
WakeUp(display);
XTestFakeKeyEvent(display, XKeysymToKeycode(display, keySym), True, CurrentTime );
XTestFakeKeyEvent(display, XKeysymToKeycode(display, keySym), False, CurrentTime );
XFlush(display);
XCloseDisplay(display);
}
}
I believe when converting a keysym to keycode, keycodes do not have the concept of upper and lower case. You could probably check if the keysym is upper and if it is simulate a shift press.