Автор оригинала: Линка
helm2004
Можна
var keys = new Array('b','i','u','s','g','q','m','h','e','l','k','f');
function checkKey() {
if (event.ctrlKey) {
for (i = 0; i < keys.length; i++) {
if (String.fromCharCode(event.keyCode) == keys
.toUpperCase()) {
var found = keys; break;
}
}
if (found) {
switch(found) {
case 'h':alert('h');break;
case 'e':alert('e');break;
case 'p':alert('p');break;
case 'f':alert('f');break;
case 'l':alert('l');break;
case 'k':alert('k');break;
case 'g':alert('g');break;
case 'q':alert('q');break;
case 'm':alert('m');break;
default:alert('');
}
this.cancelBubble = true;
this.returnValue = false;
return false;
}
}
}
document.onkeydown = checkKey;
crocodile2u гы