From 8683ea2c810a3d689e436a8d13abbbba50efc4f5 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 23 Apr 2008 14:19:58 +0000 Subject: Adding keyboard shortcut to Fl_Value_Input and Fl_Text_Editor git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Editor.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Fl_Text_Editor.cxx') diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index c26532906..6cfc0240d 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -482,6 +482,13 @@ int Fl_Text_Editor::handle(int event) { return 1; } break; + + case FL_SHORTCUT: + if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut())) + return 0; + if (Fl::visible_focus() && handle(FL_FOCUS)) + Fl::focus(this); + return 1; } return Fl_Text_Display::handle(event); -- cgit v1.2.3