From 682a8fc062a049c159f00697051345dfa2557d86 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 26 Jun 2011 07:42:07 +0000 Subject: Mac OS: use cmd-A and cmd-C to select all and copy (instead of ctrl-A and ctrl-C). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Help_View.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/Fl_Help_View.cxx') diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index caa25b46a..03ea86e55 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -2940,8 +2940,6 @@ void Fl_Help_View::end_selection(int clipboard) free(txt); } -#define ctrl(x) ((x)&0x1f) - /** Handles events in the widget. */ int // O - 1 if we handled it, 0 otherwise Fl_Help_View::handle(int event) // I - Event to handle @@ -3014,11 +3012,12 @@ Fl_Help_View::handle(int event) // I - Event to handle } return 1; case FL_SHORTCUT: { - char ascii = Fl::event_text()[0]; - switch (ascii) { - case ctrl('A'): select_all(); redraw(); return 1; - case ctrl('C'): - case ctrl('X'): end_selection(1); return 1; + if (Fl::event_state() == FL_COMMAND) { + switch ( Fl::event_key() ) { + case 'a': select_all(); redraw(); return 1; + case 'c': + case 'x': end_selection(1); return 1; + } } break; } } -- cgit v1.2.3