>
> On 16 Apr 2007, at 20:11, michael sephton wrote:
>
> >>
> >> It seems that a button's callback can't be attached
> >> to pressing the enter key. Is that true?
> >
> > Looks to me from the Fl_Button source, and from this documentation
> > http://www.fltk.org/doc-1.1/Fl_Button.html#Fl_Button.when, that
> > Fl_Button is not currently set up to respond to the enter key.
>
> Does Fl_Return_Button not do what is wanted?
>
>
Thank you for pointing this out, I didn't notice Fl_Return_Button. It seems to
behave slightly differently to the example i just posted, because it responds
to FL_Enter through the FL_SHORTCUT event instead of through FL_KEYDOWN. The
result is Fl_Return_Button doesn't need to have focus to respond to the enter
key.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk