Howard Rubin schrieb:
> Thanks for the quick reply. Here's what I have now. It's reporting the
> opposite of of the Caps Lock state. In other words, (Fl::event_state() &
> FL_CAPS_LOCK) is zero when Caps Lock is on, and nonzero when it's off.
> Is that what you meant in your last message?

Yes, it shows every time the wrong of of two states, so you know for 
sure the right one - it's !state.

> I'm less than enthusiastic about displaying the 'Caps Lock is on'
> message when the test in the code says it's off.
> Is there really no alternative?

It seems, that caps-lock handling starts to work after key handling and 
I think there might be other problems, like switching caps lock, when 
there is another window in focus. I think a better way is, to use a 
timer and to check for change of state e.g. all 0.25 seconds. For humans 
this is fast enought to appear as "instantly".

fltk mailing list

Reply via email to