From 1dae72f23feddb7772102e248b9df714140ee340 Mon Sep 17 00:00:00 2001 From: Bulat Musin Date: Mon, 5 Feb 2018 14:16:28 +0300 Subject: [PATCH] add support for j/k - vi style navigation --- src/theme/book.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/theme/book.js b/src/theme/book.js index 489d994a..fe3d17cb 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -468,6 +468,7 @@ function playpen_text(playpen) { switch (e.key) { case 'ArrowRight': + case 'j': e.preventDefault(); var nextButton = document.querySelector('.nav-chapters.next'); if (nextButton) { @@ -475,6 +476,7 @@ function playpen_text(playpen) { } break; case 'ArrowLeft': + case 'k': e.preventDefault(); var previousButton = document.querySelector('.nav-chapters.previous'); if (previousButton) {