Greg wrote: > Otherwise, for focus-only oriented behavior, besides deriving > your own widget (eg. MyButton) that handles this, I suppose > a method could be added to Fl_Button, with 'space' being the default. > > So for instance, something like: > > button->trigger_key_clear(); // clear previous trigger keys, including > 'space' > button->trigger_key_add(FL_Enter); // add regular enter key > button->trigger_key_add(FL_KP_Enter); // add keypad enter key > > ..this way both enter keys can trigger the button. > > Perhaps too, this could be a global preference, the way > we currently have Fl::scrollbar_size() to set things globally, > and Fl_<SomeWidget>::scrollbar_size() to affect just one widget.
It would be pleasant to have something global so that it would work for the pre-made dialogs so that I couldn't, e.g., use the file chooser and tab to the cancel button, and press Enter, and have OK get triggered. (Of course I should get used to pressing Escape to get rid of dialogs -- but then, even if I do, I'm not sure of a nice, easy way to make the use of Escape obvious to other users...) > Or, if there's some agreement that 'space' is not the right > key anymore, and Enter is, then perhaps a petition to change. > (I'm almost sure that would break some existing apps though.) Which environments tend to use Space to trigger buttons? I wouldn't have known to do it with FLTK unless I'd read the source. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

