$("#text").bind('keypress', function(e) {
var code = (e.KeyCode ? e.keyCode : e.which);
alert(code);
}
It works fine for everything except Alt Ctrl Shift.
But in all tutorials that i found it should echos 17, 18, 19
Why?
$("#text").bind('keypress', function(e) {
var code = (e.KeyCode ? e.keyCode : e.which);
alert(code);
}
It works fine for everything except Alt Ctrl Shift.
But in all tutorials that i found it should echos 17, 18, 19
Why?
Have you considered using the jquery.hotkeys extension that allows you to bind by specifying a string?
"C-A-q" would bind you to Control + Alt + 'q'.