Author: matt
Date: 2011-01-11 08:43:52 -0800 (Tue, 11 Jan 2011)
New Revision: 8259
Log:
Attempt to fix the dead_key/special_key issue.
Modified:
branches/branch-1.3/src/Fl_win32.cxx
Modified: branches/branch-1.3/src/Fl_win32.cxx
===================================================================
--- branches/branch-1.3/src/Fl_win32.cxx 2011-01-11 13:40:26 UTC (rev
8258)
+++ branches/branch-1.3/src/Fl_win32.cxx 2011-01-11 16:43:52 UTC (rev
8259)
@@ -1068,12 +1068,14 @@
}
}
} else if ((lParam & (1<<31))==0){
- //buffer[0] = 0;
- //Fl::e_length = 0;
- xchar u = (xchar) wParam;
-// Fl::e_length = fl_unicode2utf(&u, 1, buffer);
- Fl::e_length = fl_utf8fromwc(buffer, 1024, &u, 1);
- buffer[Fl::e_length] = 0;
+ if ((lParam & (1<<24))==0) { // clear if dead key (always?)
+ xchar u = (xchar) wParam;
+ Fl::e_length = fl_utf8fromwc(buffer, 1024, &u, 1);
+ buffer[Fl::e_length] = 0;
+ } else { // set if "extended key" (never printable?)
+ buffer[0] = 0;
+ Fl::e_length = 0;
+ }
}
Fl::e_text = buffer;
if (lParam & (1<<31)) { // key up events.
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit