Link to home
Start Free TrialLog in
Avatar of sodakotahusker
sodakotahusker

asked on

Determining if Numlock on or Off

I'm doing keypress validations.  I have found how to check for Shiftkey, alt key and ctrl key being pressed but now I need to allow users to use the numerical keypad.  I have to know if the numlock is on or off when a key comes through.  Can anyone tell me how to determinate that with javascript???
  Thanks!!!
   
ASKER CERTIFIED SOLUTION
Avatar of webwoman
webwoman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sodakotahusker
sodakotahusker

ASKER

Yes I care if I only have the numeric representation of the keystroke.  If the user presses the decimal point on the keyboard it fires code 46.  If they press the decimal point on the numeric keypad it fires 190 if they have numlock on.  If they don't - it fires 46.  How do I tell the difference between 46 and 46?????
     
you want to tell which '.' key they pressed?

what if they only have one?

or three?
Oops.  The decimal point on the keyboard returns 190.  With numlock returns 110.   Without numlock returns 46.  
No issue here.  Sorry for the false alarm.  
    Thanks for forcing me to recheck my original findings.  
oh well...

still...

I think it is a valid point.
would you be so kind as to share a little knowledge too?

what are you doing?

data entry?

game?