From b51f47c437463e1732f43dfad6e318b0ae44e548 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 18 Apr 2011 11:45:46 +0000 Subject: 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 --- src/Fl_x.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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 -- cgit v1.2.3