diff options
Diffstat (limited to 'src/Fl_Input.cxx')
| -rw-r--r-- | src/Fl_Input.cxx | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index cef2a092f..46f7765fb 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input.cxx,v 1.10.2.7 2000/02/22 00:56:53 bill Exp $" +// "$Id: Fl_Input.cxx,v 1.10.2.8 2000/03/17 09:38:19 bill Exp $" // // Input widget for the Fast Light Tool Kit (FLTK). // @@ -100,9 +100,7 @@ int Fl_Input::handle_key() { case FL_End: ascii = ctrl('E'); break; case FL_BackSpace: - if (mark() != position()) cut(); - else cut(-1); - return 1; + ascii = ctrl('H'); break; case FL_Enter: case FL_KP_Enter: if (when() & FL_WHEN_ENTER_KEY) { @@ -135,6 +133,7 @@ int Fl_Input::handle_key() { case ctrl('C'): // copy return copy(); case ctrl('D'): + case ctrl('?'): if (mark() != position()) return cut(); else return cut(1); case ctrl('E'): @@ -145,6 +144,10 @@ int Fl_Input::handle_key() { return shift_position(i) + NORMAL_INPUT_MOVE; case ctrl('F'): return shift_position(position()+1) + NORMAL_INPUT_MOVE; + case ctrl('H'): + if (mark() != position()) cut(); + else cut(-1); + return 1; case ctrl('K'): if (position()>=size()) return 0; if (type() == FL_MULTILINE_INPUT) { @@ -181,6 +184,13 @@ int Fl_Input::handle_key() { case ctrl('Z'): case ctrl('_'): return undo(); + case ctrl('I'): + case ctrl('J'): + case ctrl('L'): + case ctrl('M'): + // insert a few selected control characters literally: + if (type() != FL_FLOAT_INPUT || type() != FL_INT_INPUT) + return replace(position(), mark(), &ascii, 1); } return 0; @@ -222,11 +232,13 @@ int Fl_Input::handle(int event) { if (Fl::focus() != this) { Fl::focus(this); handle(FL_FOCUS); - // Windoze-style: select everything on first click: +#if 0 // Misguided attempt to simulate Windoze select-all-on-first-click + // that it does for *some* (but not all) text fields: if (type() != FL_MULTILINE_INPUT) { position(size(), 0); // select everything return 1; } +#endif } Fl::compose_reset(); break; @@ -253,5 +265,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.7 2000/02/22 00:56:53 bill Exp $". +// End of "$Id: Fl_Input.cxx,v 1.10.2.8 2000/03/17 09:38:19 bill Exp $". // |
