I am using JavaScript and jQuery and would like to call a function when the user releases the Shift key. The code I came up with works in all the browsers I've tested so far, however the following warning appears in the error console using Firefox 3.5.7. I've tried jQuery 1.2.6, 1.3.2 and 1.4.1.
Warning: The 'charCode' property of a keyup event should not be used. The value is meaningless.
I searched Google for this warning but could not find a definitive answer as to how to prevent it from happening. This is the code I'm using, does anyone have any suggestions?
$(document).ready(
function() {
$(document).keyup(function(e) {
if(e.keyCode == 16) {
alert("Do something...");
}
});
}
);