On 04/05/13 22:58, Edzard Egberts wrote: > 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".
Perhaps this problem is perceived in test/keyboard as well by the 'LOCK' state flag staying set while the caps lock key is toggled repeatedly. I found it updates correctly if I just resize the window, so I was thinking the same thing, Fl::event_state() might not have valid state info for the caps lock key at that point in time in the handle() function, and that indeed an fltk timer would probably be needed to get the correct state info shown reliably. _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk