So I had an odd problem recently: 5 keys on the keyboard mysterious
emitted their qwerty characters (my keyboard is in dvorak).  I noticed
that Fl_Input got the correct characters, and noticed that it used
Fl::event_text()[0] instead of Fl::event_key().  Sure enough, for
reasons I haven't tracked down yet, event_key() returns the wrong
character for those 5 keycaps, while event_text() is  correct.

The documentation for event_text() is "Returns the text associated
with the current FL_PASTE or FL_DND_RELEASE event.", which implies
that it's only valid after one of those events, but Fl_Input seems to
know better.

What really is the difference between the two functions, and is
event_text()[0] after a FL_KEYBOARD always safe?  I hope so, because
that's what Fl_Input does!

Once again, this is OS X, 10.4.10, on fltk 1.1.18.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to