summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Kasanen <cand@gmx.com>2014-08-29 12:10:11 +0000
committerLauri Kasanen <cand@gmx.com>2014-08-29 12:10:11 +0000
commit795342693de6e6b587084d3b4a0a0acf9267aa32 (patch)
treede5b53707599372c0882131a3dbedf7998ab8a18
parent9905a47ffb9060e435929b024d3de4c1d96d850c (diff)
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
-rw-r--r--FL/Fl_Group.H7
-rw-r--r--src/Fl_Group.cxx4
2 files changed, 9 insertions, 2 deletions
diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H
index 3eec15118..3e6a669bc 100644
--- a/FL/Fl_Group.H
+++ b/FL/Fl_Group.H
@@ -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 {
diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx
index 695a5c48d..7b10dc9f3 100644
--- a/src/Fl_Group.cxx
+++ b/src/Fl_Group.cxx
@@ -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;