Problem to get EV_LED events

Otavio Salvador otavio at ossystems.com.br
Tue Jan 8 07:40:37 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I've been working on a new evdev[1] driver for kdrive and have it in a
good shape. Mouse and keyboard works.

1. http://git.debian.org/?p=users/otavio/xserver;a=shortlog;h=evdev

I've been having trouble getting EV_LED events. I identified the
following problem (that I don't know why it happens):

- From hw/kdrive/src/kdrive.c:

#v+
static void
KdCheckLock (void)
{
    KeyClassPtr	    keyc = NULL;
    Bool	    isSet = FALSE, shouldBeSet = FALSE;
    KdKeyboardInfo     *tmp = NULL;

    for (tmp = kdKeyboards; tmp; tmp = tmp->next) {
        if (tmp->LockLed && tmp->dixdev && tmp->dixdev->key) {
            keyc = tmp->dixdev->key;
            isSet = (tmp->leds & (1 << (tmp->LockLed-1))) != 0;
            shouldBeSet = (keyc->state & LockMask) != 0;
            if (isSet != shouldBeSet)
                KdSetLed (tmp, tmp->LockLed, shouldBeSet);
        }
    }
}
#v-

shouldBeSet is always 0 so it never calls KdSetLed. Does someone has
any idea of what I've done wrong? 

- -- 
Otavio Salvador                  O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>

iD8DBQFHg5lzLqiZQEml+FURAlbyAKCP8On0BKWNaaCP2GBvuSxbyJvTWwCff734
g5Oh+S9yfePOs976YBq78qc=
=DZHz
-----END PGP SIGNATURE-----



More information about the xorg mailing list