Albrecht Schlosser wrote:
> Just add
> case FL_SHORTCUT: // unused key pushed
> before or after
> case FL_KEYDOWN: // keyboard key pushed
> case FL_KEYUP: // keyboard key released
Yes, that will work if you make one other change; this line:
b->value(e == FL_KEYDOWN ? 1 : 0); // change the
button's state
..to instead read:
b->value((e == FL_KEYDOWN || e == FL_SHORTCUT) ? 1 :
0); // change the button's state
..that seems to work.
I put a modified version of the above on my cheat page here:
http://seriss.com/people/erco/fltk/#KeyPressRelease
I also added an extra 'X' button outside the group to test the
external widget focus issue.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk