summaryrefslogtreecommitdiff
path: root/src/Fl_mac.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-06-09 07:48:08 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-06-09 07:48:08 +0000
commit428a283f83e3c9c6e683062079cacbebf43ce3ab (patch)
treedb03643ede1581ef312615c624005b2c69b15b2d /src/Fl_mac.cxx
parent007fc30ca4e26595c3a21dd07600e6517d5914a4 (diff)
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
Diffstat (limited to 'src/Fl_mac.cxx')
-rw-r--r--src/Fl_mac.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx
index d2849e419..0a667a461 100644
--- a/src/Fl_mac.cxx
+++ b/src/Fl_mac.cxx
@@ -1108,7 +1108,7 @@ pascal OSStatus carbonKeyboardHandler(
sym = keycode_to_sym( keyCode & 0x7f, 0, macKeyLookUp[ keyCode & 0x7f ] );
else
sym = macKeyLookUp[ keyCode & 0x7f ];
- Fl::e_keysym = sym;
+ Fl::e_keysym = Fl::e_original_keysym = sym;
// Handle FL_KP_Enter on regular keyboards and on Powerbooks
if ( keyCode==0x4c || keyCode==0x34) key=0x0d;
// Matt: the Mac has no concept of a NumLock key, or at least not visible