h/l keys for vim fans; system shortcuts protection

This commit is contained in:
Vadim Makeev 2011-07-25 13:13:11 +04:00
parent c5f77853ab
commit b42559feb8
1 changed files with 4 additions and 0 deletions

View File

@ -110,6 +110,8 @@
}, false);
document.addEventListener('keydown', function (e) {
if (e.altKey || e.ctrlKey || e.metaKey) return;
var current_slide_number = getCurrentSlideNumber();
switch (e.which) {
@ -146,6 +148,7 @@
case 33: // PgUp
case 38: // Up
case 37: // Left
case 72: // h
case 75: // k
e.preventDefault();
@ -156,6 +159,7 @@
case 34: // PgDown
case 40: // Down
case 39: // Right
case 76: // l
case 74: // j
e.preventDefault();