On 04/09/13 12:18, Howard Rubin wrote:
> On Mon, 08 Apr 2013 20:17:31 -0700, Greg Ercolano <e...@seriss.com> wrote:
>>              unsigned n;
>>              XkbGetIndicatorState(d, XkbUseCoreKbd, &n);
>>              caps_state = (n & 0x01) == 1;
> That works perfectly, and even better, needs no timer. Test program below.
> Will this be fixed in a future release of FLTK?

        Again, I think FLTK is doing the right thing to pass the state
        information X11 is providing; seems it's an X11 issue (see the
        other X11 code I provided that shows the problem is with X11's
        events for KeyRelease)

        We could try to hack our events to use the above to test the
        state whenever the capslock key is set, and force-set the event
        state info.. but that's kinda hacky.

        I'd offer it should be investigated first to see if it's an
        X11 problem.

        I'd offer that we could perhaps provide a wrapper to get the
        state of the keyboard LEDs (for operating systems that provide this)
        e.g. fl_get_indicators() or some such that returns flags.
        Arguably if we provided that, we should provide fl_set_indicators()
        as well.

        And I suppose the return value could indicate if the OS provides
        this feature or not (assuming there are OS's that don't provide it)

        Also: not sure if the XkbGetIndicatorState() function is available
        on all Unix OS's we support; might need a configure option to detect

        Seems easy enough to implement under X11 at least. Anyone familiar with
        Win32 + OSX keyboard LED access?
fltk mailing list

Reply via email to