SimpleComputerRemote icon indicating copy to clipboard operation
SimpleComputerRemote copied to clipboard

Can't write in CAPS LOCK when typing in the smartphone.

Open RicardoG1981 opened this issue 12 years ago • 1 comments

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.

RicardoG1981 avatar Dec 18 '13 22:12 RicardoG1981

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.

seymour-bootay avatar May 27 '15 19:05 seymour-bootay