triggering buttons with the keyboard
In fltk2, Button.cxx had case KEY: if (event_key() == ' ' || event_key() == ReturnKey || event_key() == KeypadEnter) goto EXECUTE; In fltk 1.3, Fl_Button.cxx has if (Fl::focus() == this && Fl::event_key() == ' ' && !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) { ... if (when() & FL_WHEN_RELEASE) do_callback(); Our fltkui button widget callbacks check for FL_Enter/ReturnKey before emitting clicked. A couple of months ago, I had some confusion with the fltk people where I expected Enter to trigger something, but ' ' was doing it. My recollection was that they seemed to think one should expect ' ' to be what triggers actions. Is ' ' some sort of standard in the gui world nowadays?
participants (1)
-
corvid@lavabit.com