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_Value_Input.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Fl_Value_Input.cxx') diff --git a/src/Fl_Value_Input.cxx b/src/Fl_Value_Input.cxx index d3f5c6e61..d6dc6ab22 100644 --- a/src/Fl_Value_Input.cxx +++ b/src/Fl_Value_Input.cxx @@ -106,6 +106,8 @@ int Fl_Value_Input::handle(int event) { return 1; case FL_FOCUS: return input.take_focus(); + case FL_SHORTCUT: + return input.handle(event); default: DEFAULT: input.type(((step() - floor(step()))>0.0 || step() == 0.0) ? FL_FLOAT_INPUT : FL_INT_INPUT); @@ -126,6 +128,7 @@ Fl_Value_Input::Fl_Value_Input(int X, int Y, int W, int H, const char* l) selection_color(input.selection_color()); align(FL_ALIGN_LEFT); value_damage(); + set_flag(SHORTCUT_LABEL); } // -- cgit v1.2.3