Greg Ercolano wrote:
> I'm trying to strengthen the docs on shortcut specifications,
> and am finding there's contradicting behavior with casing of
> the keyboard codes. (There's already an STR about this)
>
> What is the /intended/ behavior for shortcuts like:
>
> 'a' -- Should only lowercase 'a' trigger shortcut? Or both 'a'
> and 'A'?
> 'A' -- Should this imply Shift-A, or just 'a' too?
> FL_CTRL+'a' -- Should only allow Ctrl-A, and not Shift-Ctrl-A?
> FL_CTRL+'A' -- Should this imply Ctrl-Shift-A? Or only Ctrl-A?
>
> [..]
> What I'd like to do is document the /intended/ behavior, so that bugs can be
> properly reported for contradicting behavior, or if unfixable, at least
> document
> the current platform specific behaviors.
I suppose an easy way to bring sanity/consistency would be to make an edict
that the case of the letter code will be ignored (downcased) so that
'A' or 'a' don't affect casing, and the only way to get a shift key
is to include the FL_SHIFT modifier. (eg. AND off the modifier bits,
do a tolower() on the resulting value, then OR the modifiers back in)
Then it would just be a matter of making sure the downcased codes all
work as expected, and documenting the behavior.
This would at least remove the potential for odd behavior for 'a' vs 'A',
and I think would be a 'clear' rule to remember.
I guess it needs to be determined, though, if casing of alpha characters
should matter.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev