HTML5 AccessKey Atrybut: Możesz nie potrzebować JavaScript, aby dodać skróty klawiatury
// Register the key handler
document.addEventListener('keyup', function(e){
// This would be triggered by pressing CTRL + A
if (e.ctrlKey && e.keyCode == 65) {
window.location.href = "http://ourcodeworld.com";
}
// Or with ALT + A
//if (e.altKey && e.keyCode == 65) {
// window.location.href = "http://ourcodeworld.com";
//}
}, false);
Greater Adjutant Stork