summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Editor.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2008-04-23 14:19:58 +0000
committerMatthias Melcher <fltk@matthiasm.com>2008-04-23 14:19:58 +0000
commit8683ea2c810a3d689e436a8d13abbbba50efc4f5 (patch)
tree07f4dd10cee8d33ca9b94b900ff15c056662526e /src/Fl_Text_Editor.cxx
parent8d6b757bfe1579c1c09d627329bbf15875d52cc5 (diff)
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
Diffstat (limited to 'src/Fl_Text_Editor.cxx')
-rw-r--r--src/Fl_Text_Editor.cxx7
1 files changed, 7 insertions, 0 deletions
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);