From 8ab5ac892e73148fd8be54a1e24a8bcb1055094b Mon Sep 17 00:00:00 2001 From: Sven Assmann Date: Tue, 22 Dec 2020 00:38:13 +0100 Subject: [PATCH] feat(navigation): add support for vi bindings - navigation to previous is `h` key similar to left arrow - navigation to next is `l` key similar to right arrow --- src/theme/book.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/theme/book.js b/src/theme/book.js index 5e386369..6dfb4a19 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -539,6 +539,7 @@ function playground_text(playground) { switch (e.key) { case 'ArrowRight': + case 'l': e.preventDefault(); var nextButton = document.querySelector('.nav-chapters.next'); if (nextButton) { @@ -546,6 +547,7 @@ function playground_text(playground) { } break; case 'ArrowLeft': + case 'h': e.preventDefault(); var previousButton = document.querySelector('.nav-chapters.previous'); if (previousButton) {