summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-04-18 11:45:46 +0000
committerManolo Gouy <Manolo>2011-04-18 11:45:46 +0000
commitb51f47c437463e1732f43dfad6e318b0ae44e548 (patch)
treeaeeaa48f3744b6bb16db0509e05ea44ae474fc83 /src
parentf763b4b709ab6fd93d0cc1590e878d90fbf2b5a4 (diff)
Fix STR #2605: proper mapping of the Windows key.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8603 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_x.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 45e4aa18f..e6fb77bc4 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1321,6 +1321,21 @@ int fl_handle(const XEvent& thisevent)
else if (keysym == FL_BackSpace) got_backspace = 1;
}
# endif
+ // For the first few years, there wasn't a good consensus on what the
+ // Windows keys should be mapped to for X11. So we need to help out a
+ // bit and map all variants to the same FLTK key...
+ switch (keysym) {
+ case XK_Meta_L:
+ case XK_Hyper_L:
+ case XK_Super_L:
+ keysym = FL_Meta_L;
+ break;
+ case XK_Meta_R:
+ case XK_Hyper_R:
+ case XK_Super_R:
+ keysym = FL_Meta_R;
+ break;
+ }
// We have to get rid of the XK_KP_function keys, because they are
// not produced on Windoze and thus case statements tend not to check
// for them. There are 15 of these in the range 0xff91 ... 0xff9f