add support for j/k - vi style navigation
This commit is contained in:
parent
31a370d149
commit
1dae72f23f
|
@ -468,6 +468,7 @@ function playpen_text(playpen) {
|
||||||
|
|
||||||
switch (e.key) {
|
switch (e.key) {
|
||||||
case 'ArrowRight':
|
case 'ArrowRight':
|
||||||
|
case 'j':
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var nextButton = document.querySelector('.nav-chapters.next');
|
var nextButton = document.querySelector('.nav-chapters.next');
|
||||||
if (nextButton) {
|
if (nextButton) {
|
||||||
|
@ -475,6 +476,7 @@ function playpen_text(playpen) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'ArrowLeft':
|
case 'ArrowLeft':
|
||||||
|
case 'k':
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var previousButton = document.querySelector('.nav-chapters.previous');
|
var previousButton = document.querySelector('.nav-chapters.previous');
|
||||||
if (previousButton) {
|
if (previousButton) {
|
||||||
|
|
Loading…
Reference in New Issue