From 3f615b530f25a87ab5984a1cfc4d3436cafbdba5 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Thu, 18 Mar 2004 14:33:09 +0000 Subject: C-c clears the window, and now @ and | works, patch from Mathias Gumz --- src/FbTk/TextBox.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc index cbb731b..6750aae 100644 --- a/src/FbTk/TextBox.cc +++ b/src/FbTk/TextBox.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: TextBox.cc,v 1.7 2004/01/21 12:32:53 fluxgen Exp $ +// $Id: TextBox.cc,v 1.8 2004/03/18 14:33:09 fluxgen Exp $ #include "TextBox.hh" #include "Font.hh" @@ -215,8 +215,14 @@ void TextBox::keyPressEvent(XKeyEvent &event) { case XK_k: killToEnd(); break; + case XK_c: + cursorHome(); + m_text.clear(); + adjustStartPos(); + adjustEndPos(); + break; } - } else if (event.state == ShiftMask) { + } else if (event.state == ShiftMask || event.state == 0x2000) { if (isprint(keychar[0])) { std::string val; val += keychar[0]; -- cgit v0.11.2