diff --git a/CHANGES b/CHANGES index c05032f0a..3a9b9d49e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ CHANGES IN FLTK 1.1.4 + - Apple-C/X/V/Z didn't work in the Fl_Input widget due + to a bad mapping to control keys (STR #pending) - Added the OSX-specific fl_open_callback() function to handle Open Documents messages from the Finder (STR #pending) diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index 285adf970..2200ed2b8 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input.cxx,v 1.10.2.15.2.17 2003/01/30 21:41:57 easysw Exp $" +// "$Id: Fl_Input.cxx,v 1.10.2.15.2.18 2003/06/05 21:14:18 easysw Exp $" // // Input widget for the Fast Light Tool Kit (FLTK). // @@ -29,6 +29,7 @@ // In theory you can replace this code with another subclass to change // the keybindings. +#include #include #include #include @@ -57,7 +58,7 @@ int Fl_Input::shift_up_down_position(int p) { // define it as 1 to prevent cursor movement from going to next field: #define NORMAL_INPUT_MOVE 0 -#define ctrl(x) (x^0x40) +#define ctrl(x) ((x)^0x40) int Fl_Input::handle_key() { @@ -150,7 +151,13 @@ int Fl_Input::handle_key() { case 'v' : case 'x' : case 'z' : - if (Fl::event_state(FL_META)) ascii = ctrl(Fl::event_key()); +// printf("'%c' (0x%02x) pressed with%s%s%s%s\n", ascii, ascii, +// Fl::event_state(FL_SHIFT) ? " FL_SHIFT" : "", +// Fl::event_state(FL_CTRL) ? " FL_CTRL" : "", +// Fl::event_state(FL_ALT) ? " FL_ALT" : "", +// Fl::event_state(FL_META) ? " FL_META" : ""); + if (Fl::event_state(FL_META)) ascii -= 0x60; +// printf("using '%c' (0x%02x)...\n", ascii, ascii); break; #endif // __APPLE__ } @@ -407,5 +414,5 @@ Fl_Input::Fl_Input(int X, int Y, int W, int H, const char *l) } // -// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.17 2003/01/30 21:41:57 easysw Exp $". +// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.18 2003/06/05 21:14:18 easysw Exp $". // diff --git a/src/Makefile b/src/Makefile index 83500b773..696b48e13 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,5 @@ # -# "$Id: Makefile,v 1.18.2.14.2.50 2003/01/30 21:43:17 easysw Exp $" +# "$Id: Makefile,v 1.18.2.14.2.51 2003/06/05 21:14:19 easysw Exp $" # # Library makefile for the Fast Light Tool Kit (FLTK). # @@ -212,7 +212,7 @@ libfltk.sl.1.1: $(OBJECTS) libfltk.1.1.dylib: $(OBJECTS) echo $(DSOCOMMAND) $@ ... - $(DSOCOMMAND) $@ $(OBJECTS) $(IMAGELIBS) + $(DSOCOMMAND) $@ $(OBJECTS) $(LDLIBS) $(IMAGELIBS) -$(RM) libfltk.dylib $(LN) libfltk.1.1.dylib libfltk.dylib @@ -244,7 +244,7 @@ libfltk_forms.sl.1.1: $(FLOBJECTS) libfltk_forms.1.1.dylib: $(FLOBJECTS) echo $(DSOCOMMAND) $@ ... - $(DSOCOMMAND) $@ $(FLOBJECTS) + $(DSOCOMMAND) $@ $(FLOBJECTS) $(LDLIBS) -Wl,-rpath,$(libdir) -L. -lfltk -$(RM) libfltk_forms.dylib $(LN) libfltk_forms.1.1.dylib libfltk_forms.dylib @@ -276,7 +276,7 @@ libfltk_gl.sl.1.1: $(GLOBJECTS) libfltk_gl.1.1.dylib: $(GLOBJECTS) echo $(DSOCOMMAND) $@ ... - $(DSOCOMMAND) $@ $(GLOBJECTS) + $(DSOCOMMAND) $@ $(GLOBJECTS) $(GLDLIBS) -Wl,-rpath,$(libdir) -L. -lfltk -$(RM) libfltk_gl.dylib $(LN) libfltk_gl.1.1.dylib libfltk_gl.dylib @@ -308,7 +308,7 @@ libfltk_images.sl.1.1: $(IMGOBJECTS) libfltk_images.1.1.dylib: $(IMGOBJECTS) echo $(DSOCOMMAND) $@ ... - $(DSOCOMMAND) $@ $(IMGOBJECTS) + $(DSOCOMMAND) $@ $(IMGOBJECTS) $(LDLIBS) $(IMAGELIBS) -Wl,-rpath,$(libdir) -L. -lfltk -$(RM) libfltk_images.dylib $(LN) libfltk_images.1.1.dylib libfltk_images.dylib @@ -566,5 +566,5 @@ uninstall: # -# End of "$Id: Makefile,v 1.18.2.14.2.50 2003/01/30 21:43:17 easysw Exp $". +# End of "$Id: Makefile,v 1.18.2.14.2.51 2003/06/05 21:14:19 easysw Exp $". # diff --git a/test/input.cxx b/test/input.cxx index 9db3a6462..15206930c 100644 --- a/test/input.cxx +++ b/test/input.cxx @@ -1,5 +1,5 @@ // -// "$Id: input.cxx,v 1.5.2.4.2.5 2003/01/30 21:45:45 easysw Exp $" +// "$Id: input.cxx,v 1.5.2.4.2.6 2003/06/05 21:14:19 easysw Exp $" // // Input field test program for the Fast Light Tool Kit (FLTK). // @@ -97,16 +97,16 @@ int main(int argc, char **argv) { int y1 = y; Fl_Button *b; - b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_&CHANGED"); + b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_CHANGED"); b->callback(toggle_cb, FL_WHEN_CHANGED); y += 25; b->tooltip("Do callback each time the text changes"); - b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_&RELEASE"); + b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_RELEASE"); b->callback(toggle_cb, FL_WHEN_RELEASE); y += 25; b->tooltip("Do callback when widget loses focus"); - b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_&ENTER_KEY"); + b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_ENTER_KEY"); b->callback(toggle_cb, FL_WHEN_ENTER_KEY); y += 25; b->tooltip("Do callback when user hits Enter key"); - b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_&NOT_CHANGED"); + b = new Fl_Toggle_Button(10,y,200,25,"FL_WHEN_NOT_CHANGED"); b->callback(toggle_cb, FL_WHEN_NOT_CHANGED); y += 25; b->tooltip("Do callback even if the text is not changed"); y += 5; @@ -132,5 +132,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: input.cxx,v 1.5.2.4.2.5 2003/01/30 21:45:45 easysw Exp $". +// End of "$Id: input.cxx,v 1.5.2.4.2.6 2003/06/05 21:14:19 easysw Exp $". //