Im using foloowing code to track key events
oEvent=window.event || oEvent;
iKeyCode=oEvent.keyCode || oEvent.which;alert(iKeyCode);
its
problem: webkit sends a keycode 38 (up arrow) to keypress when you do shift-7 (ampersand).
summary: & and up both equal 38. % and left both equal 37. ' and right both equal 39. ( and down both equal 40. for firefox and opera, the 37/38/39/40 aren't sent for &, %, ', (. they only send those for up, down, left, right. but webkit and ie send 37/38/39/40 for both arrow keys and &, %, ', (. note that for up/down/left/right, webkit sets charCode to 0, but not for &, %, ', (.
solution: so if you handling those events by keycode, you need to either ignore when the shift key is down or check if the charCode is 0