In my example I was limiting all input to ascii text. The issue here is you're trying to extend the example program to handling the non-ascii codes from Fl::event_key().
See the fltk docs on "Handling Events": http://fltk.org/documentation.php/doc-1.1/events.html#events ..particular the section on handling "Keyboard Events", eg: Keyboard Events FL_KEYDOWN, FL_KEYUP A key was pressed or released. The key can be found in *Fl::event_key()*. The text that the key should insert can be found with *Fl::event_text()* and its length is in *Fl::event_length()*. [..] So based on that, I'd say change these two lines: cmd[i+0] = (char)key; cmd[i+1] = 0; ..to instead read: strncat(cmd, Fl::event_text(), sizeof(cmd)-1); ..and that /should/ handle translating non-ascii codes correctly. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

