mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Add keyboard shortcuts to navigate pages with left and right arrow keys
This is the behavior of Adobe Reader.app and Apple's Preview.app.
This commit is contained in:
parent
969422f3c2
commit
aebb9946f8
1 changed files with 8 additions and 0 deletions
|
@ -912,6 +912,14 @@ window.addEventListener('keydown', function keydown(evt) {
|
||||||
PDFView.setScale(kDefaultScale, true);
|
PDFView.setScale(kDefaultScale, true);
|
||||||
handled = true;
|
handled = true;
|
||||||
break;
|
break;
|
||||||
|
case 37: // left arrow
|
||||||
|
PDFView.page--;
|
||||||
|
handle = true;
|
||||||
|
break;
|
||||||
|
case 39: // right arrow
|
||||||
|
PDFView.page++;
|
||||||
|
handle = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handled) {
|
if (handled) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue