|
|
@ -1,5 +1,5 @@ |
|
|
|
//
|
|
|
|
//
|
|
|
|
// "$Id: Fl_x.cxx,v 1.24.2.24.2.36 2004/05/24 01:30:45 easysw Exp $"
|
|
|
|
// "$Id: Fl_x.cxx,v 1.24.2.24.2.37 2004/06/01 01:08:50 easysw Exp $"
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// X specific code for the Fast Light Tool Kit (FLTK).
|
|
|
|
// X specific code for the Fast Light Tool Kit (FLTK).
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -800,18 +800,17 @@ int fl_handle(const XEvent& thisevent) |
|
|
|
// not produced on Windoze and thus case statements tend not to check
|
|
|
|
// not produced on Windoze and thus case statements tend not to check
|
|
|
|
// for them. There are 15 of these in the range 0xff91 ... 0xff9f
|
|
|
|
// for them. There are 15 of these in the range 0xff91 ... 0xff9f
|
|
|
|
if (keysym >= 0xff91 && keysym <= 0xff9f) { |
|
|
|
if (keysym >= 0xff91 && keysym <= 0xff9f) { |
|
|
|
// Try to make them turn into FL_KP+'c' so that NumLock is
|
|
|
|
// Map keypad keysym to character or keysym depending on
|
|
|
|
// irrelevant, by looking at the shifted code. This matches the
|
|
|
|
// numlock state...
|
|
|
|
// behavior of the translator in Fl_win32.cxx, and IMHO is the
|
|
|
|
|
|
|
|
// user-friendly result:
|
|
|
|
|
|
|
|
unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1); |
|
|
|
unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1); |
|
|
|
if (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= FL_KP_Last)) { |
|
|
|
if ((xevent.xkey.state & Mod2Mask) && |
|
|
|
|
|
|
|
(keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= FL_KP_Last))) { |
|
|
|
|
|
|
|
// Store ASCII numeric keypad value...
|
|
|
|
keysym = keysym1 | FL_KP; |
|
|
|
keysym = keysym1 | FL_KP; |
|
|
|
buffer[0] = char(keysym1) & 0x7F; |
|
|
|
buffer[0] = char(keysym1) & 0x7F; |
|
|
|
len = 1; |
|
|
|
len = 1; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// If that failed to work, just translate them to the matching
|
|
|
|
// Map keypad to special key...
|
|
|
|
// normal function keys:
|
|
|
|
|
|
|
|
static const unsigned short table[15] = { |
|
|
|
static const unsigned short table[15] = { |
|
|
|
FL_F+1, FL_F+2, FL_F+3, FL_F+4, |
|
|
|
FL_F+1, FL_F+2, FL_F+3, FL_F+4, |
|
|
|
FL_Home, FL_Left, FL_Up, FL_Right, |
|
|
|
FL_Home, FL_Left, FL_Up, FL_Right, |
|
|
@ -1280,5 +1279,5 @@ void Fl_Window::make_current() { |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.36 2004/05/24 01:30:45 easysw Exp $".
|
|
|
|
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.37 2004/06/01 01:08:50 easysw Exp $".
|
|
|
|
//
|
|
|
|
//
|
|
|
|