From 9a2467ebc512444f789f8763b2b95d8c3386c56e Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 14 Dec 2012 21:29:45 +0000 Subject: MacOS: towards implementing the NSTextInput protocol to support the text input management system (cont'd). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9753 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_compose.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Fl_compose.cxx') diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx index 18ea1a596..20ff63249 100644 --- a/src/Fl_compose.cxx +++ b/src/Fl_compose.cxx @@ -49,9 +49,10 @@ int Fl::compose(int& del) { // character composition is now handled by the OS del = 0; #if defined(__APPLE__) - // this stuff is to be treated as a function key - if(Fl::e_length == 0 || Fl::e_keysym == FL_Enter || Fl::e_keysym == FL_KP_Enter || - Fl::e_keysym == FL_Tab || Fl::e_keysym == FL_Escape || Fl::e_state&(FL_META | FL_CTRL) ) { + int has_text_key = Fl::compose_state || Fl::e_keysym <= '~' || Fl::e_keysym == FL_Iso_Key || + (Fl::e_keysym >= FL_KP && Fl::e_keysym <= FL_KP_Last && Fl::e_keysym != FL_KP_Enter); + if ( Fl::e_state&(FL_META | FL_CTRL) || !has_text_key ) { + // this stuff is to be treated as a function key return 0; } #elif defined(WIN32) -- cgit v1.2.3