mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +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);
|
||||
handled = true;
|
||||
break;
|
||||
case 37: // left arrow
|
||||
PDFView.page--;
|
||||
handle = true;
|
||||
break;
|
||||
case 39: // right arrow
|
||||
PDFView.page++;
|
||||
handle = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (handled) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue