diff options
Diffstat (limited to 'src/Fl_compose.cxx')
| -rw-r--r-- | src/Fl_compose.cxx | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx index 29a820d12..b76170d7e 100644 --- a/src/Fl_compose.cxx +++ b/src/Fl_compose.cxx @@ -26,7 +26,6 @@ // #include <FL/Fl.H> -#include <stdio.h> // // MRS: Uncomment the following define to get the original (pre-1.1.2) @@ -37,12 +36,27 @@ //#define OLD_DEAD_KEY_CODE +#ifdef __APPLE__ + static const char* const compose_pairs = +":A*A,C'E~N:O:U'a`a^a:a~a*a,c'e`e" +"^e:e'i`i^i:i~n'o`o^o:o~o'u`u^u:u" +"+ o /c# SS* P|ssrOcOTM' : !=AE/O" +"oo+-<=>=Y=mudtSgPipiS a dgOmaeo/" +"? ! !!v-f ~~Dt<<>>.. `A~A~OOEoe" +"- --''``\"'\"`:-^V:y:Y//E=< > fifl" +"++..,,_\"%%^A^E'A:E`E'I^I:I`I'O^O" +"mc`O'U^U`U||^ ~ _ u . * , ~ ; v "; + +#else + "=E _'f _\"..+ ++^ %%^S< OE ^Z ^''^^\"\"^-*- --~ TM^s> oe ^z:Y" " ! % # $ y=| & : c a <<~ - r _ * +-2 3 ' u p . , 1 o >>141234? " "`A'A^A~A:A*AAE,C`E'E^E:E`I'I^I:I-D~N`O'O^O~O:Ox O/`U'U^U:U'YTHss" "`a'a^a~a:a*aae,c`e'e^e:e`i'i^i:i-d~n`o'o^o~o:o-:o/`u'u^u:u'yth:y"; +#endif + #if !defined(WIN32) && defined(OLD_DEAD_KEY_CODE) // X only // X dead-key lookup table. This turns a dead-key keysym into the // first of two characters for one of the compose sequences. These @@ -120,6 +134,14 @@ int Fl::compose(int& del) { } else if (compose_state) { // second character of compose char c1 = char(compose_state); // retrieve first character +#ifdef __APPLE__ + if ( (c1==0x60 && ascii==0xab) || (c1==0x27 && ascii==0x60)) { + del = 1; + compose_state = '^'; + e_text[0] = 0xf6; + return 1; + } +#endif // now search for the pair in either order: for (const char *p = compose_pairs; *p; p += 2) { if (p[0] == ascii && p[1] == c1 || p[1] == ascii && p[0] == c1) { @@ -141,7 +163,14 @@ int Fl::compose(int& del) { } #ifdef WIN32 -//#elif (defined __APPLE__) +#elif (defined __APPLE__) + if (e_state & 0x40000000) { + if (ascii<0x80) + compose_state = ascii; + else + compose_state = compose_pairs[(ascii-0x80)*2]; + return 1; + } #else // See if they typed a dead key. This gets it into the same state as // typing prefix+accent: @@ -173,3 +202,5 @@ int Fl::compose(int& del) { return 0; } + + |
