From ca116a1b6c2e63aa9ecedd3992bd6437f076154c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 1 Jun 2004 01:08:50 +0000 Subject: 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 --- src/Fl_mac.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Fl_mac.cxx') 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 $". // -- cgit v1.2.3