[STR Closed w/Resolution]
Link: http://www.fltk.org/str.php?L2267
Version: 1.1.9
Fix Version: None
Right.. I updated the docs for Fl::event_key() in 1.3 SVN a few weeks ago
to underline this. Revised docs currently read:
***
static int Fl::event_key() [inline, static, inherited]
Gets which key on the keyboard was last pushed.
The returned integer 'key code' is not necessarily a text equivalent for
the keystroke. For instance: if someone presses '5' on the numeric keypad
with numlock on, Fl::event_key() may return the 'key code' for this key,
and NOT the character '5'. To always get the '5', use Fl::event_text()
instead.
Returns:
an integer 'key code', or 0 if the last event was not a
key press or release.
See also:
int event_key(int), event_text(), compose(int&).
***
..also, Fl::event_text() was updated as well:
***
static const char* Fl::event_text() [inline, static, inherited]
Returns the text associated with the current event, including FL_PASTE or
FL_DND_RELEASE events.
This can be used in response to FL_KEYUP, FL_KEYDOWN, FL_PASTE,
FL_DND_RELEASE.
When responding to FL_KEYUP/FL_KEYDOWN, use this function instead of
Fl::event_key() to get the text equivalent of keystrokes suitable for
inserting into strings and text widgets.
The returned string is guaranteed to be be NULL terminated. However, see
Fl::event_length() for the actual length of the string, in case the string
itself contains NULLs that are part of the text data.
Returns:
A NULL terminated text string equivalent of the last keystroke.
***
Link: http://www.fltk.org/str.php?L2267
Version: 1.1.9
Fix Version: None
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs