Commit b42559fe authored by Vadim Makeev's avatar Vadim Makeev

h/l keys for vim fans; system shortcuts protection

parent c5f77853
...@@ -110,6 +110,8 @@ ...@@ -110,6 +110,8 @@
}, false); }, false);
document.addEventListener('keydown', function (e) { document.addEventListener('keydown', function (e) {
if (e.altKey || e.ctrlKey || e.metaKey) return;
var current_slide_number = getCurrentSlideNumber(); var current_slide_number = getCurrentSlideNumber();
switch (e.which) { switch (e.which) {
...@@ -146,6 +148,7 @@ ...@@ -146,6 +148,7 @@
case 33: // PgUp case 33: // PgUp
case 38: // Up case 38: // Up
case 37: // Left case 37: // Left
case 72: // h
case 75: // k case 75: // k
e.preventDefault(); e.preventDefault();
...@@ -156,6 +159,7 @@ ...@@ -156,6 +159,7 @@
case 34: // PgDown case 34: // PgDown
case 40: // Down case 40: // Down
case 39: // Right case 39: // Right
case 76: // l
case 74: // j case 74: // j
e.preventDefault(); e.preventDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment