DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2605
Version: 1.3-current
For the first few years after the Windows key appeared, people couldn't
agree on which X11 keysym to use for it. So different systems will use one
of XK_Meta_x, XK_Hyper_x and XK_Super_x. These days it's generally Super
that's used, but FLTK expects Meta.
The attached patch makes FLTK report the same FLTK key code for all three
variants.
Link: http://www.fltk.org/str.php?L2605
Version: 1.3-current
diff -up fltk-1.3.x-r8530/src/Fl_x.cxx.super fltk-1.3.x-r8530/src/Fl_x.cxx
--- fltk-1.3.x-r8530/src/Fl_x.cxx.super 2011-04-14 16:24:10.774674182 +0200
+++ fltk-1.3.x-r8530/src/Fl_x.cxx 2011-04-14 16:24:55.460432541 +0200
@@ -36,6 +36,7 @@
/* #define BACKSPACE_HACK 1 */
# define XK_XKB_KEYS
+# define XK_MISCELLANY
# include <config.h>
# include <FL/Fl.H>
@@ -1432,6 +1433,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 concensus 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
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs