Don't grab navkeys with modifiers, as the app may want them. STR #3104

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10261 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Lauri Kasanen 2014-08-29 12:10:11 +00:00
parent 9905a47ffb
commit 795342693d
2 changed files with 9 additions and 2 deletions

View File

@ -30,8 +30,13 @@
The Fl_Group class is the FLTK container widget. It maintains
an array of child widgets. These children can themselves be any widget
including Fl_Group. The most important subclass of Fl_Group
is Fl_Window, however groups can also be used to control radio buttons
is Fl_Window, however groups can also be used to control radio buttons
or to enforce resize behavior.
The tab and arrow keys are used to move the focus between widgets of
this group, and to other groups. The only modifier grabbed is shift
(for shift-tab), so that ctrl-tab, alt-up, and such are free
for the app to use as shortcuts.
*/
class FL_EXPORT Fl_Group : public Fl_Widget {

View File

@ -122,8 +122,10 @@ static int send(Fl_Widget* o, int event) {
}
// translate the current keystroke into up/down/left/right for navigation:
#define ctrl(x) (x^0x40)
static int navkey() {
// The app may want these for hotkeys, check key state
if (Fl::event_state(FL_CTRL | FL_ALT | FL_META)) return 0;
switch (Fl::event_key()) {
case 0: // not an FL_KEYBOARD/FL_SHORTCUT event
break;