mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 08:32:07 +08:00
Added an event variable "Fl::event_original_key()" which returns the current key code (see Fl::event_key()) before it gets mangled through the NumLock keypad conversion. This way, an application can differentiate between an arrow key and a numeric keypad w/NumLock off.
On Win32, releasing a numeric keypad key w/NumLock off wiould return the wrong keycode (keypad instead of arrow key). Documentation changed accordingly. X11 code is yet to be tested. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -69,6 +69,7 @@ state information and global methods for the current application.</P>
|
||||
<LI><A HREF="#Fl.event_is_click">event_is_click</A></LI>
|
||||
<LI><A HREF="#Fl.event_key">event_key</A></LI>
|
||||
<LI><A HREF="#Fl.event_length">event_length</A></LI>
|
||||
<LI><A HREF="#Fl.event_original_key">event_original_key</A></LI>
|
||||
<LI><A HREF="#Fl.event_shift">event_shift</A></LI>
|
||||
<LI><A HREF="#Fl.event_state">event_state</A></LI>
|
||||
<LI><A HREF="#Fl.event_text">event_text</A></LI>
|
||||
@@ -660,6 +661,14 @@ will always be a nul at this position in the text. However there may
|
||||
be a nul before that if the keystroke translates to a nul character or
|
||||
you paste a nul character.
|
||||
|
||||
<H4><A NAME="Fl.event_original_key">int event_original_key();</A></H4>
|
||||
|
||||
<P> If NumLock is deactivated, FLTK translates events from the
|
||||
numeric keypad into the corresponding arrow key events.
|
||||
<tt>event_key()</tt> returns the translated key code, whereas
|
||||
<tt>event_original_key()</tt> returns the keycode before
|
||||
NumLock translation.
|
||||
|
||||
<H4><A NAME="Fl.event_shift">int event_shift();</A></H4>
|
||||
|
||||
<P>Returns non-zero if the Shift key is pressed.
|
||||
|
||||
Reference in New Issue
Block a user