summaryrefslogtreecommitdiff
path: root/src/Fl_mac.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2004-06-01 01:08:50 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2004-06-01 01:08:50 +0000
commitca116a1b6c2e63aa9ecedd3992bd6437f076154c (patch)
treea42c91a33a9061b547ec75880bc667e4dd943d25 /src/Fl_mac.cxx
parent888ca55da63f98ada70845420fc5aa950422b654 (diff)
FLTK now honors the numlock key state (STR #369)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3429 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_mac.cxx')
-rw-r--r--src/Fl_mac.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx
index 4a18aeb7c..b869b41cc 100644
--- a/src/Fl_mac.cxx
+++ b/src/Fl_mac.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_mac.cxx,v 1.1.2.54 2004/04/11 04:38:59 easysw Exp $"
+// "$Id: Fl_mac.cxx,v 1.1.2.55 2004/06/01 01:08:50 easysw Exp $"
//
// MacOS specific code for the Fast Light Tool Kit (FLTK).
//
@@ -997,7 +997,9 @@ pascal OSStatus carbonKeyboardHandler( EventHandlerCallRef nextHandler, EventRef
sym = macKeyLookUp[ keyCode & 0x7f ];
Fl::e_keysym = sym;
if ( keyCode==0x4c ) key=0x0d;
- if ( ( (sym>=FL_KP) && (sym<=FL_KP_Last) ) || ((sym&0xff00)==0) || (sym==FL_Tab) || (sym==FL_Enter) ) {
+ if ((Fl::e_state & FL_NUM_LOCK) &&
+ ((sym >= FL_KP && sym <= FL_KP_Last) || !(sym & 0xff00) ||
+ sym == FL_Tab || sym == FL_Enter)) {
buffer[0] = key;
Fl::e_length = 1;
} else {
@@ -1920,6 +1922,6 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) {
//
-// End of "$Id: Fl_mac.cxx,v 1.1.2.54 2004/04/11 04:38:59 easysw Exp $".
+// End of "$Id: Fl_mac.cxx,v 1.1.2.55 2004/06/01 01:08:50 easysw Exp $".
//