...

View Full Version : keyCodes: case & numpad issues



Choopernickel
06-12-2003, 06:20 PM
I'm trying to use a keyUp validator to only allow numeric input (including a single dot) while still allowing tab, enter, etc. to pass through.

I've noticed (in IE6, the target browser-- intranet) that the keyCode is sometimes different (but not always) depending on whether caps lock is on, shift is held, etc. Also, there is an overlap between the numPad and the start of the lowercase alphabet's keyCodes.

Using keyDown doesn't work either.

Anybody run into this issue before? If so, how'd you deal with it?

(I searched on keyCode and didn't find an answer in the top 50 or so results.)

A1ien51
06-12-2003, 08:13 PM
LOL, I never noticed that with the shift key down on the number pad.

I tested it ot on my script here:
http://www10.brinkster.com/A1ien51/Scripts/KeyCode.htm and saw that sometimes it was 35 and sometimes it was the real number....lol,,,,,hmmm

Choopernickel
06-13-2003, 04:32 PM
Check this out:
http://www.w3.org/2002/09/tests/keys.html

Type some letters, numbers, lowercase, uppercase, numberpad, etc.

watch the differences fly!

Kylena
10-29-2003, 02:00 AM
Whoa! :thumbsup: Cool!

I was going to hit a wall when I saw the link! Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum