For some strange reasons I can't capture Ctrl+Alt+Arrow key combination inside textarea. Is it some sor开发者_如何学编程t of system hotkey that is getting swallowed by Windows? Ctrl+Alt+Any Letter and Ctrl+Alt+Shift+Arrow are getting captured fine.
$(document).ready(function() {
$("textarea").bind("keydown", function(event) {
console.log(event);
if(event.altKey && event.ctrlKey && event.which == 38) {
console.log("ctrl+alt+up"); //never triggered
}
});
});
When Ctrl+Alt+Any Letter is pressed I see all 3 events in console. When Ctrl+Alt+Arrow is pressed I see only 2 events (for Ctrl and Alt).
Any ideas?
I've just checked your code and everything works just fine in IE8, Firefox and Chrome. What browser are you using?
Have you tried using jquery hotkeys plugin ?
精彩评论