Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

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

Open
RicardoG1981 opened this issue Dec 18, 2013 · 1 comment
Open

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

RicardoG1981 opened this issue Dec 18, 2013 · 1 comment

Comments

@RicardoG1981
Copy link

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.

@seymour-bootay
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants