> On 11 Apr 2013, at 18:34, Greg Ercolano wrote:
> 
> >     I guess we should see how Win32 and OSX behave, and if they're
> "reliable"
> >     as well, we should either:
> >
> >         1) Document the OS specific behavior, whether different or
> same, and leave the code alone
> >         2) Pick one behavior, and modify the code to enforce it, and
> document it
> 
> Can. Of. Worms.
> 
> Attached below, my take on this. It's messy...
> 
> However, the code given returns the "correct" state on OSX 10.6.8,
> Linux-in-a-VM, and WinXP.
> 
> What I find (at least on my systems...)
> 
> - On Linux, ONLY look at the FL_KEYDOWN events
> 
> - On WIN32, ONLY look at the FL_KEYUP events (and the sense is maybe
> inverted wrt the linux case)
> 
> - On OSX, I need to process both up and down events, because it looks
> (and I may be really losing the plot here) as if I only get keydown
> events when the Caps Lock is going on, and I only get keyrelease events
> if the Caps Lock is going off...
> 
> So... The code works, but it is not nice:

Argh! No it does not.

Just tested this on Win7, and it doesn't work... 

To make this work on Win7, I took the code "as is" and inverted the state in 
the WIN32 only section of FL_KEYUP (i.e. make it the same as the APPLE FL_KEYUP 
code) and *then* the Win7 version works correctly.

WTF.



Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to